Last year there was a lot of talk from Citrix, XenSource, and Oracle about the acceptance of certain Xen code and drivers into the Linux 3.0 kernel. I still hear it today. They’re implying that it means the Xen has been as tightly integrated into the Linux kernel as KVM. And I’m here to tell you that they are wrong.
Here’s what Oracle and Citrix have said on the matter:
“I’ve heard over the last few years, competitors use “There is no Xen support in Linux” as a tagline to create FUD with the Xen userbase and promote alternatives. Well, it’s all there people.” — Wim Coekaert, Oracle
“During all the fuss of Citrix Synergy last week, an event of pretty earth-shattering importance occurred in the open source world: all key Xen code was accepted into the Linux mainline kernel.” – Simon Crosby, Citrix
Wrong!
The Oracle and Citrix marketing on this issue are misleading to say the least. It implies that the recent acceptance of some Xen enablement code into the Linux kernel equates to integration, or that the Xen architecture doesn’t matter now that some of their code is in Linux.
KVM is still the only Linux kernel-integrated hypervisor technology. End of sentence. End of story.
There is no special KVM enablement needed in the Linux kernel. KVM is integrated into the Linux kernel. KVM uses Linux for everything from device management to CPU scheduling, memory page sharing, better algorithms for making use of lots of cores and lots of memory, and tying into all the hardware virtualization technology AMD and Intel have been building into x86 for the past 5 years.
Xen is no more mainline or mainstream today in 2012 when it comes to Linux than it was in 2007 when KVM was accepted into the Linux kernel, or 2009 when Red Hat decided to move forward with KVM instead of Xen and integrated KVM into RHEL.
OK, then, what’s the Real Scoop?
Xen has still not been accepted (and probably never will be) into the Linux kernel, and cannot leverage directly Linux technologies such as transparent huge pages, CFS scheduler, paging, memory overcommitment with KSM, etc. for its hypervisor technology. You still need to install the Xen kernel on bare metal and build a special VM called a Dom0 to manage it and to provide device drivers. And you still have the suboptimal Xen architecture with Xen-Dom0-DomU. See the ugly diagrams below for more details.
The announcement of Xen and Linux 3.0 means two (and only two) things:
1. The paravirtualized drivers that Xen uses will be integrated into Linux starting with 3.0. This means that just like virtio (KVM/Libvirt) and pv-scsi (VMware), the pv-ops drivers used for accelerated disk and NIC will be available in any Linux 3.x+ guest without having to integrate drivers. This leaves Microsoft Hyper-V alone in requiring integrating drivers for guests.
2. A Linux 3.0 or higher guest can be used unmodified as a Dom0. Remember Dom0 is where the console operating system resides and is also a slave for certain IO from the guests. It is not Xen itself. Xen still resides on the bare metal and is still a separate project from Linux that has to duplicate effort to support hardware and new virtualization technologies.
In summary, it will be slightly easier to use future versions of Linux guests with current and future versions of Xen, and it will be slightly easier to use future versions of Linux as a Dom0 for current and future versions of Xen.
If you want to use a pre-3.0 Linux as a Dom0 it won’t work without modifications. If you want to use pre-3.0 Linux guests, you still need to hack in the drivers.
Not such a big deal after all. So does this change anything for KVM?
In a word, No.
One of KVM’s strengths is that it is integrated into the Linux kernel and therefore can utilize Linux features for things that hypervisors do besides just being a hypervisor.
Xen hypervisor is still a separate project and a completely separate code base, and features that KVM can use for virtualization and inherits from Linux (scheduling, paging, frequency scaling and hardware enablement, for example) will still need to be separately implemented in Xen. This is part of the design of Xen and is not going to change.
KVM Architecture
Elegant, isn’t it?

Xen Architecture
What a mess…


What did they say? Word for word. I’m taking down names.
Here’s links to the various blogs Citrix and Oracle have put out:
http://blogs.citrix.com/2011/05/30/xen-celebrates-the-final-step-of-a-four-year-odyssey/
http://blogs.oracle.com/wim/entry/linux_mainline_contains_all_the