]> git.karo-electronics.de Git - karo-tx-linux.git/blobdiff - drivers/lguest/core.c
lguest: Reboot support
[karo-tx-linux.git] / drivers / lguest / core.c
index 35d19ae58de7eeb30b6ef60dad58ed4a518b4e6f..c1069bceba11dde196f02e75f691e3ed873565ba 100644 (file)
@@ -128,9 +128,12 @@ static void unmap_switcher(void)
                __free_pages(switcher_page[i], 0);
 }
 
-/*L:305
+/*H:032
  * Dealing With Guest Memory.
  *
+ * Before we go too much further into the Host, we need to grok the routines
+ * we use to deal with Guest memory.
+ *
  * When the Guest gives us (what it thinks is) a physical address, we can use
  * the normal copy_from_user() & copy_to_user() on the corresponding place in
  * the memory region allocated by the Launcher.
@@ -232,6 +235,8 @@ int run_guest(struct lguest *lg, unsigned long __user *user)
                lguest_arch_handle_trap(lg);
        }
 
+       if (lg->dead == ERR_PTR(-ERESTART))
+               return -ERESTART;
        /* The Guest is dead => "No such file or directory" */
        return -ENOENT;
 }
@@ -250,7 +255,7 @@ static int __init init(void)
 
        /* Lguest can't run under Xen, VMI or itself.  It does Tricky Stuff. */
        if (paravirt_enabled()) {
-               printk("lguest is afraid of %s\n", pv_info.name);
+               printk("lguest is afraid of being a guest\n");
                return -EPERM;
        }