diff options
author | kfraser@localhost.localdomain <kfraser@localhost.localdomain> | 2007-04-25 09:49:18 +0100 |
---|---|---|
committer | kfraser@localhost.localdomain <kfraser@localhost.localdomain> | 2007-04-25 09:49:18 +0100 |
commit | 6663bba3a20065614d852b6436366c5d9d21a7b3 (patch) | |
tree | d8ec175855d30c9473ed570a4e3bbdc6f5b05acf /tools/libxc/xc_pagetab.c | |
parent | 9693ccfdf126c1d9a77b5cff0938092a51441f66 (diff) | |
download | xen-6663bba3a20065614d852b6436366c5d9d21a7b3.tar.gz xen-6663bba3a20065614d852b6436366c5d9d21a7b3.tar.bz2 xen-6663bba3a20065614d852b6436366c5d9d21a7b3.zip |
libxc: Fix xc_translate_foreign_address() to parse non-pae pagetables
correctly.
From: Chris Morrow <cmorrow@yottayotta.com>
Signed-off-by: Keir Fraser <keir@xensource.com>
Diffstat (limited to 'tools/libxc/xc_pagetab.c')
-rw-r--r-- | tools/libxc/xc_pagetab.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/tools/libxc/xc_pagetab.c b/tools/libxc/xc_pagetab.c index 85b3d15800..e67a34ae8f 100644 --- a/tools/libxc/xc_pagetab.c +++ b/tools/libxc/xc_pagetab.c @@ -132,7 +132,7 @@ unsigned long xc_translate_foreign_address(int xc_handle, uint32_t dom, 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_address(int xc_handle, uint32_t dom, 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; } |