ia64/xen-unstable

changeset 11202:c39d7d8379ad

[XEN] Fix page-fault handler to fall back to shadow-mode fault path if
writable pagetable logic fails to fix up a fault.
Signed-off-by: Keir Fraser <keir@xensource.com>
author kfraser@localhost.localdomain
date Thu Aug 17 19:16:01 2006 +0100 (2006-08-17)
parents 41130540891e
children 7ecfd9b1f641
files xen/arch/x86/traps.c
line diff
     1.1 --- a/xen/arch/x86/traps.c	Thu Aug 17 19:11:14 2006 +0100
     1.2 +++ b/xen/arch/x86/traps.c	Thu Aug 17 19:16:01 2006 +0100
     1.3 @@ -888,11 +888,12 @@ static int fixup_page_fault(unsigned lon
     1.4          return (spurious_page_fault(addr, regs) ? EXCRET_not_a_fault : 0);
     1.5      }
     1.6  
     1.7 -    if ( likely(VM_ASSIST(d, VMASST_TYPE_writable_pagetables)) &&
     1.8 +    if ( VM_ASSIST(d, VMASST_TYPE_writable_pagetables) &&
     1.9           guest_kernel_mode(v, regs) &&
    1.10           ((regs->error_code & (PGERR_write_access|PGERR_page_present)) ==
    1.11 -          (PGERR_write_access|PGERR_page_present)) )
    1.12 -        return ptwr_do_page_fault(d, addr, regs) ? EXCRET_fault_fixed : 0;
    1.13 +          (PGERR_write_access|PGERR_page_present)) &&
    1.14 +         ptwr_do_page_fault(d, addr, regs) )
    1.15 +        return EXCRET_fault_fixed;
    1.16  
    1.17      if ( shadow2_mode_enabled(d) )
    1.18          return shadow2_fault(addr, regs);