]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
lguest: Allow running under paravirt-enabled KVM.
authorRusty Russell <rusty@rustcorp.com.au>
Wed, 17 Aug 2011 00:39:41 +0000 (10:39 +1000)
committerStephen Rothwell <sfr@canb.auug.org.au>
Wed, 17 Aug 2011 00:39:41 +0000 (10:39 +1000)
We actually can run under KVM, as it doesn't paravirtualize anything we
need to use; reduce the check to checking we are the normal ringlevel.

Reported-by: Stefanos Geraggelos <sgerag@cslab.ece.ntua.gr>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au># HG changeset patch
drivers/lguest/core.c

index 2535933c49f83cb9fa8b7488caddf6a20dd8db09..5c13e93898f91f8502c911642fa91075aefcbf79 100644 (file)
@@ -313,7 +313,7 @@ static int __init init(void)
        int err;
 
        /* Lguest can't run under Xen, VMI or itself.  It does Tricky Stuff. */
-       if (paravirt_enabled()) {
+       if (get_kernel_rpl() != 0) {
                printk("lguest is afraid of being a guest\n");
                return -EPERM;
        }