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

[Xen-devel] xc_translate_foreign_address




Xc_translate_foreign_address has issues when try to translate addresses from the a non PAE domain. Lines 135 & 159 do a retrieve a 64 bit quantity using a *(unsigned long long *) cast, when what is required is an unsigned long.



diff -r 489f28021f26 tools/libxc/xc_pagetab.c
--- a/tools/libxc/xc_pagetab.c  Wed Dec 20 09:47:24 2006 +0000
+++ b/tools/libxc/xc_pagetab.c  Fri Apr 20 18:38:22 2007 -0600
@@ -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,7 +156,7 @@ 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) {
             DPRINTF("page entry not present in PT\n");

--
Chris Morrow    YottaYotta Inc. email: cmorrow@xxxxxxxxxxxxxx
phone: (780) 989 6814           web:   http://www.yottayotta.com



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


 


Rackspace

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