ia64/xen-unstable

changeset 3142:0d7e310db68e

bitkeeper revision 1.1159.187.16 (41a61a44Xij1fE3MnjvIv-xHwoKOZg)

Merge arcadians.cl.cam.ac.uk:/auto/groups/xeno/BK/xen-2.0-testing.bk
into arcadians.cl.cam.ac.uk:/local/scratch-2/cl349/xen-2.0-testing.bk
author cl349@arcadians.cl.cam.ac.uk
date Thu Nov 25 17:45:40 2004 +0000 (2004-11-25)
parents b013a6b30d9e 3aad77958a08
children dc6347709bff aacdccdb52e5
files xen/arch/x86/memory.c
line diff
     1.1 --- a/xen/arch/x86/memory.c	Thu Nov 25 17:24:07 2004 +0000
     1.2 +++ b/xen/arch/x86/memory.c	Thu Nov 25 17:45:40 2004 +0000
     1.3 @@ -1781,17 +1781,20 @@ int ptwr_do_page_fault(unsigned long add
     1.4      which = PTWR_PT_INACTIVE;
     1.5      if ( (l2e >> PAGE_SHIFT) == pfn )
     1.6      {
     1.7 -        /*
     1.8 -         * If the PRESENT bit is clear, we may be conflicting with the current 
     1.9 -         * ACTIVE p.t. (it may be the same p.t. mapped at another virt addr).
    1.10 -         */
    1.11 -        if ( unlikely(!(l2e & _PAGE_PRESENT)) &&
    1.12 -             ptwr_info[cpu].ptinfo[PTWR_PT_ACTIVE].l1va )
    1.13 -            ptwr_flush(PTWR_PT_ACTIVE);
    1.14 -        
    1.15 -        /* Now do a final check of the PRESENT bit to set ACTIVE. */
    1.16 +        /* Check the PRESENT bit to set ACTIVE. */
    1.17          if ( likely(l2e & _PAGE_PRESENT) )
    1.18              which = PTWR_PT_ACTIVE;
    1.19 +        else {
    1.20 +            /*
    1.21 +             * If the PRESENT bit is clear, we may be conflicting with
    1.22 +             * the current ACTIVE p.t. (it may be the same p.t. mapped
    1.23 +             * at another virt addr).
    1.24 +             * The ptwr_flush call below will restore the PRESENT bit.
    1.25 +             */
    1.26 +            if ( ptwr_info[cpu].ptinfo[PTWR_PT_ACTIVE].l1va &&
    1.27 +                 l2_idx == ptwr_info[cpu].ptinfo[PTWR_PT_ACTIVE].l2_idx )
    1.28 +                which = PTWR_PT_ACTIVE;
    1.29 +        }
    1.30      }
    1.31      
    1.32      PTWR_PRINTK("[%c] page_fault on l1 pt at va %08lx, pt for %08x, "