Skip to contentSkip to conversation

libxc foreign address translation bug

PATCH New Bryan D. Payne 1 participant 1 message May 2, 2008

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 libxc foreign address translation bug

In the xc_translate_foreign_address function from libxc, there is a check on the page directory entry to see if the page is 4K or 4M. However, the check is looking at bit 3, when it should be looking at bit 7. This patch fixes the problem.

---
 tools/libxc/xc_pagetab.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
tools/libxc/xc_pagetab.c +1 -1
Index: xen-unstable.hg/tools/libxc/xc_pagetab.c
===================================================================
@@ -141,7 +141,7 @@ unsigned long xc_translate_foreign_addre
 
     /* Page Table */
 
-    if (pde & 0x00000008) { /* 4M page (or 2M in PAE mode) */
+    if (pde & 0x00000080) { /* 4M page (or 2M in PAE mode) */
         DPRINTF("Cannot currently cope with 2/4M pages\n");
         exit(-1);
     } else { /* 4k page */

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel