17c472105SRobert Watson.\" Copyright (c) 2010 Robert N. M. Watson 27c472105SRobert Watson.\" All rights reserved. 37c472105SRobert Watson.\" 47c472105SRobert Watson.\" This software was developed by SRI International and the University of 57c472105SRobert Watson.\" Cambridge Computer Laboratory under DARPA/AFRL contract FA8750-10-C-0237 67c472105SRobert Watson.\" ("CTSRD"), as part of the DARPA CRASH research program. 77c472105SRobert Watson.\" 87c472105SRobert Watson.\" Redistribution and use in source and binary forms, with or without 97c472105SRobert Watson.\" modification, are permitted provided that the following conditions 107c472105SRobert Watson.\" are met: 117c472105SRobert Watson.\" 1. Redistributions of source code must retain the above copyright 127c472105SRobert Watson.\" notice, this list of conditions and the following disclaimer. 137c472105SRobert Watson.\" 2. Redistributions in binary form must reproduce the above copyright 147c472105SRobert Watson.\" notice, this list of conditions and the following disclaimer in the 157c472105SRobert Watson.\" documentation and/or other materials provided with the distribution. 167c472105SRobert Watson.\" 177c472105SRobert Watson.\" THIS SOFTWARE IS PROVIDED BY THE AUTHORS AND CONTRIBUTORS ``AS IS'' AND 187c472105SRobert Watson.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 197c472105SRobert Watson.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 207c472105SRobert Watson.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE 217c472105SRobert Watson.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 227c472105SRobert Watson.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 237c472105SRobert Watson.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 247c472105SRobert Watson.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 257c472105SRobert Watson.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 267c472105SRobert Watson.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 277c472105SRobert Watson.\" SUCH DAMAGE. 287c472105SRobert Watson.\" 29*82126ef9SRoger Pau Monné.Dd January 8, 2024 307c472105SRobert Watson.Dt XEN 4 317c472105SRobert Watson.Os 327c472105SRobert Watson.Sh NAME 337c472105SRobert Watson.Nm xen 34*82126ef9SRoger Pau Monné.Nd Xen Hypervisor Support 357c472105SRobert Watson.Sh SYNOPSIS 36*82126ef9SRoger Pau MonnéFreeBSD supports running both as a Xen guest and host on amd64 hardware. 37*82126ef9SRoger Pau MonnéGuest support is limited to HVM and PVH modes, while host support is limited to 38*82126ef9SRoger Pau MonnéPVH mode only. 39*82126ef9SRoger Pau Monné.Pp 40*82126ef9SRoger Pau MonnéXen support is built by default in the i386 and amd64 GENERIC kernels; note 41*82126ef9SRoger Pau Monnéhowever that host mode is only available on amd64. 427c472105SRobert Watson.Sh DESCRIPTION 437c472105SRobert WatsonThe Xen Hypervisor allows multiple virtual machines to be run on a single 447c472105SRobert Watsoncomputer system. 457c472105SRobert WatsonWhen first released, Xen required that i386 kernels be compiled 467c472105SRobert Watson"para-virtualized" as the x86 instruction set was not fully virtualizable. 473b56015bSRobert WatsonPrimarily, para-virtualization modifies the virtual memory system to use 483b56015bSRobert Watsonhypervisor calls (hypercalls) rather than direct hardware instructions to 493b56015bSRobert Watsonmodify the TLB, although para-virtualized device drivers were also required 503b56015bSRobert Watsonto access resources such as virtual network interfaces and disk devices. 513b56015bSRobert Watson.Pp 527c472105SRobert WatsonWith later instruction set extensions from AMD and Intel to support fully 533b56015bSRobert Watsonvirtualizable instructions, unmodified virtual memory systems can also be 54*82126ef9SRoger Pau Monnésupported; this is referred to as hardware-assisted virtualization (HVM and PVH). 553b56015bSRobert WatsonHVM configurations may either rely on transparently emulated hardware 563b56015bSRobert Watsonperipherals, or para-virtualized drivers, which are aware of virtualization, 573b56015bSRobert Watsonand hence able to optimize certain behaviors to improve performance or 583b56015bSRobert Watsonsemantics. 59*82126ef9SRoger Pau MonnéPVH configurations rely on para-virtualized drivers exclusively for IO. 607c472105SRobert Watson.Pp 617c472105SRobert Watson.Fx 627c472105SRobert WatsonPara-virtualized device drivers are required in order to support certain 633b56015bSRobert Watsonfunctionality, such as processing management requests, returning idle 64055dac5cSRobert Watsonphysical memory pages to the hypervisor, etc. 65*82126ef9SRoger Pau Monné.Ss Xen device drivers 66ed95805eSJohn BaldwinThese para-virtualized drivers are supported: 673b56015bSRobert Watson.Bl -hang -offset indent -width blkfront 683b56015bSRobert Watson.It Nm balloon 693b56015bSRobert WatsonAllow physical memory pages to be returned to the hypervisor as a result of 703b56015bSRobert Watsonmanual tuning or automatic policy. 713b56015bSRobert Watson.It Nm blkback 72cd66b53aSRobert WatsonExports local block devices or files to other Xen domains where they can 73cd66b53aSRobert Watsonthen be imported via 743b56015bSRobert Watson.Nm blkfront . 753b56015bSRobert Watson.It Nm blkfront 763b56015bSRobert WatsonImport block devices from other Xen domains as local block devices, to be 773b56015bSRobert Watsonused for file systems, swap, etc. 783b56015bSRobert Watson.It Nm console 793b56015bSRobert WatsonExport the low-level system console via the Xen console service. 803b56015bSRobert Watson.It Nm control 813b56015bSRobert WatsonProcess management operations from Domain 0, including power off, reboot, 823b56015bSRobert Watsonsuspend, crash, and halt requests. 833b56015bSRobert Watson.It Nm evtchn 843b56015bSRobert WatsonExpose Xen events via the 853b56015bSRobert Watson.Pa /dev/xen/evtchn 863b56015bSRobert Watsonspecial device. 87*82126ef9SRoger Pau Monné.It Nm gntdev 88*82126ef9SRoger Pau MonnéAllow access to the grant table interface via the 89*82126ef9SRoger Pau Monné.Pa /dev/xen/gntdev 90*82126ef9SRoger Pau Monnéspecial device. 913b56015bSRobert Watson.It Nm netback 92055dac5cSRobert WatsonExport local network interfaces to other Xen domains where they can be 933b56015bSRobert Watsonimported via 943b56015bSRobert Watson.Nm netfront . 953b56015bSRobert Watson.It Nm netfront 963b56015bSRobert WatsonImport network interfaces from other Xen domains as local network interfaces, 973b56015bSRobert Watsonwhich may be used for IPv4, IPv6, etc. 98*82126ef9SRoger Pau Monné.It Nm privcmd 99*82126ef9SRoger Pau MonnéAllow issuing hypercalls via the 100*82126ef9SRoger Pau Monné.Pa /dev/xen/privcmd 101*82126ef9SRoger Pau Monnéspecial device. 102*82126ef9SRoger Pau Monné.It Nm timer 103*82126ef9SRoger Pau MonnéImplementation of a one-shot high resolution per-CPU timer using the hypercall 104*82126ef9SRoger Pau Monnéinterface. 105*82126ef9SRoger Pau Monné.It Nm acpi cpu 106*82126ef9SRoger Pau MonnéWhen running as a host forwards power management related information from ACPI 107*82126ef9SRoger Pau Monnéto the hypervisor for better performance management. 1083b56015bSRobert Watson.It Nm xenpci 109cd66b53aSRobert WatsonRepresents the Xen PCI device, an emulated PCI device that is exposed to 110cd66b53aSRobert WatsonHVM domains. 111cd66b53aSRobert WatsonThis device allows detection of the Xen hypervisor, and provides interrupt 112cd66b53aSRobert Watsonand shared memory services required to interact with the hypervisor. 113*82126ef9SRoger Pau Monné.It Nm xenstore 114*82126ef9SRoger Pau MonnéInformation storage space shared between domains. 1153b56015bSRobert Watson.El 1167c472105SRobert Watson.Sh HISTORY 1177c472105SRobert WatsonSupport for 1187c472105SRobert Watson.Nm 1197c472105SRobert Watsonfirst appeared in 1207c472105SRobert Watson.Fx 8.1 . 121*82126ef9SRoger Pau MonnéSupport for host mode was added in 11.0 . 1227c472105SRobert Watson.Sh AUTHORS 1237c472105SRobert Watson.An -nosplit 1247c472105SRobert Watson.Fx 1257c472105SRobert Watsonsupport for Xen was first added by 1266c899950SBaptiste Daroussin.An Kip Macy Aq Mt kmacy@FreeBSD.org 1277c472105SRobert Watsonand 1286c899950SBaptiste Daroussin.An Doug Rabson Aq Mt dfr@FreeBSD.org . 1297c472105SRobert WatsonFurther refinements were made by 1306c899950SBaptiste Daroussin.An Justin Gibbs Aq Mt gibbs@FreeBSD.org , 1316c899950SBaptiste Daroussin.An Adrian Chadd Aq Mt adrian@FreeBSD.org , 132*82126ef9SRoger Pau Monné.An Colin Percival Aq Mt cperciva@FreeBSD.org , 1337c472105SRobert Watsonand 134*82126ef9SRoger Pau Monné.An Roger Pau Monné Aq Mt royger@FreeBSD.org . 1357c472105SRobert WatsonThis manual page was written by 136*82126ef9SRoger Pau Monné.An Robert Watson Aq Mt rwatson@FreeBSD.org , 137*82126ef9SRoger Pau Monnéand 138*82126ef9SRoger Pau Monné.An Roger Pau Monné Aq Mt royger@FreeBSD.org . 139