diff options
Diffstat (limited to 'drivers/lguest')
-rw-r--r-- | drivers/lguest/core.c | 15 |
1 files changed, 5 insertions, 10 deletions
diff --git a/drivers/lguest/core.c b/drivers/lguest/core.c index 7e1d7ee36478..0bf1e4edf04d 100644 --- a/drivers/lguest/core.c +++ b/drivers/lguest/core.c | |||
@@ -83,18 +83,13 @@ static __init int map_switcher(void) | |||
83 | } | 83 | } |
84 | } | 84 | } |
85 | 85 | ||
86 | switcher_addr = SWITCHER_ADDR; | ||
87 | |||
88 | /* | 86 | /* |
89 | * First we check that the Switcher won't overlap the fixmap area at | 87 | * We place the Switcher underneath the fixmap area, which is the |
90 | * the top of memory. It's currently nowhere near, but it could have | 88 | * highest virtual address we can get. This is important, since we |
91 | * very strange effects if it ever happened. | 89 | * tell the Guest it can't access this memory, so we want its ceiling |
90 | * as high as possible. | ||
92 | */ | 91 | */ |
93 | if (switcher_addr + (TOTAL_SWITCHER_PAGES+1)*PAGE_SIZE > FIXADDR_START){ | 92 | switcher_addr = FIXADDR_START - (TOTAL_SWITCHER_PAGES+1)*PAGE_SIZE; |
94 | err = -ENOMEM; | ||
95 | printk("lguest: mapping switcher would thwack fixmap\n"); | ||
96 | goto free_pages; | ||
97 | } | ||
98 | 93 | ||
99 | /* | 94 | /* |
100 | * Now we reserve the "virtual memory area" we want. We might | 95 | * Now we reserve the "virtual memory area" we want. We might |