Skip to contentSkip to conversation

xc_translate_foreign_address

PATCH Chris Morrow 1 participant 1 message Apr 25, 2007

lore
Share & tools
lore
#0 lore raw

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.

tools/libxc/xc_pagetab.c Fri Apr 20 18:38:22 2007 -0600 renamed from tools/libxc/xc_pagetab.c Wed Dec 20 09:47:24 2006 +0000 +0 -0
diff -r 489f28021f26 tools/libxc/xc_pagetab.c
@@ -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");
Signature · 2 lines
Chris Morrow	YottaYotta Inc. email: [email protected]
phone: (780) 989 6814           web:   http://www.yottayotta.com