aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/lguest/lg.h
diff options
context:
space:
mode:
authorRusty Russell <rusty@rustcorp.com.au>2007-10-21 21:03:27 -0400
committerRusty Russell <rusty@rustcorp.com.au>2007-10-23 01:49:51 -0400
commit48245cc0708d49d1d0566b9fa617ad6c5f4c6934 (patch)
treeb396fd2d1ab185aab20894570e7e84bd4f656355 /drivers/lguest/lg.h
parent3c6b5bfa3cf3b4057788e08482a468cc3bc00780 (diff)
Remove fixed limit on number of guests, and lguests array.
Back when we had all the Guest state in the switcher, we had a fixed array of them. This is no longer necessary. If we switch the network code to using random_ether_addr (46 bits is enough to avoid clashes), we can get rid of the concept of "guest id" altogether. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Diffstat (limited to 'drivers/lguest/lg.h')
-rw-r--r--drivers/lguest/lg.h5
1 files changed, 1 insertions, 4 deletions
diff --git a/drivers/lguest/lg.h b/drivers/lguest/lg.h
index 54f2c2472bec..c9d1dc29490d 100644
--- a/drivers/lguest/lg.h
+++ b/drivers/lguest/lg.h
@@ -51,9 +51,9 @@ struct lguest_dma_info
51 struct list_head list; 51 struct list_head list;
52 union futex_key key; 52 union futex_key key;
53 unsigned long dmas; 53 unsigned long dmas;
54 struct lguest *owner;
54 u16 next_dma; 55 u16 next_dma;
55 u16 num_dmas; 56 u16 num_dmas;
56 u16 guestid;
57 u8 interrupt; /* 0 when not registered */ 57 u8 interrupt; /* 0 when not registered */
58}; 58};
59 59
@@ -140,7 +140,6 @@ struct lguest
140 struct lguest_data __user *lguest_data; 140 struct lguest_data __user *lguest_data;
141 struct task_struct *tsk; 141 struct task_struct *tsk;
142 struct mm_struct *mm; /* == tsk->mm, but that becomes NULL on exit */ 142 struct mm_struct *mm; /* == tsk->mm, but that becomes NULL on exit */
143 u16 guestid;
144 u32 pfn_limit; 143 u32 pfn_limit;
145 /* This provides the offset to the base of guest-physical 144 /* This provides the offset to the base of guest-physical
146 * memory in the Launcher. */ 145 * memory in the Launcher. */
@@ -195,7 +194,6 @@ struct lguest
195 DECLARE_BITMAP(irqs_pending, LGUEST_IRQS); 194 DECLARE_BITMAP(irqs_pending, LGUEST_IRQS);
196}; 195};
197 196
198extern struct lguest lguests[];
199extern struct mutex lguest_lock; 197extern struct mutex lguest_lock;
200 198
201/* core.c: */ 199/* core.c: */
@@ -203,7 +201,6 @@ u32 lgread_u32(struct lguest *lg, unsigned long addr);
203void lgwrite_u32(struct lguest *lg, unsigned long addr, u32 val); 201void lgwrite_u32(struct lguest *lg, unsigned long addr, u32 val);
204void lgread(struct lguest *lg, void *buf, unsigned long addr, unsigned len); 202void lgread(struct lguest *lg, void *buf, unsigned long addr, unsigned len);
205void lgwrite(struct lguest *lg, unsigned long, const void *buf, unsigned len); 203void lgwrite(struct lguest *lg, unsigned long, const void *buf, unsigned len);
206int find_free_guest(void);
207int lguest_address_ok(const struct lguest *lg, 204int lguest_address_ok(const struct lguest *lg,
208 unsigned long addr, unsigned long len); 205 unsigned long addr, unsigned long len);
209int run_guest(struct lguest *lg, unsigned long __user *user); 206int run_guest(struct lguest *lg, unsigned long __user *user);