ia64/xen-unstable

changeset 10474:8eab9f3cdb1a

[XEN] Remove code from writable-pagetable emulation path which
does not appear to be necessary. Replace with assertions for now,
pending total removal or me being proved wrong.
Signed-off-by: Keir Fraser <keir@xensource.com>
author kaf24@firebug.cl.cam.ac.uk
date Sun Jun 18 19:49:31 2006 +0100 (2006-06-18)
parents 7713276d159e
children 5d44f3ab9950
files xen/arch/x86/mm.c
line diff
     1.1 --- a/xen/arch/x86/mm.c	Sun Jun 18 19:44:13 2006 +0100
     1.2 +++ b/xen/arch/x86/mm.c	Sun Jun 18 19:49:31 2006 +0100
     1.3 @@ -3366,6 +3366,7 @@ static int ptwr_emulated_update(
     1.4          old  |= full;
     1.5      }
     1.6  
     1.7 +#if 0 /* XXX KAF: I don't think this can happen. */
     1.8      /*
     1.9       * We must not emulate an update to a PTE that is temporarily marked
    1.10       * writable by the batched ptwr logic, else we can corrupt page refcnts! 
    1.11 @@ -3376,6 +3377,12 @@ static int ptwr_emulated_update(
    1.12      if ( ((l1va = d->arch.ptwr[PTWR_PT_INACTIVE].l1va) != 0) &&
    1.13           (l1_linear_offset(l1va) == l1_linear_offset(addr)) )
    1.14          ptwr_flush(d, PTWR_PT_INACTIVE);
    1.15 +#else
    1.16 +    ASSERT(((l1va = d->arch.ptwr[PTWR_PT_ACTIVE].l1va) == 0) ||
    1.17 +           (l1_linear_offset(l1va) != l1_linear_offset(addr)));
    1.18 +    ASSERT(((l1va = d->arch.ptwr[PTWR_PT_INACTIVE].l1va) == 0) ||
    1.19 +           (l1_linear_offset(l1va) != l1_linear_offset(addr)));
    1.20 +#endif
    1.21  
    1.22      /* Read the PTE that maps the page being updated. */
    1.23      if ( __copy_from_user(&pte, &linear_pg_table[l1_linear_offset(addr)],