• Rusty Russell's avatar
    lguest: use a special 1:1 linear pagetable mode until first switch. · 5dea1c88
    Rusty Russell authored
    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 d50d8fe1 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: default avatarRusty Russell <rusty@rustcorp.com.au>
    5dea1c88
page_tables.c 35.4 KB