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

[Xen-changelog] [xen-unstable] [XEN] Some suspicion that we may enter an infinite



# HG changeset patch
# User kfraser@xxxxxxxxxxxxxxxxxxxxx
# Node ID 2d2ed4d9b1c14aeee29dfdd77acd6017d31290cd
# Parent  c471b326b75e587104e8328b57f6985b75e38577
[XEN] Some suspicion that we may enter an infinite
#PF loop due to broken spurious pagefault detection.
Beef up the tracing on that code path so we can catch
some useful info if it happens.
Signed-off-by: Keir Fraser <keir@xxxxxxxxxxxxx>
---
 xen/arch/x86/traps.c |   25 ++++++++++++++++++++-----
 1 files changed, 20 insertions(+), 5 deletions(-)

diff -r c471b326b75e -r 2d2ed4d9b1c1 xen/arch/x86/traps.c
--- a/xen/arch/x86/traps.c      Mon Jul 31 09:30:36 2006 +0000
+++ b/xen/arch/x86/traps.c      Mon Jul 31 10:40:21 2006 +0100
@@ -733,7 +733,10 @@ static int __spurious_page_fault(
          (l2e_get_flags(l2e) & disallowed_flags) )
         return 0;
     if ( l2e_get_flags(l2e) & _PAGE_PSE )
-        return 1;
+    {
+        l1e = l1e_empty(); /* define before use in debug tracing */
+        goto spurious;
+    }
 
     l1t = map_domain_page(mfn);
     l1e = l1t[l1_table_offset(addr)];
@@ -742,6 +745,22 @@ static int __spurious_page_fault(
     if ( !(l1e_get_flags(l1e) & required_flags) ||
          (l1e_get_flags(l1e) & disallowed_flags) )
         return 0;
+
+ spurious:
+    DPRINTK("Spurious fault in domain %u:%u at addr %lx, e/c %04x\n",
+            current->domain->domain_id, current->vcpu_id,
+            addr, regs->error_code);
+#if CONFIG_PAGING_LEVELS >= 4
+    DPRINTK(" l4e = %"PRIpte"\n", l4e_get_intpte(l4e));
+#endif
+#if CONFIG_PAGING_LEVELS >= 3
+    DPRINTK(" l3e = %"PRIpte"\n", l3e_get_intpte(l3e));
+#endif
+    DPRINTK(" l2e = %"PRIpte"\n", l2e_get_intpte(l2e));
+    DPRINTK(" l1e = %"PRIpte"\n", l1e_get_intpte(l1e));
+#ifndef NDEBUG
+    show_registers(regs);
+#endif
     return 1;
 }
 
@@ -839,11 +858,7 @@ asmlinkage int do_page_fault(struct cpu_
     if ( unlikely(!guest_mode(regs)) )
     {
         if ( spurious_page_fault(addr, regs) )
-        {
-            DPRINTK("Spurious fault in domain %u:%u at addr %lx\n",
-                    current->domain->domain_id, current->vcpu_id, addr);
             return EXCRET_not_a_fault;
-        }
 
         if ( likely((fixup = search_exception_table(regs->eip)) != 0) )
         {

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