WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-changelog

[Xen-changelog] Better XenLinux page fault debug output for PAE.

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] Better XenLinux page fault debug output for PAE.
From: Xen patchbot -unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Tue, 02 Aug 2005 12:10:10 -0400
Delivery-date: Tue, 02 Aug 2005 16:10:38 +0000
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# HG changeset patch
# User kaf24@xxxxxxxxxxxxxxxxxxxx
# Node ID dcdcec634c2d5624988d9f4907ade378ff575c51
# Parent  59e76450e286240decceda23eca343ec4604124f
Better XenLinux page fault debug output for PAE.
Signed-off-by: Keir Fraser <keir@xxxxxxxxxxxxx>

diff -r 59e76450e286 -r dcdcec634c2d 
linux-2.6-xen-sparse/arch/xen/i386/mm/fault.c
--- a/linux-2.6-xen-sparse/arch/xen/i386/mm/fault.c     Tue Aug  2 15:42:06 2005
+++ b/linux-2.6-xen-sparse/arch/xen/i386/mm/fault.c     Tue Aug  2 16:11:31 2005
@@ -204,6 +204,63 @@
 
 fastcall void do_invalid_op(struct pt_regs *, unsigned long);
 
+#ifdef CONFIG_X86_PAE
+static void dump_fault_path(unsigned long address)
+{
+       unsigned long *p, page;
+
+        page = __pa(per_cpu(cur_pgd, smp_processor_id()));
+       p  = (unsigned long *)__va(page);
+       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;
+               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]);
+#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]);
+               }
+#endif
+       }
+}
+#else
+static void dump_fault_path(unsigned long address)
+{
+       unsigned long page;
+
+       page = ((unsigned long *) per_cpu(cur_pgd, smp_processor_id()))
+           [address >> 22];
+       printk(KERN_ALERT "*pde = ma %08lx pa %08lx\n", page,
+              machine_to_phys(page));
+       /*
+        * We must not directly access the pte in the highpte
+        * case, the page table might be allocated in highmem.
+        * And lets rather not kmap-atomic the pte, just in case
+        * it's allocated already.
+        */
+#ifndef CONFIG_HIGHPTE
+       if (page & 1) {
+               page &= PAGE_MASK;
+               address &= 0x003ff000;
+               page = machine_to_phys(page);
+               page = ((unsigned long *) __va(page))[address >> PAGE_SHIFT];
+               printk(KERN_ALERT "*pte = ma %08lx pa %08lx\n", page,
+                      machine_to_phys(page));
+       }
+#endif
+}
+#endif
+
+
 /*
  * This routine handles page faults.  It determines the address,
  * and the problem, and then passes it off to one of the appropriate
@@ -220,7 +277,6 @@
        struct task_struct *tsk;
        struct mm_struct *mm;
        struct vm_area_struct * vma;
-       unsigned long page;
        int write;
        siginfo_t info;
 
@@ -454,26 +510,7 @@
        printk(" at virtual address %08lx\n",address);
        printk(KERN_ALERT " printing eip:\n");
        printk("%08lx\n", regs->eip);
-       page = ((unsigned long *) per_cpu(cur_pgd, smp_processor_id()))
-           [address >> 22];
-       printk(KERN_ALERT "*pde = ma %08lx pa %08lx\n", page,
-              machine_to_phys(page));
-       /*
-        * We must not directly access the pte in the highpte
-        * case, the page table might be allocated in highmem.
-        * And lets rather not kmap-atomic the pte, just in case
-        * it's allocated already.
-        */
-#ifndef CONFIG_HIGHPTE
-       if (page & 1) {
-               page &= PAGE_MASK;
-               address &= 0x003ff000;
-               page = machine_to_phys(page);
-               page = ((unsigned long *) __va(page))[address >> PAGE_SHIFT];
-               printk(KERN_ALERT "*pte = ma %08lx pa %08lx\n", page,
-                      machine_to_phys(page));
-       }
-#endif
+       dump_fault_path(address);
        die("Oops", regs, error_code);
        bust_spinlocks(0);
        do_exit(SIGKILL);

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

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] Better XenLinux page fault debug output for PAE., Xen patchbot -unstable <=