Free BSD Xen status update Attilio Rao attilioFree
Free. BSD Xen status update Attilio Rao attilio@Free. BSD. org Free. BSD 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 • Dom 0, privileged domain accessing hw and managing the guest domains • Dom. U, 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/msg 00793. 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 "Decode. Assist" 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
Free. BSD Xen support: current Current Free. BSD support: • i 386 Dom. U PV support • i 386 Dom. U HVM support • amd 64 Dom. U HVM support Developers working on Xen support so far: cpercival, gibbs, kenm, kmacy, peter, rrs, rwatson et al.
Free. BSD Xen support: current Missing: • Complete Dom 0 support (amd 64, i 386, arm? ) • XEN hypervisor integration in Free. BSD (toolstack, ring 0, etc. ) • amd 64 Dom. U PV support • Improvements to existing PV (architecture agnostic) drivers • HVM and PVHVM performance improvements Cherry Mathew (cherry@) being sponsored by Spectra. Logic for further enhachements. Justin Gibbs (gibbs@) main contributor in the last months.
Free. BSD Xen support: amd 64 PV Code developed on external, private repositories and merged in Free. BSD subversion branch from time to time: svn: //svn. freebsd. org/base/projects/amd 64_xen_pv/ Milestones: • Booting amd 64 PV guest single-user mode (with full debugger support on) • Booting amd 64 PV guest only UP • Booting amd 64 PV guest in full SMP mode Already completed (amd 64 pv): • Kernel bootstrap operations (locore. s, machdep. c, etc. ) • Base x 86 state structures (interrupts/IDT, trap mappings, GDT and MMU initialization)
Free. BSD Xen support: amd 64 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 >4 k pages • More MD glue (examples: scheduler support, cpu_switch()) Current code needs more reviews!
Free. BSD Xen support: amd 64 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
Free. BSD Xen support: Dom 0 Once amd 64 fully supports PV the Dom 0 necessary work is summarized as: • backend drivers (blk, net, pci) • dom 0 bootup (handling mappings of sharedinfo in guests) • messaging conventions between Dom. U and Dom 0 (Net. BSD 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
Free. BSD 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.
Free. BSD Xen support: contribute Please consider developing a PV driver and start hacking!
- Slides: 13