ia64/xen-unstable

changeset 18598:d1e57d593614

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 <y-iwamatsu@ab.jp.nec.com>
author Keir Fraser <keir.fraser@citrix.com>
date Thu Oct 09 10:15:30 2008 +0100 (2008-10-09)
parents 1e37779bf884
children 10dec51bfa81
files xen/arch/x86/mm.c
line diff
     1.1 --- a/xen/arch/x86/mm.c	Thu Oct 09 10:06:50 2008 +0100
     1.2 +++ b/xen/arch/x86/mm.c	Thu Oct 09 10:15:30 2008 +0100
     1.3 @@ -3067,7 +3067,7 @@ static int destroy_grant_pte_mapping(
     1.4      ol1e = *(l1_pgentry_t *)va;
     1.5      
     1.6      /* Check that the virtual address supplied is actually mapped to frame. */
     1.7 -    if ( unlikely((l1e_get_intpte(ol1e) >> PAGE_SHIFT) != frame) )
     1.8 +    if ( unlikely(l1e_get_pfn(ol1e) != frame) )
     1.9      {
    1.10          page_unlock(page);
    1.11          MEM_LOG("PTE entry %lx for address %"PRIx64" doesn't match frame %lx",