The Virtual Machine
In recent years, Xen has been a focus point for NetBSD development. Benchmarks of the Xen version 2.0 port showed that it was a faster Domain 0 host than Linux, even when running Linux guests.
The new 3.1 release is the first to support Xen 3.0. Currently, this is only domU (guest OS) support. Users wanting to run Xen virtual machines on a NetBSD host need to either stick with Xen 2.0 or wait for NetBSD 4.0, which is currently in beta and scheduled for release later in the year. Support for Xen 3.0 dom0 is in the development branch and will appear in NetBSD 4.0 when this is branched, but it has not been back-ported to the 3.x branch.
One of the aims of Xen is for the hypervisor to do as little as possible, delegating as much as it can to the domain 0 guest, and each release moves more functionality from Xen to the dom0 OS. To get some idea of what was required to add Xen 3.0 support, I asked Manuel Bouyer, the NetBSD/xen port maintainer:
The main difference is that dom0 and domU talk to each other using the xenstore interface instead of control messages. Code for xenstore had to be added. Then, the virtual device front-end and back-ends had to be adapted to the xenstore interface. There were also minor differences in some hypercalls. For dom0, access to PCI devices is also a bit different; especially the APCI interrupt routing, which was done by the Xen kernel has now to be done by dom0.’