ia64/xen-unstable

changeset 11870:87fc080f555b

[XEN] Fix CR3 plumbing for shadowed PV PAE guests.
Signed-off-by: Tim Deegan <Tim.Deegan@xensource.com>
author Tim Deegan <Tim.Deegan@xensource.com>
date Wed Oct 18 14:34:31 2006 +0100 (2006-10-18)
parents 7ec648fdb392
children 5c029fda79dc
files xen/arch/x86/mm/shadow/multi.c
line diff
     1.1 --- a/xen/arch/x86/mm/shadow/multi.c	Tue Oct 17 15:18:51 2006 +0100
     1.2 +++ b/xen/arch/x86/mm/shadow/multi.c	Wed Oct 18 14:34:31 2006 +0100
     1.3 @@ -3514,7 +3514,16 @@ sh_update_cr3(struct vcpu *v)
     1.4      {
     1.5          /* We don't support PV except guest == shadow == config levels */
     1.6          BUG_ON(GUEST_PAGING_LEVELS != SHADOW_PAGING_LEVELS);
     1.7 +#if SHADOW_PAGING_LEVELS == 3
     1.8 +        /* 2-on-3 or 3-on-3: Use the PAE shadow l3 table we just fabricated.
     1.9 +         * Don't use make_cr3 because (a) we know it's below 4GB, and
    1.10 +         * (b) it's not necessarily page-aligned, and make_cr3 takes a pfn */
    1.11 +        ASSERT(virt_to_maddr(&v->arch.shadow.l3table) <= 0xffffffe0ULL);
    1.12 +        v->arch.cr3 = virt_to_maddr(&v->arch.shadow.l3table);
    1.13 +#else
    1.14 +        /* 2-on-2 or 4-on-4: Just use the shadow top-level directly */
    1.15          make_cr3(v, pagetable_get_pfn(v->arch.shadow_table[0]));
    1.16 +#endif
    1.17      }
    1.18  
    1.19