From: Keir Fraser Date: Tue, 17 Mar 2009 14:30:15 +0000 (+0000) Subject: x86 shadow: Fix 2-on-3 mode. X-Git-Tag: archive/raspbian/4.8.0-1+rpi1~1^2~13992^2~54 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=7a54e4ba24850be797c9c62fe251153e78913a61;p=xen.git x86 shadow: Fix 2-on-3 mode. Signed-off-by: Gianluca Guida --- diff --git a/xen/arch/x86/mm/shadow/multi.c b/xen/arch/x86/mm/shadow/multi.c index 9b4679b540..4e1fe8a7c0 100644 --- a/xen/arch/x86/mm/shadow/multi.c +++ b/xen/arch/x86/mm/shadow/multi.c @@ -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)