]> xenbits.xensource.com Git - xen.git/commitdiff
x86 shadow: Fix 2-on-3 mode.
authorKeir Fraser <keir.fraser@citrix.com>
Tue, 17 Mar 2009 14:30:15 +0000 (14:30 +0000)
committerKeir Fraser <keir.fraser@citrix.com>
Tue, 17 Mar 2009 14:30:15 +0000 (14:30 +0000)
Signed-off-by: Gianluca Guida <Gianluca.Guida@eu.citrix.com>
xen/arch/x86/mm/shadow/multi.c

index 9b4679b540d0d896f1bf745fc6531bc20c1a192e..4e1fe8a7c040d18eb760dd0114aff939028159f4 100644 (file)
@@ -2480,14 +2480,13 @@ int sh_safe_not_to_sync(struct vcpu *v, mfn_t gl1mfn)
         return 0;
     smfn = _mfn(sp->up >> PAGE_SHIFT);
     ASSERT(mfn_valid(smfn));
+#endif
 
-#if (GUEST_PAGING_LEVELS == 2)
+#if (GUEST_PAGING_LEVELS == 2 && SHADOW_PAGING_LEVELS == 3)
     /* In 2-on-3 shadow mode the up pointer contains the link to the
      * shadow page, but the shadow_table contains only the first of the
      * four pages that makes the PAE top shadow tables. */
     smfn = _mfn(mfn_x(smfn) & ~0x3UL);
-#endif
-
 #endif
 
     if ( pagetable_get_pfn(v->arch.shadow_table[0]) == mfn_x(smfn)