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] [xen-3.2-testing] x86: Clarify early_page_fault() handle

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-3.2-testing] x86: Clarify early_page_fault() handler intent, and improve debug
From: "Xen patchbot-3.2-testing" <patchbot-3.2-testing@xxxxxxxxxxxxxxxxxxx>
Date: Mon, 28 Jan 2008 03:00:43 -0800
Delivery-date: Mon, 28 Jan 2008 03:01:52 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
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 Keir Fraser <keir.fraser@xxxxxxxxxx>
# Date 1201516571 0
# Node ID 36a8e6763f3af8938f3c5c60e67cedd8a7ef0120
# Parent  c8c91e2e552e3b614d9c3f33bdc3d89c465d09c8
x86: Clarify early_page_fault() handler intent, and improve debug
tracing.
Signed-off-by: Keir Fraser <keir.fraser@xxxxxxxxxx>
xen-unstable changeset:   16887:923f2f7365079861e0e2341de22839376183208e
xen-unstable date:        Fri Jan 25 13:42:36 2008 +0000
---
 xen/arch/x86/traps.c |   22 ++++++++++++++--------
 1 files changed, 14 insertions(+), 8 deletions(-)

diff -r c8c91e2e552e -r 36a8e6763f3a xen/arch/x86/traps.c
--- a/xen/arch/x86/traps.c      Mon Jan 28 10:35:47 2008 +0000
+++ b/xen/arch/x86/traps.c      Mon Jan 28 10:36:11 2008 +0000
@@ -1116,12 +1116,11 @@ asmlinkage void do_page_fault(struct cpu
 }
 
 /*
- * Early handler to deal with spurious page faults. For example, consider a 
- * routine that uses a mapping immediately after installing it (making it 
- * present). The CPU may speculatively execute the memory access before 
- * executing the PTE write. The instruction will then be marked to cause a 
- * page fault when it is retired, despite the fact that the PTE is present and 
- * correct at that point in time.
+ * Early #PF handler to print CR2, error code, and stack.
+ * 
+ * We also deal with spurious faults here, even though they should never happen
+ * during early boot (an issue was seen once, but was most likely a hardware 
+ * problem).
  */
 asmlinkage void do_early_page_fault(struct cpu_user_regs *regs)
 {
@@ -1140,8 +1139,15 @@ asmlinkage void do_early_page_fault(stru
     }
 
     if ( stuck++ == 1000 )
-        panic("Early fatal page fault at %04x:%p (cr2=%p, ec=%04x)\n", 
-              regs->cs, _p(regs->eip), _p(cr2), regs->error_code);
+    {
+        unsigned long *stk = (unsigned long *)regs;
+        printk("Early fatal page fault at %04x:%p (cr2=%p, ec=%04x)\n", 
+               regs->cs, _p(regs->eip), _p(cr2), regs->error_code);
+        printk("Stack dump: ");
+        while ( ((long)stk & ((PAGE_SIZE - 1) & ~(BYTES_PER_LONG - 1))) != 0 )
+            printk("%p ", _p(*stk++));
+        for ( ; ; ) ;
+    }
 }
 
 long do_fpu_taskswitch(int set)

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

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [xen-3.2-testing] x86: Clarify early_page_fault() handler intent, and improve debug, Xen patchbot-3.2-testing <=