]> err.no Git - linux-2.6/blobdiff - drivers/lguest/lg.h
Remove fixed limit on number of guests, and lguests array.
[linux-2.6] / drivers / lguest / lg.h
index 64f0abed317c2fbb6afe4c7d3ca881c163353ef7..c9d1dc29490d374b5185daeab9789b148e10cf6f 100644 (file)
@@ -12,7 +12,6 @@
 #include <linux/types.h>
 #include <linux/init.h>
 #include <linux/stringify.h>
-#include <linux/binfmts.h>
 #include <linux/futex.h>
 #include <linux/lguest.h>
 #include <linux/lguest_launcher.h>
@@ -52,9 +51,9 @@ struct lguest_dma_info
        struct list_head list;
        union futex_key key;
        unsigned long dmas;
+       struct lguest *owner;
        u16 next_dma;
        u16 num_dmas;
-       u16 guestid;
        u8 interrupt;   /* 0 when not registered */
 };
 
@@ -141,8 +140,10 @@ struct lguest
        struct lguest_data __user *lguest_data;
        struct task_struct *tsk;
        struct mm_struct *mm;   /* == tsk->mm, but that becomes NULL on exit */
-       u16 guestid;
        u32 pfn_limit;
+       /* This provides the offset to the base of guest-physical
+        * memory in the Launcher. */
+       void __user *mem_base;
        u32 page_offset;
        u32 cr2;
        int halted;
@@ -193,7 +194,6 @@ struct lguest
        DECLARE_BITMAP(irqs_pending, LGUEST_IRQS);
 };
 
-extern struct lguest lguests[];
 extern struct mutex lguest_lock;
 
 /* core.c: */
@@ -201,7 +201,6 @@ u32 lgread_u32(struct lguest *lg, unsigned long addr);
 void lgwrite_u32(struct lguest *lg, unsigned long addr, u32 val);
 void lgread(struct lguest *lg, void *buf, unsigned long addr, unsigned len);
 void lgwrite(struct lguest *lg, unsigned long, const void *buf, unsigned len);
-int find_free_guest(void);
 int lguest_address_ok(const struct lguest *lg,
                      unsigned long addr, unsigned long len);
 int run_guest(struct lguest *lg, unsigned long __user *user);