XEN(4)
π XEN(4) π
okay bestie, so this is the xen page from the Kernel Interfaces Manual β Xen Hypervisor Guest (DomU) Support. yes it's a mouthful. yes it's important. let's get into it π¦
β¨ SYNOPSIS β¨
so if you wanna compile hardware-assisted virtualization (HVM) Xen guest support with para-virtualized drivers into an amd64 or i386 kernel, you drop these lines into your kernel config file, periodt:
options XENHVM
device xenpci
that's it. that's the whole vibe check. π
πΈ DESCRIPTION πΈ
The Xen Hypervisor is that girl β it lets you run multiple virtual machines on a single computer system. iconic behavior honestly.
Back when it first dropped, Xen required i386 kernels to be compiled "para-virtualized" because the x86 instruction set wasn't fully virtualizable. (tragic, I know.) Basically, para-virtualization modifies the virtual memory system to use hypervisor calls (aka hypercalls) instead of direct hardware instructions to modify the TLB. And yeah, para-virtualized device drivers were also required to access resources like virtual network interfaces and disk devices. so many requirements bestie π
Then later instruction set extensions came through from AMD and Intel to support fully virtualizable instructions, and suddenly unmodified virtual memory systems could be supported too. this is what we call hardware-assisted virtualization (HVM). slay! π
HVM configurations can either rely on transparently emulated hardware peripherals, or on para-virtualized drivers β which are aware of virtualization, so they can optimize certain behaviors to improve performance or semantics.
FreeBSD supports hardware-assisted virtualization (HVM) on both i386 and amd64 kernels. π«Ά
para-virtualized device drivers are required to support certain functionality β like processing management requests, returning idle physical memory pages to the hypervisor, etc. no skips, no shortcuts.
π§ Xen DomU device drivers π§
here's the roster of supported para-virtualized drivers, bestie. take notes π
balloonβ Allow physical memory pages to be returned to the hypervisor as a result of manual tuning or automatic policy. (it's giving deflation, but make it β¨usefulβ¨)blkbackβ Exports local block devices or files to other Xen domains where they can then be imported viablkfront.blkfrontβ Import block devices from other Xen domains as local block devices, to be used for file systems, swap, etc.consoleβ Export the low-level system console via the Xen console service.controlβ Process management operations from Domain 0, including power off, reboot, suspend, crash, and halt requests.evtchnβ Expose Xen events via the/dev/xen/evtchnspecial device.netbackβ Export local network interfaces to other Xen domains where they can be imported vianetfront.netfrontβ Import network interfaces from other Xen domains as local network interfaces, which may be used for IPv4, IPv6, etc.pcifrontβ Allow physical PCI devices to be passed through into a PV domain.xenpciβ Represents the Xen PCI device, an emulated PCI device that is exposed to HVM domains. This device allows detection of the Xen hypervisor, and provides interrupt and shared memory services required to interact with the hypervisor.
β‘ Performance considerations β‘
ngl, the tea here is simple: in general, PV drivers will perform better than emulated hardware, and they're the recommended configuration for HVM installations. so likeβ¦ choose them? obviously? π
Also β using a hypervisor introduces a second layer of scheduling that may limit the effectiveness of certain FreeBSD scheduling optimisations. Among these is adaptive locking, which is no longer able to determine whether a thread holding a lock is in execution. so yeah, it's recommended that adaptive locking be disabled when using Xen:
options NO_ADAPTIVE_MUTEXES
options NO_ADAPTIVE_RWLOCKS
options NO_ADAPTIVE_SX
turn them off bestie, trust π«Ά
π HISTORY π
Support for xen first appeared in FreeBSD 8.1. a little vintage moment, we love her π
π AUTHORS π
FreeBSD support for Xen was first added by Kip Macy <kmacy@FreeBSD.org> and Doug Rabson <dfr@FreeBSD.org>. Further refinements were made by Justin Gibbs <gibbs@FreeBSD.org>, Adrian Chadd <adrian@FreeBSD.org>, and Colin Percival <cperciva@FreeBSD.org>. This manual page was written by Robert Watson <rwatson@FreeBSD.org>.
all icons, all main characters, all ate π β¨
π BUGS π
okay so, real talk, some caveats:
- FreeBSD is only able to run as a Xen guest (DomU) and not as a Xen host (Dom0). that's just how it is bestie π
- As of this release, Xen PV DomU support is not heavily tested; instability has been reported during VM migration of PV kernels. π¨
- Certain PV driver features, such as the
balloondriver, are under-exercised.
so like, proceed with awareness. no cap. π
and that's the whole page, bestie!! this one came from the <strong>Debian</strong> crew and it's dated <strong>April 30, 2015</strong> β so yeah, she's got a lil vintage energy but she still serves πβ¨π
π¦ where this page comes from
- debian bookworm: freebsd-manpages 12.2-1 Β· BSD-2-Clause-FreeBSD AND BSD-4-Clause
- debian trixie: freebsd-manpages 12.2-2 Β· BSD-2-Clause-FreeBSD AND BSD-4-Clause
- ubuntu jammy: freebsd-manpages 12.2-1 Β· BSD-2-Clause-FreeBSD AND BSD-4-Clause
- ubuntu noble: freebsd-manpages 12.2-1 Β· BSD-2-Clause-FreeBSD AND BSD-4-Clause
- ubuntu questing: freebsd-manpages 12.2-2
- ubuntu resolute: freebsd-manpages 12.2-2build1 Β· BSD-2-Clause-FreeBSD AND BSD-4-Clause
- ubuntu stonking: freebsd-manpages 12.2-2build1 Β· BSD-2-Clause-FreeBSD AND BSD-4-Clause
- Copyright (c) 2010 Robert N. M. Watson
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms