In 2003, a team at the University of Cambridge Computer Laboratory released Xen 1.0. The pitch was almost heretical: instead of hiding the hypervisor from the guest, tell the guest the truth and ask it to cooperate. The result was a hypervisor fast enough to run production workloads on commodity x86 hardware — years before the CPU vendors added virtualization support.
Cooperation over interception
Xen's authors argued that the expensive part of virtualization was not running guest code, but intercepting it. Binary translation and trap-and-emulate both spend time detecting and emulating privileged operations. If the guest kernel is modified to issue an explicit call whenever it would otherwise execute a sensitive instruction, the hypervisor can avoid guessing entirely.
This is paravirtualization. The guest is no longer an unmodified operating system; it is a kernel compiled for Xen, using a small interface of hypercalls instead of privileged instructions. The guest still believes it owns the CPU and memory, but it asks permission through a defined ABI. In exchange, it runs close to native speed.
Full virtualization hides the hypervisor and pays for interception; paravirtualization exposes the hypervisor and pays for guest modifications. Xen chose the second bill.
Domains, drivers and the control plane
Xen introduced a vocabulary that is still worth knowing. The hypervisor itself is a thin layer that schedules virtual CPUs and manages memory. The first domain to boot, domain 0 or dom0, is a privileged Linux instance that runs the real device drivers and the management tools. Other guests — domU — do not talk to hardware directly. They use a split device driver: a front-end driver in the guest sends requests over shared memory to a back-end driver in dom0, which performs the actual I/O.
Three mechanisms make this work:
- Event channels — lightweight asynchronous notifications between domains, used instead of hardware interrupts.
- Grant tables — a controlled way for one domain to share specific memory pages with another, without exposing its whole address space.
- XenStore — a small hierarchical key-value store used to configure devices and pass information between domains at boot.
The design has a clear performance advantage and an equally clear operational consequence: dom0 is a single point of failure and a large attack surface. If dom0 is compromised, every guest on the host is at risk. The Xen community spent years reducing the driver domain's privilege and adding stub domains, but the architectural asymmetry remained.
HVM, PV-on-HVM, and the hardware transition
Xen's original guests had to be modified, which limited it mostly to Linux and other open-source kernels. When Intel VT-x and AMD-V arrived in 2005–2006, Xen 3.0 added HVM (hardware virtual machine) guests: fully unmodified operating systems running on the new CPU modes. A paravirtualized guest could then run on HVM hardware with PV drivers for I/O — often called PV-on-HVM — combining unmodified boot with fast devices.
Later, PVH mode combined a PV-style boot path with hardware virtualization for privileged operations, aiming for the best of both. The naming is a museum of compromises, but the trajectory is consistent: as hardware absorbed the hard parts, software moved from modifying the guest to using standard interfaces.
The hypervisor behind the first cloud
XenSource, the company formed to commercialize Xen in 2005, was acquired by Citrix in 2007. But Xen's biggest impact came through a customer rather than a product: Amazon Web Services launched EC2 in August 2006 on a Xen-based platform. For years, "the cloud" meant, at the hypervisor level, Xen plus paravirtualized Linux guests. Rackspace, Linode and many hosting providers followed.
The operational requirements of EC2 shaped Xen as much as the research did: fast provisioning, network isolation per tenant, API-driven lifecycle management, and enough density to make the economics work. Xen's small hypervisor and PV performance made it a natural fit. Later, AWS moved much of its fleet to KVM and its own Nitro architecture, a transition that Chapter 8 covers.
Running a Xen guest
A classic Xen PV guest is defined by a configuration file and started with the
xl toolstack. The guest kernel must be Xen-aware.
# paravirtualized Linux guest
name = "web01"
kernel = "/boot/vmlinuz-xen"
ramdisk = "/boot/initrd-xen.img"
memory = 2048
vcpus = 2
disk = [ "phy:/dev/vg0/web01,xvda,w" ]
vif = [ "bridge=xenbr0,mac=00:16:3e:12:34:56" ]
on_poweroff = "destroy"
on_reboot = "restart"
on_crash = "restart"
$ sudo xl create /etc/xen/web01.cfg
$ sudo xl list
Name ID Mem VCPUs State Time(s)
Domain-0 0 4096 4 r----- 184.2
web01 3 2048 2 -b---- 12.7
$ sudo xl console web01
$ sudo xl top # per-domain CPU and memory
The trade-offs, honestly
Xen proved that paravirtualization could deliver near-native performance on x86, and it did so at a time when the alternative was complex binary translation. But the model carried costs that became harder to justify as hardware caught up:
- Guest modifications. Every supported OS needs a Xen-aware kernel and drivers. Windows guests were impossible until HVM.
- Driver domain complexity. dom0 becomes a critical, privileged component. Its failures affect every tenant.
- Operational learning curve. XenStore, grant tables and split drivers are powerful but not simple.
- Security advisory load. A small hypervisor still has a large interface: device emulation, virtual firmware and toolstack bugs produced a steady stream of CVEs.
KVM took a different route — no guest modifications, no separate hypervisor kernel, just Linux plus hardware virtualization — and eventually became the default for new open-source deployments. But Xen's influence is everywhere: the vocabulary of domains, the split driver model, and the operational patterns of early cloud all trace back to Cambridge.
Xen is the clearest example of a design optimized for the hardware of its time. When the hardware changed, the optimization became a constraint — but the paravirtualized device model it pioneered lives on in virtio, vhost and SR-IOV.
Sources & further reading
- P. Barham et al., Xen and the art of virtualization, SOSP 2003.
- Xen Project — architecture and documentation.
- AWS, EC2 retrospective and the original 2006 launch materials.
- Citrix, XenServer documentation.