2010-12-13 23:30:56 +00:00
|
|
|
.\" Copyright (c) 2010 Robert N. M. Watson
|
|
|
|
.\" All rights reserved.
|
|
|
|
.\"
|
2012-03-29 05:02:12 +00:00
|
|
|
.\" This software was developed by SRI International and the University of
|
2010-12-13 23:30:56 +00:00
|
|
|
.\" Cambridge Computer Laboratory under DARPA/AFRL contract FA8750-10-C-0237
|
|
|
|
.\" ("CTSRD"), as part of the DARPA CRASH research program.
|
|
|
|
.\"
|
|
|
|
.\" Redistribution and use in source and binary forms, with or without
|
|
|
|
.\" modification, are permitted provided that the following conditions
|
|
|
|
.\" are met:
|
|
|
|
.\" 1. Redistributions of source code must retain the above copyright
|
|
|
|
.\" notice, this list of conditions and the following disclaimer.
|
|
|
|
.\" 2. Redistributions in binary form must reproduce the above copyright
|
|
|
|
.\" notice, this list of conditions and the following disclaimer in the
|
|
|
|
.\" documentation and/or other materials provided with the distribution.
|
|
|
|
.\"
|
|
|
|
.\" THIS SOFTWARE IS PROVIDED BY THE AUTHORS AND CONTRIBUTORS ``AS IS'' AND
|
|
|
|
.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
|
|
|
.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
|
|
|
.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE
|
|
|
|
.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
|
|
|
.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
|
|
|
.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
|
|
|
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
|
|
|
.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
|
|
|
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
|
|
|
.\" SUCH DAMAGE.
|
|
|
|
.\"
|
|
|
|
.\" $FreeBSD$
|
|
|
|
.\"
|
2015-04-30 15:25:30 +00:00
|
|
|
.Dd April 30, 2015
|
2010-12-13 23:30:56 +00:00
|
|
|
.Dt XEN 4
|
|
|
|
.Os
|
|
|
|
.Sh NAME
|
2012-03-29 05:02:12 +00:00
|
|
|
.Nm xen
|
2010-12-13 23:30:56 +00:00
|
|
|
.Nd Xen Hypervisor Guest (DomU) Support
|
|
|
|
.Sh SYNOPSIS
|
2010-12-17 11:25:37 +00:00
|
|
|
To compile hardware-assisted virtualization (HVM) Xen guest support with
|
2015-04-30 15:25:30 +00:00
|
|
|
para-virtualized drivers into an amd64 or i386 kernel,
|
|
|
|
place the following lines in your kernel configuration file:
|
2010-12-13 23:30:56 +00:00
|
|
|
.Bd -ragged -offset indent
|
|
|
|
.Cd "options XENHVM"
|
|
|
|
.Cd "device xenpci"
|
|
|
|
.Ed
|
|
|
|
.Sh DESCRIPTION
|
|
|
|
The Xen Hypervisor allows multiple virtual machines to be run on a single
|
|
|
|
computer system.
|
|
|
|
When first released, Xen required that i386 kernels be compiled
|
|
|
|
"para-virtualized" as the x86 instruction set was not fully virtualizable.
|
2010-12-14 09:32:37 +00:00
|
|
|
Primarily, para-virtualization modifies the virtual memory system to use
|
|
|
|
hypervisor calls (hypercalls) rather than direct hardware instructions to
|
|
|
|
modify the TLB, although para-virtualized device drivers were also required
|
|
|
|
to access resources such as virtual network interfaces and disk devices.
|
|
|
|
.Pp
|
2010-12-13 23:30:56 +00:00
|
|
|
With later instruction set extensions from AMD and Intel to support fully
|
2010-12-14 09:32:37 +00:00
|
|
|
virtualizable instructions, unmodified virtual memory systems can also be
|
|
|
|
supported; this is referred to as hardware-assisted virtualization (HVM).
|
|
|
|
HVM configurations may either rely on transparently emulated hardware
|
|
|
|
peripherals, or para-virtualized drivers, which are aware of virtualization,
|
|
|
|
and hence able to optimize certain behaviors to improve performance or
|
|
|
|
semantics.
|
2010-12-13 23:30:56 +00:00
|
|
|
.Pp
|
|
|
|
.Fx
|
2015-04-30 15:48:48 +00:00
|
|
|
supports hardware-assisted virtualization (HVM) on both i386 and amd64
|
|
|
|
kernels.
|
2010-12-13 23:30:56 +00:00
|
|
|
.Pp
|
|
|
|
Para-virtualized device drivers are required in order to support certain
|
2010-12-14 09:32:37 +00:00
|
|
|
functionality, such as processing management requests, returning idle
|
2010-12-17 10:05:21 +00:00
|
|
|
physical memory pages to the hypervisor, etc.
|
2010-12-17 01:30:56 +00:00
|
|
|
.Ss Xen DomU device drivers
|
2015-04-30 15:48:48 +00:00
|
|
|
These para-virtualized drivers are supported:
|
2010-12-14 09:32:37 +00:00
|
|
|
.Bl -hang -offset indent -width blkfront
|
|
|
|
.It Nm balloon
|
|
|
|
Allow physical memory pages to be returned to the hypervisor as a result of
|
|
|
|
manual tuning or automatic policy.
|
|
|
|
.It Nm blkback
|
2010-12-17 01:30:56 +00:00
|
|
|
Exports local block devices or files to other Xen domains where they can
|
|
|
|
then be imported via
|
2010-12-14 09:32:37 +00:00
|
|
|
.Nm blkfront .
|
|
|
|
.It Nm blkfront
|
|
|
|
Import block devices from other Xen domains as local block devices, to be
|
|
|
|
used for file systems, swap, etc.
|
|
|
|
.It Nm console
|
|
|
|
Export the low-level system console via the Xen console service.
|
|
|
|
.It Nm control
|
|
|
|
Process management operations from Domain 0, including power off, reboot,
|
|
|
|
suspend, crash, and halt requests.
|
|
|
|
.It Nm evtchn
|
|
|
|
Expose Xen events via the
|
|
|
|
.Pa /dev/xen/evtchn
|
|
|
|
special device.
|
|
|
|
.It Nm netback
|
2010-12-17 10:05:21 +00:00
|
|
|
Export local network interfaces to other Xen domains where they can be
|
2010-12-14 09:32:37 +00:00
|
|
|
imported via
|
|
|
|
.Nm netfront .
|
|
|
|
.It Nm netfront
|
|
|
|
Import network interfaces from other Xen domains as local network interfaces,
|
|
|
|
which may be used for IPv4, IPv6, etc.
|
|
|
|
.It Nm pcifront
|
2010-12-17 01:30:56 +00:00
|
|
|
Allow physical PCI devices to be passed through into a PV domain.
|
2010-12-14 09:32:37 +00:00
|
|
|
.It Nm xenpci
|
2010-12-17 01:30:56 +00:00
|
|
|
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.
|
2010-12-14 09:32:37 +00:00
|
|
|
.El
|
2010-12-17 01:30:56 +00:00
|
|
|
.Ss Performance considerations
|
2010-12-14 09:32:37 +00:00
|
|
|
In general, PV drivers will perform better than emulated hardware, and are
|
2010-12-17 01:30:56 +00:00
|
|
|
the recommended configuration for HVM installations.
|
2010-12-14 09:32:37 +00:00
|
|
|
.Pp
|
|
|
|
Using a hypervisor introduces a second layer of scheduling that may limit the
|
|
|
|
effectiveness of certain
|
|
|
|
.Fx
|
|
|
|
scheduling optimisations.
|
|
|
|
Among these is adaptive locking, which is no longer able to determine whether
|
|
|
|
a thread holding a lock is in execution.
|
|
|
|
It is recommended that adaptive locking be disabled when using Xen:
|
2010-12-14 10:06:28 +00:00
|
|
|
.Bd -unfilled -offset indent
|
2010-12-14 09:32:37 +00:00
|
|
|
.Cd "options NO_ADAPTIVE_MUTEXES"
|
|
|
|
.Cd "options NO_ADAPTIVE_RWLOCKS"
|
|
|
|
.Cd "options NO_ADAPTIVE_SX"
|
|
|
|
.Ed
|
2010-12-13 23:30:56 +00:00
|
|
|
.Sh HISTORY
|
|
|
|
Support for
|
|
|
|
.Nm
|
|
|
|
first appeared in
|
|
|
|
.Fx 8.1 .
|
|
|
|
.Sh AUTHORS
|
|
|
|
.An -nosplit
|
|
|
|
.Fx
|
|
|
|
support for Xen was first added by
|
2014-06-26 21:46:14 +00:00
|
|
|
.An Kip Macy Aq Mt kmacy@FreeBSD.org
|
2010-12-13 23:30:56 +00:00
|
|
|
and
|
2014-06-26 21:46:14 +00:00
|
|
|
.An Doug Rabson Aq Mt dfr@FreeBSD.org .
|
2010-12-13 23:30:56 +00:00
|
|
|
Further refinements were made by
|
2014-06-26 21:46:14 +00:00
|
|
|
.An Justin Gibbs Aq Mt gibbs@FreeBSD.org ,
|
|
|
|
.An Adrian Chadd Aq Mt adrian@FreeBSD.org ,
|
2010-12-13 23:30:56 +00:00
|
|
|
and
|
2014-06-26 21:46:14 +00:00
|
|
|
.An Colin Percival Aq Mt cperciva@FreeBSD.org .
|
2010-12-13 23:30:56 +00:00
|
|
|
This manual page was written by
|
2014-06-26 21:46:14 +00:00
|
|
|
.An Robert Watson Aq Mt rwatson@FreeBSD.org .
|
2010-12-13 23:30:56 +00:00
|
|
|
.Sh BUGS
|
|
|
|
.Fx
|
|
|
|
is only able to run as a Xen guest (DomU) and not as a Xen host (Dom0).
|
|
|
|
.Pp
|
2010-12-17 01:30:56 +00:00
|
|
|
As of this release, Xen PV DomU support is not heavily tested; instability
|
|
|
|
has been reported during VM migration of PV kernels.
|
|
|
|
.Pp
|
|
|
|
Certain PV driver features, such as the balloon driver, are under-exercised.
|