From: Keir Fraser Date: Thu, 9 Oct 2008 09:15:30 +0000 (+0100) Subject: x86/mm: Use l1e_get_pfn() in destroy_grant_pte_mapping(). X-Git-Tag: archive/raspbian/4.8.0-1+rpi1~1^2~14091^2~6 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=4ec4b58e0006f7172abde125534b7b440b78fd19;p=xen.git x86/mm: Use l1e_get_pfn() in destroy_grant_pte_mapping(). On x86_64 system, (pte >> PAGE_SHIFT) is not always equal to page frame number because high bits (63:52) of pte may be used as flags. This patch corrects the conversion and errors as below disappear when applied. (XEN) mm.c:3074:d0 PTE entry 200000a2ec6167 for address a1f09958 doesn't match frame a2ec6 Signed-off-by: Yosuke Iwamatsu --- diff --git a/xen/arch/x86/mm.c b/xen/arch/x86/mm.c index 51b3537ea4..f3082eeedd 100644 --- a/xen/arch/x86/mm.c +++ b/xen/arch/x86/mm.c @@ -3067,7 +3067,7 @@ static int destroy_grant_pte_mapping( ol1e = *(l1_pgentry_t *)va; /* Check that the virtual address supplied is actually mapped to frame. */ - if ( unlikely((l1e_get_intpte(ol1e) >> PAGE_SHIFT) != frame) ) + if ( unlikely(l1e_get_pfn(ol1e) != frame) ) { page_unlock(page); MEM_LOG("PTE entry %lx for address %"PRIx64" doesn't match frame %lx",