Diff for /wikisrc/ports/xen/howto.mdwn between versions 1.146 and 1.149

version 1.146, 2018/07/26 10:42:35 version 1.149, 2018/07/26 11:00:10
Line 6  Introduction Line 6  Introduction
 [![[Xen  [![[Xen
 screenshot]](https://www.netbsd.org/gallery/in-Action/hubertf-xens.png)](https://www.netbsd.org/gallery/in-Action/hubertf-xen.png)  screenshot]](https://www.netbsd.org/gallery/in-Action/hubertf-xens.png)](https://www.netbsd.org/gallery/in-Action/hubertf-xen.png)
   
 Xen is a hypervisor (or virtual machine monitor) for x86 hardware  Xen is a hypervisor for x86 hardware, which supports running multiple guest
 (i686-class or higher), which supports running multiple guest  
 operating systems on a single physical machine.  Xen is a Type 1 or  operating systems on a single physical machine.  Xen is a Type 1 or
 bare-metal hypervisor; one uses the Xen kernel to control the CPU,  bare-metal hypervisor; one uses the Xen kernel to control the CPU,
 memory and console, a dom0 operating system which mediates access to  memory and console, a dom0 operating system which mediates access to
 other hardware (e.g., disks, network, USB), and one or more domU  other hardware (e.g., disks, network, USB), and one or more domU
 operating systems which operate in an unprivileged virtualized  operating systems which operate in an unprivileged virtualized
 environment.  IO requests from the domU systems are forwarded by the  environment.  IO requests from the domU systems are forwarded by the
 hypervisor (Xen) to the dom0 to be fulfilled.  Xen hypervisor to the dom0 to be fulfilled.
   
 Xen supports two styles of guests.  The original is Para-Virtualized  Xen supports different styles of guest:
 (PV) which means that the guest OS does not attempt to access hardware  
 directly, but instead makes hypercalls to the hypervisor.  This is  [[!table data="""
 analogous to a user-space program making system calls.  (The dom0  Style of guest  |Supported by NetBSD
 operating system uses PV calls for some functions, such as updating  PV              |Yes
 memory mapping page tables, but has direct hardware access for disk  HVM             |Yes
 and network.)   PV guests must be specifically coded for Xen.  PVHVM           |No
   PVH             |No
 The more recent style is HVM, which means that the guest does not have  """]]
 code for Xen and need not be aware that it is running under Xen.  
 Attempts to access hardware registers are trapped and emulated.  This  In Para-Virtualized (PV) mode, the guest OS does not attempt to access
 style is less efficient but can run unmodified guests.  hardware directly, but instead makes hypercalls to the hypervisor; PV
   guests must be specifically coded for Xen. In HVM mode, no guest
   modification is required; however, hardware support is required, such
   as VT-x on Intel CPUs and SVM on AMD CPUs.
   
 Generally any machine that runs NetBSD/amd64 will work with Xen and PV  
 guests.  In theory i386 computers (without x86_64/amd64 support) can  
 be used for Xen <= 4.2, but we have no recent reports of this working  
 (this is a hint).  For HVM guests, hardware support is needed, but it  
 is common on recent machines.  For Intel CPUs, one needs the VT-x  
 extension, shown in "cpuctl identify 0" as VMX.  For AMD CPUs, one  
 needs the AMD-V extensions, shown in "cpuctl identify 0" as SVM.  
 There are further features for IOMMU virtualization, Intel's VT-d and  There are further features for IOMMU virtualization, Intel's VT-d and
 AMD's AMD-Vi.  TODO: Explain whether Xen on NetBSD makes use of these  AMD's AMD-Vi.  TODO: Explain whether Xen on NetBSD makes use of these
 features.  TODO: Review by someone who really understands this.  features.  TODO: Review by someone who really understands this.
   
 Note that a FreeBSD dom0 requires VT-x and VT-d (or equivalent); this  Generally any machine that runs NetBSD/amd64 will work with Xen and PV
 is because the FreeBSD dom0 does not run in PV mode.  guests.  In theory i386 computers (without x86_64/amd64 support) can
   be used for Xen <= 4.2, but we have no recent reports of this working
   (this is a hint).  For HVM guests, hardware support is needed, but it
   is common on recent machines.
   
 At boot, the dom0 kernel is loaded as a module with Xen as the kernel.  At boot, the dom0 kernel is loaded as a module with Xen as the kernel.
 The dom0 can start one or more domUs.  (Booting is explained in detail  The dom0 can start one or more domUs.  (Booting is explained in detail
Line 111  See also the [Xen Security Advisory page Line 109  See also the [Xen Security Advisory page
   
 Note: Xen 4.2 was the last version to support 32bit CPUs.  Note: Xen 4.2 was the last version to support 32bit CPUs.
   
 Note that NetBSD support is called XEN3.  It works with Xen 3 and Xen  
 4 because the hypercall interface has been stable.  
   
 Xen command program  Xen command program
 -------------------  -------------------
   
Line 138  xbd, where a vnd must be allocated).  Bu Line 133  xbd, where a vnd must be allocated).  Bu
 been adequately tested for a complex custom setup with a large number  been adequately tested for a complex custom setup with a large number
 of interfaces.  of interfaces.
   
 NetBSD  NetBSD versions
 ------  ---------------
   
 The netbsd-7, netbsd-8, and -current branches are all reasonable  The netbsd-7, netbsd-8, and -current branches are all reasonable
 choices, with more or less the same considerations for non-Xen use.  choices, with more or less the same considerations for non-Xen use.
 Therefore, netbsd-8 is recommended as the stable version of the most  NetBSD 8 is recommended as the stable version of the most recent
 recent release for production use.  release for production use.
   
 For developing Xen, netbsd-current may be appropriate.  For developing Xen, netbsd-current may be appropriate.
   
Line 153  no SMP support for NetBSD as dom0.  (The Line 148  no SMP support for NetBSD as dom0.  (The
 need SMP for dom0 functions; the lack of support is really a problem  need SMP for dom0 functions; the lack of support is really a problem
 when using a dom0 as a normal computer.)  when using a dom0 as a normal computer.)
   
   Note: NetBSD support is called XEN3. However, it does support Xen 4,
   because the hypercall interface has remained identical.
   
 Architecture  Architecture
 ------------  ------------
   
Line 194  caution that the total situation is comp Line 192  caution that the total situation is comp
 understood. On top of that caution, the post is about Linux, not  understood. On top of that caution, the post is about Linux, not
 NetBSD.  TODO: Include link to benchmarks, if someone posts them.  NetBSD.  TODO: Include link to benchmarks, if someone posts them.
   
 Stability  
 ---------  
   
 Mostly, NetBSD as a dom0 or domU is quite stable. However, just like every  
 other architecture, there are some open PRs indicating problems.  
   
 Note also that there are issues with sparse vnd(4) instances, but  
 these are not about Xen -- they just are noticed with sparse vnd(4)  
 instances in support of virtual disks in a dom0.  
   
 Recommendation  Recommendation
 --------------  --------------
   

Removed from v.1.146  
changed lines
  Added in v.1.149


CVSweb for NetBSD wikisrc <wikimaster@NetBSD.org> software: FreeBSD-CVSweb