direct-io.hg

changeset 10439:5033ffe8f533

Small fixes to changesets 10424 and 10425 (spurious #PF detection).
Signed-off-by: Keir Fraser <keir@xensource.com>
author kaf24@firebug.cl.cam.ac.uk
date Sat Jun 17 12:57:03 2006 +0100 (2006-06-17)
parents ef8cdd1dc836
children e23961a8ce7e
files linux-2.6-xen-sparse/arch/x86_64/mm/fault-xen.c xen/arch/x86/traps.c
line diff
     1.1 --- a/linux-2.6-xen-sparse/arch/x86_64/mm/fault-xen.c	Sat Jun 17 11:29:35 2006 +0100
     1.2 +++ b/linux-2.6-xen-sparse/arch/x86_64/mm/fault-xen.c	Sat Jun 17 12:57:03 2006 +0100
     1.3 @@ -324,7 +324,7 @@ static int spurious_fault(struct pt_regs
     1.4  #endif
     1.5  
     1.6  	/* Reserved-bit violation or user access to kernel space? */
     1.7 -	if (error_code & PF_RSVD|PF_USER)
     1.8 +	if (error_code & (PF_RSVD|PF_USER))
     1.9  		return 0;
    1.10  
    1.11  	pgd = init_mm.pgd + pgd_index(address);
     2.1 --- a/xen/arch/x86/traps.c	Sat Jun 17 11:29:35 2006 +0100
     2.2 +++ b/xen/arch/x86/traps.c	Sat Jun 17 12:57:03 2006 +0100
     2.3 @@ -592,6 +592,10 @@ static int __spurious_page_fault(
     2.4      l1_pgentry_t l1e, *l1t;
     2.5      unsigned int required_flags, disallowed_flags;
     2.6  
     2.7 +    /* Reserved bit violations are never spurious faults. */
     2.8 +    if ( regs->error_code & PGERR_reserved_bit )
     2.9 +        return 0;
    2.10 +
    2.11      required_flags  = _PAGE_PRESENT;
    2.12      if ( regs->error_code & PGERR_write_access )
    2.13          required_flags |= _PAGE_RW;
    2.14 @@ -654,10 +658,6 @@ static int spurious_page_fault(
    2.15      struct domain *d = v->domain;
    2.16      int            is_spurious;
    2.17  
    2.18 -    /* Reserved bit violations are never spurious faults. */
    2.19 -    if ( regs->error_code & PGERR_reserved_bit )
    2.20 -        return 0;
    2.21 -
    2.22      LOCK_BIGLOCK(d);
    2.23  
    2.24      is_spurious = __spurious_page_fault(addr, regs);