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

[Xen-changelog] [xen-unstable] Small fixes to changesets 10424 and 10425 (spurious #PF detection).



# HG changeset patch
# User kaf24@xxxxxxxxxxxxxxxxxxxx
# Node ID 5033ffe8f53356cd7d8e52e9d4ce78c69e826d33
# Parent  ef8cdd1dc8360e310423a599ff1da76fb111bc96
Small fixes to changesets 10424 and 10425 (spurious #PF detection).
Signed-off-by: Keir Fraser <keir@xxxxxxxxxxxxx>
---
 linux-2.6-xen-sparse/arch/x86_64/mm/fault-xen.c |    2 +-
 xen/arch/x86/traps.c                            |    8 ++++----
 2 files changed, 5 insertions(+), 5 deletions(-)

diff -r ef8cdd1dc836 -r 5033ffe8f533 
linux-2.6-xen-sparse/arch/x86_64/mm/fault-xen.c
--- a/linux-2.6-xen-sparse/arch/x86_64/mm/fault-xen.c   Sat Jun 17 11:29:35 
2006 +0100
+++ b/linux-2.6-xen-sparse/arch/x86_64/mm/fault-xen.c   Sat Jun 17 12:57:03 
2006 +0100
@@ -324,7 +324,7 @@ static int spurious_fault(struct pt_regs
 #endif
 
        /* Reserved-bit violation or user access to kernel space? */
-       if (error_code & PF_RSVD|PF_USER)
+       if (error_code & (PF_RSVD|PF_USER))
                return 0;
 
        pgd = init_mm.pgd + pgd_index(address);
diff -r ef8cdd1dc836 -r 5033ffe8f533 xen/arch/x86/traps.c
--- a/xen/arch/x86/traps.c      Sat Jun 17 11:29:35 2006 +0100
+++ b/xen/arch/x86/traps.c      Sat Jun 17 12:57:03 2006 +0100
@@ -592,6 +592,10 @@ static int __spurious_page_fault(
     l1_pgentry_t l1e, *l1t;
     unsigned int required_flags, disallowed_flags;
 
+    /* Reserved bit violations are never spurious faults. */
+    if ( regs->error_code & PGERR_reserved_bit )
+        return 0;
+
     required_flags  = _PAGE_PRESENT;
     if ( regs->error_code & PGERR_write_access )
         required_flags |= _PAGE_RW;
@@ -653,10 +657,6 @@ static int spurious_page_fault(
     struct vcpu   *v = current;
     struct domain *d = v->domain;
     int            is_spurious;
-
-    /* Reserved bit violations are never spurious faults. */
-    if ( regs->error_code & PGERR_reserved_bit )
-        return 0;
 
     LOCK_BIGLOCK(d);
 

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