ia64/xen-unstable

changeset 12439:680b37789200

[XEN] Fix the "early unshadow" optimization to look at the entire pte.

The optimization is designed to detect pagetable destruction, but re-uses the
pagetable entries to store data under certain conditions (paging, zeroing, &c);
sometimes the lower 8 bits are 0. These "false positives" cause unnecessary
shadowing and unshadowing.

Signed-off-by: George Dunlap <gdunlap@xensource.com>
author George Dunlap <dunlapg@umich.edu>
date Tue Nov 14 11:21:26 2006 -0500 (2006-11-14)
parents ade94aa072c5
children bb76a76985fe
files xen/arch/x86/mm/shadow/multi.c
line diff
     1.1 --- a/xen/arch/x86/mm/shadow/multi.c	Tue Nov 14 11:57:53 2006 +0000
     1.2 +++ b/xen/arch/x86/mm/shadow/multi.c	Tue Nov 14 11:21:26 2006 -0500
     1.3 @@ -3778,7 +3778,7 @@ sh_x86_emulate_write(struct vcpu *v, uns
     1.4          shadow_validate_guest_pt_write(v, mfn, addr, bytes_on_page);
     1.5          bytes -= bytes_on_page;
     1.6          /* If we are writing zeros to this page, might want to unshadow */
     1.7 -        if ( *(u8 *)addr == 0 )
     1.8 +        if ( *(u32 *)addr == 0 )
     1.9              check_for_early_unshadow(v, mfn);
    1.10          sh_unmap_domain_page(addr);
    1.11      }