xref: /freebsd/share/man/man4/xen.4 (revision a90b9d0159070121c221b966469c3e36d912bf82)
1.\" Copyright (c) 2010 Robert N. M. Watson
2.\" All rights reserved.
3.\"
4.\" This software was developed by SRI International and the University of
5.\" Cambridge Computer Laboratory under DARPA/AFRL contract FA8750-10-C-0237
6.\" ("CTSRD"), as part of the DARPA CRASH research program.
7.\"
8.\" Redistribution and use in source and binary forms, with or without
9.\" modification, are permitted provided that the following conditions
10.\" are met:
11.\" 1. Redistributions of source code must retain the above copyright
12.\"    notice, this list of conditions and the following disclaimer.
13.\" 2. Redistributions in binary form must reproduce the above copyright
14.\"    notice, this list of conditions and the following disclaimer in the
15.\"    documentation and/or other materials provided with the distribution.
16.\"
17.\" THIS SOFTWARE IS PROVIDED BY THE AUTHORS AND CONTRIBUTORS ``AS IS'' AND
18.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
19.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
20.\" ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE
21.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
22.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
23.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
24.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
25.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
26.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
27.\" SUCH DAMAGE.
28.\"
29.Dd January 8, 2024
30.Dt XEN 4
31.Os
32.Sh NAME
33.Nm xen
34.Nd Xen Hypervisor Support
35.Sh SYNOPSIS
36FreeBSD supports running both as a Xen guest and host on amd64 hardware.
37Guest support is limited to HVM and PVH modes, while host support is limited to
38PVH mode only.
39.Pp
40Xen support is built by default in the i386 and amd64 GENERIC kernels; note
41however that host mode is only available on amd64.
42.Ed
43.Sh DESCRIPTION
44The Xen Hypervisor allows multiple virtual machines to be run on a single
45computer system.
46When first released, Xen required that i386 kernels be compiled
47"para-virtualized" as the x86 instruction set was not fully virtualizable.
48Primarily, para-virtualization modifies the virtual memory system to use
49hypervisor calls (hypercalls) rather than direct hardware instructions to
50modify the TLB, although para-virtualized device drivers were also required
51to access resources such as virtual network interfaces and disk devices.
52.Pp
53With later instruction set extensions from AMD and Intel to support fully
54virtualizable instructions, unmodified virtual memory systems can also be
55supported; this is referred to as hardware-assisted virtualization (HVM and PVH).
56HVM configurations may either rely on transparently emulated hardware
57peripherals, or para-virtualized drivers, which are aware of virtualization,
58and hence able to optimize certain behaviors to improve performance or
59semantics.
60PVH configurations rely on para-virtualized drivers exclusively for IO.
61.Pp
62.Fx
63Para-virtualized device drivers are required in order to support certain
64functionality, such as processing management requests, returning idle
65physical memory pages to the hypervisor, etc.
66.Ss Xen device drivers
67These para-virtualized drivers are supported:
68.Bl -hang -offset indent -width blkfront
69.It Nm balloon
70Allow physical memory pages to be returned to the hypervisor as a result of
71manual tuning or automatic policy.
72.It Nm blkback
73Exports local block devices or files to other Xen domains where they can
74then be imported via
75.Nm blkfront .
76.It Nm blkfront
77Import block devices from other Xen domains as local block devices, to be
78used for file systems, swap, etc.
79.It Nm console
80Export the low-level system console via the Xen console service.
81.It Nm control
82Process management operations from Domain 0, including power off, reboot,
83suspend, crash, and halt requests.
84.It Nm evtchn
85Expose Xen events via the
86.Pa /dev/xen/evtchn
87special device.
88.It Nm gntdev
89Allow access to the grant table interface via the
90.Pa /dev/xen/gntdev
91special device.
92.It Nm netback
93Export local network interfaces to other Xen domains where they can be
94imported via
95.Nm netfront .
96.It Nm netfront
97Import network interfaces from other Xen domains as local network interfaces,
98which may be used for IPv4, IPv6, etc.
99.It Nm privcmd
100Allow issuing hypercalls via the
101.Pa /dev/xen/privcmd
102special device.
103.It Nm timer
104Implementation of a one-shot high resolution per-CPU timer using the hypercall
105interface.
106.It Nm acpi cpu
107When running as a host forwards power management related information from ACPI
108to the hypervisor for better performance management.
109.It Nm xenpci
110Represents the Xen PCI device, an emulated PCI device that is exposed to
111HVM domains.
112This device allows detection of the Xen hypervisor, and provides interrupt
113and shared memory services required to interact with the hypervisor.
114.It Nm xenstore
115Information storage space shared between domains.
116.El
117.Sh HISTORY
118Support for
119.Nm
120first appeared in
121.Fx 8.1 .
122Support for host mode was added in 11.0 .
123.Sh AUTHORS
124.An -nosplit
125.Fx
126support for Xen was first added by
127.An Kip Macy Aq Mt kmacy@FreeBSD.org
128and
129.An Doug Rabson Aq Mt dfr@FreeBSD.org .
130Further refinements were made by
131.An Justin Gibbs Aq Mt gibbs@FreeBSD.org ,
132.An Adrian Chadd Aq Mt adrian@FreeBSD.org ,
133.An Colin Percival Aq Mt cperciva@FreeBSD.org ,
134and
135.An Roger Pau Monné Aq Mt royger@FreeBSD.org .
136This manual page was written by
137.An Robert Watson Aq Mt rwatson@FreeBSD.org ,
138and
139.An Roger Pau Monné Aq Mt royger@FreeBSD.org .
140