WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

[Xen-devel] [PATCH] mm: Fix Converting PTE to PFN

To: xen-devel@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-devel] [PATCH] mm: Fix Converting PTE to PFN
From: Yosuke Iwamatsu <y-iwamatsu@xxxxxxxxxxxxx>
Date: Thu, 09 Oct 2008 16:04:06 +0900
Delivery-date: Thu, 09 Oct 2008 00:04:34 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Thunderbird 2.0.0.17 (Windows/20080914)
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@xxxxxxxxxxxxx>

diff -r e66cecb66b1e xen/arch/x86/mm.c
--- a/xen/arch/x86/mm.c Wed Oct 08 14:00:58 2008 +0100
+++ b/xen/arch/x86/mm.c Thu Oct 09 14:14:13 2008 +0900
@@ -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",


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-devel] [PATCH] mm: Fix Converting PTE to PFN, Yosuke Iwamatsu <=