[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-changelog] [xen-3.0.5-testing] libxc: Fix xc_translate_foreign_address() to parse non-pae pagetables



# HG changeset patch
# User kfraser@xxxxxxxxxxxxxxxxxxxxx
# Date 1177490958 -3600
# Node ID 867965efcbd2f178de9df80b356087f68221a94b
# Parent  23d1ef48e332e8143023c4f4820552a29225db3d
libxc: Fix xc_translate_foreign_address() to parse non-pae pagetables
correctly.
From: Chris Morrow <cmorrow@xxxxxxxxxxxxxx>
Signed-off-by: Keir Fraser <keir@xxxxxxxxxxxxx>
---
 tools/libxc/xc_pagetab.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff -r 23d1ef48e332 -r 867965efcbd2 tools/libxc/xc_pagetab.c
--- a/tools/libxc/xc_pagetab.c  Wed Apr 25 09:46:43 2007 +0100
+++ b/tools/libxc/xc_pagetab.c  Wed Apr 25 09:49:18 2007 +0100
@@ -132,7 +132,7 @@ unsigned long xc_translate_foreign_addre
     if (pt_levels >= 3)
         pde = *(unsigned long long *)(pd + 8 * ((virt >> 
L2_PAGETABLE_SHIFT_PAE) & L2_PAGETABLE_MASK_PAE));
     else
-        pde = *(unsigned long long *)(pd + 4 * ((virt >> L2_PAGETABLE_SHIFT) & 
L2_PAGETABLE_MASK));
+        pde = *(unsigned long *)(pd + 4 * ((virt >> L2_PAGETABLE_SHIFT) & 
L2_PAGETABLE_MASK));
 
     if ((pde & 1) == 0) {
         DPRINTF("page entry not present in PD\n");
@@ -156,9 +156,9 @@ unsigned long xc_translate_foreign_addre
         if (pt_levels >= 3)
             pte = *(unsigned long long *)(pt + 8 * ((virt >> 
L1_PAGETABLE_SHIFT_PAE) & L1_PAGETABLE_MASK_PAE));
         else
-            pte = *(unsigned long long *)(pt + 4 * ((virt >> 
L1_PAGETABLE_SHIFT) & L1_PAGETABLE_MASK));
+            pte = *(unsigned long *)(pt + 4 * ((virt >> L1_PAGETABLE_SHIFT) & 
L1_PAGETABLE_MASK));
 
-        if ((pte & 0x00000001) == 0) {
+        if ((pte & 1) == 0) {
             DPRINTF("page entry not present in PT\n");
             goto out_unmap_pt;
         }

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


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.