ia64/xen-unstable

changeset 19377:0e8005a9d812

x86 shadow: Fix 2-on-3 mode.

Signed-off-by: Gianluca Guida <Gianluca.Guida@eu.citrix.com>
author Keir Fraser <keir.fraser@citrix.com>
date Tue Mar 17 14:30:15 2009 +0000 (2009-03-17)
parents 6d5aa622fb3d
children c09a81540080
files xen/arch/x86/mm/shadow/multi.c
line diff
     1.1 --- a/xen/arch/x86/mm/shadow/multi.c	Tue Mar 17 14:29:26 2009 +0000
     1.2 +++ b/xen/arch/x86/mm/shadow/multi.c	Tue Mar 17 14:30:15 2009 +0000
     1.3 @@ -2480,16 +2480,15 @@ int sh_safe_not_to_sync(struct vcpu *v, 
     1.4          return 0;
     1.5      smfn = _mfn(sp->up >> PAGE_SHIFT);
     1.6      ASSERT(mfn_valid(smfn));
     1.7 -
     1.8 -#if (GUEST_PAGING_LEVELS == 2)
     1.9 +#endif
    1.10 +
    1.11 +#if (GUEST_PAGING_LEVELS == 2 && SHADOW_PAGING_LEVELS == 3)
    1.12      /* In 2-on-3 shadow mode the up pointer contains the link to the
    1.13       * shadow page, but the shadow_table contains only the first of the
    1.14       * four pages that makes the PAE top shadow tables. */
    1.15      smfn = _mfn(mfn_x(smfn) & ~0x3UL);
    1.16  #endif
    1.17  
    1.18 -#endif
    1.19 -
    1.20      if ( pagetable_get_pfn(v->arch.shadow_table[0]) == mfn_x(smfn)
    1.21  #if (SHADOW_PAGING_LEVELS == 3) 
    1.22           || pagetable_get_pfn(v->arch.shadow_table[1]) == mfn_x(smfn)