130 likes | 406 Views
FreeBSD Xen status update. Attilio Rao attilio@FreeBSD.org FreeBSD developers summit 2012. XEN. Xen is an hypervisor running in place of the operating system running multiple guest operating systems concurrently. Xen three main components are: Xen hypervisor
E N D
FreeBSD Xen status update Attilio Rao attilio@FreeBSD.org FreeBSD developers summit 2012
XEN • Xen is an hypervisor running in place of the operating system running multiple guest operating systems concurrently. Xen three main components are: • Xen hypervisor • Dom0, privileged domain accessing hw and managing the guest domains • DomU, guest domains • Guest domains can run as: • Paravirtualized guests (PV guests) • HVM guests with hardware help (Hardware Virtual Machine) • PVHVM guests – HVM guests running paravirtualized drivers: faster performance
XEN 4.2 • Release plan: • http://lists.xen.org/archives/html/xen-devel/2012-03/msg00793.html • 19 March -- TODO list locked down • 2 April -- Feature Freeze • Mid/Late April -- First release candidate • Weekly -- RCN+1 until it is ready (likely 8 RCs)
XEN 4.2 • New features xentools: • xl used by default (replacing xend) • oxenstored: xenstored written in ocaml (improved scalability) • libvchan support (cross domain byte-stream comms library) • Remus compression for memory images
XEN 4.2 • New features hypervisor: • Multiple PCI segment support • AMD SVM "DecodeAssist" support • Scheduler timeslice_ms and ratelimit_us • EFI support for HVM • Per-device interrupt remapping • Support for pvhvm guest direct pirq injection • Improvements to paging and sharing, enabling higher VM density • for VDI use-cases
FreeBSD Xen support: current • Current FreeBSD support: • i386 DomU PV support • i386 DomU HVM support • amd64 DomU HVM support • Developers working on Xen support so far: cpercival, gibbs, kenm, kmacy, peter, rrs, rwatson et al.
FreeBSD Xen support: current • Missing: • Complete Dom0 support (amd64, i386, arm?) • XEN hypervisor integration in FreeBSD (toolstack, ring0, etc.) • amd64 DomU PV support • Improvements to existing PV (architecture agnostic) drivers • HVM and PVHVM performance improvements • Cherry Mathew (cherry@) being sponsored by SpectraLogic for further enhachements . • Justin Gibbs (gibbs@) main contributor in the last months.
FreeBSD Xen support: amd64 PV • Code developed on external, private repositories and merged in FreeBSD subversion branch from time to time: • svn://svn.freebsd.org/base/projects/amd64_xen_pv/ • Milestones: • Booting amd64 PV guest single-user mode (with full debugger support on) • Booting amd64 PV guest only UP • Booting amd64 PV guest in full SMP mode • Already completed (amd64 pv): • Kernel bootstrap operations (locore.s, machdep.c, etc.) • Base x86 state structures (interrupts/IDT, trap mappings, GDT and MMU initialization)
FreeBSD Xen support: amd64 PV • In order to fully support UP guests: • Implementing events subsystem • Implementing console driver on top of the events • Adding debugger support using the console • Pmap support rework: • Give the kernel its own address space rather than sharing with the userland (running at the same ring) • Override direct mapping because the hypervisor cannot guarantee >4k pages • More MD glue (examples: scheduler support, cpu_switch()) • Current code needs more reviews!
FreeBSD Xen support: amd64 PV • In order to fully support SMP guests: • MP CPUs probing and configuration • tls support • ipi implementation • Derive event, timer and IPI framework from HVM (unified implementation) • More front-end drivers to increase PV performance: • PV timer • PV SCSI • PV USB • PCI-passthrough • Net frontend driver (requires special care) • others
FreeBSD Xen support: Dom0 • Once amd64 fully supports PV the Dom0 necessary work is summarized as: • backend drivers (blk, net, pci) • dom0 bootup (handling mappings of sharedinfo in guests) • messaging conventions between DomU and Dom0 (NetBSD can be helpful) • making a port of the Xen hypervisor to live in ports tree • Citrix is already working in making toolstack less Linux-centric by getting rid of udev legacy
FreeBSD Xen support: PVHVM • Performance Enhancements • HVM PV Optimized Timer and Event Channel support is up and running • Avoids ~4 VMEXIT traps per-interrupt • PV and HVM PV implementations need to be merged • HVM PV IPI and MSI support is coming soon • Avoids ~2 VMEXIT traps per-interrupt • Benefits: • Per-CPU high resolution event timer source. • More accurate time keeping. Clock drift has been eliminated. • Reduced CPU overhead and latency in physical interrupt delivery • Better SMP scalability • Full PV interrupt code will be SMP capable/safe.
FreeBSD Xen support: contribute Please consider developing a PV driver and start hacking!