Quick ref
xl list show running domainsxl create vm.cfg boot a domUxl console dom attach to guest consolexl info host + hypervisor factsxl dmesg hypervisor ring bufferxl top live per-domain resource usexl migrate dom host live migrateThe Cast: Hypervisor and Domains
Xen hypervisorThin Type-1 layer owning CPU scheduling, memory translation, and event delivery; runs no drivers itself.
dom0First, privileged domain booted by Xen; hosts the toolstack, real device drivers, and backend halves.
domUUnprivileged guest with no direct hardware access; reaches devices via split drivers.
driver domainDeprivileged domain owning a NIC/HBA via passthrough, exporting backends — shrinks dom0's attack surface.
stub domainPer-HVM-guest sandbox running its QEMU device model, isolating emulation from dom0.
toolstack (xl/libxl)User-space control plane in dom0 that issues hypercalls to build, pause, and destroy domains.
Note "Disaggregation" splits dom0's roles across driver and stub domains so one compromised driver doesn't own the host.
Execution Modes: PV / HVM / PVH
| Mode | Hardware virt | Boot/privilege | I/O path |
|---|---|---|---|
PV | None — pure hypercalls | Xen-aware kernel, ring deprivileging | PV split drivers only |
HVM | VT-x / AMD-V + EPT/NPT | Unmodified OS, emulated BIOS | QEMU emulation, optional PV drivers |
PVH | VT-x / AMD-V + EPT/NPT | PV boot, no QEMU/firmware emulation | PV split drivers, hardware MMU |
Tip PVH is the modern default: it keeps PV's lean device model while using hardware virtualization for memory and privilege, avoiding PV's costly pagetable hypercalls and HVM's QEMU overhead.
CPU Scheduling
credit2Default general-purpose scheduler; weight + cap based, latency-aware load balancing across pCPUs.
rtdsReal-time deferrable-server scheduler with per-vCPU period/budget for latency guarantees.
nullStatic 1:1 vCPU-to-pCPU pinning with no overhead; ideal for dedicated/NFV workloads.
xl vcpu-pin dom v pcpuPin a vCPU to physical CPUs for cache locality or NUMA placement.
xl sched-credit2 -d dom -w 512Set a domain's scheduling weight.
xl cpupool-*Partition pCPUs into pools, each with its own scheduler instance.
Memory: Translation & Ballooning
Address translation
HVM/PVH use hardware EPT/NPT to map guest-physical to machine frames; classic PV guests use direct/shadow pagetables. The P2M and reverse M2P tables track guest↔machine frame relationships.
Reclaiming memory
The in-guest balloon driver inflates to return pages to Xen and deflates to take them back, enabling overcommit within maxmem. It is one tool among many — not the primary memory mechanism.
xl mem-set dom 2048Balloon the domain's current target to 2 GiB.
xl mem-max dom 4096Set the hard ceiling the balloon can grow toward.
dom0_mem=4G,max:4GBoot arg pinning dom0 memory to avoid contention.
Warning Ballooning a guest below its working set triggers in-guest OOM kills, not graceful slowdown — set sane
maxmem floors.I/O Plumbing: Split Drivers, Grants, Channels, Xenstore
netfront / blkfrontLightweight frontend drivers in domU that talk to backends over a shared ring.