diff options
author | Rusty Russell <rusty@rustcorp.com.au> | 2011-07-22 01:09:48 -0400 |
---|---|---|
committer | Rusty Russell <rusty@rustcorp.com.au> | 2011-07-22 01:09:48 -0400 |
commit | 5dea1c88ed11a1221581c4b202f053c4fc138704 (patch) | |
tree | 59e15d3c696712e26ffb229ff987f33bcc72affe /drivers/lguest/lg.h | |
parent | e0377e25206328998d036cafddcd00a7c3252e3e (diff) |
lguest: use a special 1:1 linear pagetable mode until first switch.
The Host used to create some page tables for the Guest to use at the
top of Guest memory; it would then tell the Guest where this was. In
particular, it created linear mappings for 0 and 0xC0000000 addresses
because lguest used to switch to its real page tables quite late in
boot.
However, since d50d8fe19 Linux initialized boot page tables in
head_32.S even before the "are we lguest?" boot jump. So, now we can
simplify things: the Host pagetable code assumes 1:1 linear mapping
until it first calls the LHCALL_NEW_PGTABLE hypercall, which we now do
before we reach C code.
This also means that the Host doesn't need to know anything about the
Guest's PAGE_OFFSET. (Non-Linux guests might not even have such a
thing).
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Diffstat (limited to 'drivers/lguest/lg.h')
-rw-r--r-- | drivers/lguest/lg.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/lguest/lg.h b/drivers/lguest/lg.h index 9136411fadd5..295df06e6590 100644 --- a/drivers/lguest/lg.h +++ b/drivers/lguest/lg.h | |||
@@ -59,6 +59,8 @@ struct lg_cpu { | |||
59 | 59 | ||
60 | struct lguest_pages *last_pages; | 60 | struct lguest_pages *last_pages; |
61 | 61 | ||
62 | /* Initialization mode: linear map everything. */ | ||
63 | bool linear_pages; | ||
62 | int cpu_pgd; /* Which pgd this cpu is currently using */ | 64 | int cpu_pgd; /* Which pgd this cpu is currently using */ |
63 | 65 | ||
64 | /* If a hypercall was asked for, this points to the arguments. */ | 66 | /* If a hypercall was asked for, this points to the arguments. */ |