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

[Xen-changelog] Fix page-table dump on PAE with >4GB MFNs.



# HG changeset patch
# User smh22@xxxxxxxxxxxxxxxxxxxx
# Node ID 5aa93e3c2a22ff7cedf08807ad8c22888b4106d1
# Parent  476d02c1346ca131c21fa33608f6b310a17643f1
Fix page-table dump on PAE with >4GB MFNs. 

Signed-off-by: Steven Hand <steven@xxxxxxxxxxxxx>

diff -r 476d02c1346c -r 5aa93e3c2a22 
linux-2.6-xen-sparse/arch/xen/i386/mm/fault.c
--- a/linux-2.6-xen-sparse/arch/xen/i386/mm/fault.c     Thu Nov 10 17:25:27 2005
+++ b/linux-2.6-xen-sparse/arch/xen/i386/mm/fault.c     Thu Nov 10 18:32:09 2005
@@ -208,6 +208,7 @@
 static void dump_fault_path(unsigned long address)
 {
        unsigned long *p, page;
+        unsigned long mfn; 
 
        preempt_disable();
        page = __pa(per_cpu(cur_pgd, smp_processor_id()));
@@ -217,20 +218,22 @@
        p += (address >> 30) * 2;
        printk(KERN_ALERT "%08lx -> *pde = %08lx:%08lx\n", page, p[1], p[0]);
        if (p[0] & 1) {
-               page = p[0] & PAGE_MASK;
+                mfn  = (p[0] >> PAGE_SHIFT) | ((p[1] & 0x7) << 20); 
+               page = mfn_to_pfn(mfn) << PAGE_SHIFT; 
+               p  = (unsigned long *)__va(page);
                address &= 0x3fffffff;
-               page = machine_to_phys(page);
-               p  = (unsigned long *)__va(page);
                p += (address >> 21) * 2;
-               printk(KERN_ALERT "%08lx -> *pme = %08lx:%08lx\n", page, p[1], 
p[0]);
+               printk(KERN_ALERT "%08lx -> *pme = %08lx:%08lx\n", 
+                       page, p[1], p[0]);
 #ifndef CONFIG_HIGHPTE
                if (p[0] & 1) {
-                       page = p[0] & PAGE_MASK;
-                       address &= 0x001fffff;
-                       page = machine_to_phys(page);
-                       p  = (unsigned long *) __va(page);
-                       p += (address >> 12) * 2;
-                       printk(KERN_ALERT "%08lx -> *pte = %08lx:%08lx\n", 
page, p[1], p[0]);
+                        mfn  = (p[0] >> PAGE_SHIFT) | ((p[1] & 0x7) << 20); 
+                        page = mfn_to_pfn(mfn) << PAGE_SHIFT; 
+                        p  = (unsigned long *) __va(page);
+                        address &= 0x001fffff;
+                        p += (address >> 12) * 2;
+                       printk(KERN_ALERT "%08lx -> *pte = %08lx:%08lx\n", 
+                               page, p[1], p[0]);
                }
 #endif
        }

_______________________________________________
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®.