diff options
author | Rusty Russell <rusty@rustcorp.com.au> | 2007-10-22 11:03:27 +1000 |
---|---|---|
committer | Rusty Russell <rusty@rustcorp.com.au> | 2007-10-23 15:49:51 +1000 |
commit | 48245cc0708d49d1d0566b9fa617ad6c5f4c6934 (patch) | |
tree | b396fd2d1ab185aab20894570e7e84bd4f656355 /drivers/lguest/core.c | |
parent | 3c6b5bfa3cf3b4057788e08482a468cc3bc00780 (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/core.c')
-rw-r--r-- | drivers/lguest/core.c | 14 |
1 files changed, 0 insertions, 14 deletions
diff --git a/drivers/lguest/core.c b/drivers/lguest/core.c index eb95860cf09..ca581ef591e 100644 --- a/drivers/lguest/core.c +++ b/drivers/lguest/core.c @@ -47,10 +47,6 @@ static struct { DEFINE_MUTEX(lguest_lock); static DEFINE_PER_CPU(struct lguest *, last_guest); -/* FIXME: Make dynamic. */ -#define MAX_LGUEST_GUESTS 16 -struct lguest lguests[MAX_LGUEST_GUESTS]; - /* Offset from where switcher.S was compiled to where we've copied it */ static unsigned long switcher_offset(void) { @@ -660,16 +656,6 @@ int run_guest(struct lguest *lg, unsigned long __user *user) * deliver_trap() and demand_page(). After all those, we'll be ready to * examine the Switcher, and our philosophical understanding of the Host/Guest * duality will be complete. :*/ - -int find_free_guest(void) -{ - unsigned int i; - for (i = 0; i < MAX_LGUEST_GUESTS; i++) - if (!lguests[i].tsk) - return i; - return -1; -} - static void adjust_pge(void *on) { if (on) |