login
Header Space

 
 

Linux: Merging lguest

May 9, 2007 - 7:40am
Submitted by Jeremy on May 9, 2007 - 7:40am.
Linux news

Andrew Morton [interview] sent out the latest lguest 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 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] who also authored Rusty's Remarkably Unreliable Guide to Lguest, 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], "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 [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 [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 [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 [email blocked] Subject: [patch 2/9] lguest: the guest code Date: Wed, 09 May 2007 02:51:34 -0700 From: Rusty Russell [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:

UML

May 9, 2007 - 10:37am
Anonymous (not verified)

How does Lguest differ from UML (User Mode Linux)?

UML is not virtualization.

May 9, 2007 - 2:53pm
Anonymous (not verified)

UML is not virtualization.

Explain.

May 9, 2007 - 4:53pm
Anonymous (not verified)

Explain.

I think he meant UML doesn't

May 14, 2007 - 11:10am
Anonymous (not verified)

I think he meant UML doesn't take advantage of the new CPU hardware virtualization features, whereas LGuest does.

UML vs LGuest

May 9, 2007 - 4:35pm
Anonymous (not verified)

The UML kernel is specially compiled for the UML architecture, so it can't run on real hardware. To the real kernel, the UML kernel is just a normal user process with no special privleges.

LGuest requires a module in the real kernel, then loads up the same (?) kernel to run virtually. Because it has real-kernel support, LGuest should be much faster than UML.

Re: UML

May 10, 2007 - 9:05pm
Rusty Russell (not verified)

Thanks, I added this to the FAQ!

Email blocking

May 11, 2007 - 4:54pm

Hmmm... Andrew's email address didn't get blocked. Is it the hyphen in the middle?

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
speck-geostationary