Andrew Morton [interview [1]] sent out the latest lguest [2] patches for review, noting that he intends to merge the code into the mainline kernel, "some concern was expressed over the lguest review status, so I shall send the patches out again for people to review, to test, to make observations about the author's personal appearance, etc. I'll plan on sending these patches off to Linus in a week's time, assuming all goes well." The project's FAQ [3] notes, "lguest is designed to be simple to use and modify, with the aim of keeping the codebase small. Currently it's around 5000 lines including userspace utility, whereas kvm is over 10 times that size, and Xen is around 10 times bigger again (of course, both have far more features)."
The lguest patches are written and maintained by Rusty Russell [interview [4]] who also authored Rusty's Remarkably Unreliable Guide to Lguest [5], the project's documentation. The guide explains, "lguest is designed to be a minimal hypervisor for the Linux kernel, for Linux developers and users to experiment with virtualization with the minimum of complexity. Nonetheless, it should have sufficient features to make it useful for specific tasks, and, of course, you are encouraged to fork and enhance it." In the FAQ, lguest is compared to kvm [story [6]], "kvm requires hardware virtualization support (most recent Intel and AMD chips have it), but it can run almost any Operating System (since it does full virtualization. It also has 64-bit support. Lguest doesn't do full virtualization: it only runs a Linux kernel with lguest support." The FAQ also compares lguest to Xen, "Xen is similar, in that it doesn't need hardware virtualization support (although it can use it), but Xen supports an extensive range of features such as PAE (ie. lots of memory), SMP guests, 64-bit. You have to boot your kernel under the Xen hypervisor; you can't simply modprobe when you want to create a guest."
From: Andrew Morton [7] [email blocked] To: linux-kernel, virtualization [email blocked] Subject: lguest re-review Date: Wed, 9 May 2007 02:51:22 -0700 Some concern was expressed over the lguest review status, so I shall send the patches out again for people to review, to test, to make observations about the author's personal appearance, etc. I'll plan on sending these patches off to Linus in a week's time, assuming all goes well. Thanks.
From: Andrew Morton [8] [email blocked] Subject: [patch 1/9] lguest: export symbols for lguest as a module Date: Wed, 09 May 2007 02:51:34 -0700 From: Rusty Russell [9] [email blocked] lguest does some fairly lowlevel things to support a host, which normal modules don't need: math_state_restore: When the guest triggers a Device Not Available fault, we need to be able to restore the FPU __put_task_struct: We need to hold a reference to another task for inter-guest I/O, and put_task_struct() is an inline function which calls __put_task_struct. access_process_vm: We need to access another task for inter-guest I/O. map_vm_area & __get_vm_area: We need to map the switcher shim (ie. monitor) at 0xFFC01000. Signed-off-by: Rusty Russell [email blocked] Signed-off-by: Andrew Morton <akpm@linux-foundation.org> --- arch/i386/kernel/traps.c | 1 + kernel/fork.c | 1 + mm/memory.c | 1 + mm/vmalloc.c | 2 ++ 4 files changed, 5 insertions(+)
From: Andrew Morton [10] [email blocked] Subject: [patch 2/9] lguest: the guest code Date: Wed, 09 May 2007 02:51:34 -0700 From: Rusty Russell [11] [email blocked] lguest is a simple hypervisor for Linux on Linux. Unlike kvm it doesn't need VT/SVM hardware. Unlike Xen it's simply "modprobe and go". Unlike both, it's 5000 lines and self-contained. Performance is ok, but not great (-30% on kernel compile). But given its hackability, I expect this to improve, along with the paravirt_ops code which it supplies a complete example for. There's also a 64-bit version being worked on and other craziness. But most of all, lguest is awesome fun! Too much of the kernel is a big ball of hair. lguest is simple enough to dive into and hack, plus has some warts which scream "fork me!". This patch: This is the code and headers required to make an i386 kernel an lguest guest. Signed-off-by: Rusty Russell [email blocked] Signed-off-by: Andrew Morton [email blocked] --- drivers/lguest/lguest.c | 497 ++++++++++++++++++++++++++++++++++ drivers/lguest/lguest_asm.S | 53 +++ drivers/lguest/lguest_bus.c | 148 ++++++++++ include/linux/lguest.h | 85 +++++ include/linux/lguest_bus.h | 33 ++ 5 files changed, 816 insertions(+)
Related Links:
- Archive of above thread [12]
- KernelTrap interview with Andrew Morton [13]
- KernelTrap interview with Rusty Russell [14]