ia64/xen-unstable

changeset 11688:477a0084ff47

[XEN] Recompute shadows of PAE PSE l2es when needed.
Signed-off-by: Tim Deegan <Tim.Deegan@xensource.com>
author Tim Deegan <tim.deegan@xensource.com>
date Fri Sep 29 11:57:06 2006 +0100 (2006-09-29)
parents 792fb641ea7b
children 7e79259c2c17 c620b16d4063
files xen/arch/x86/mm/shadow/multi.c
line diff
     1.1 --- a/xen/arch/x86/mm/shadow/multi.c	Fri Sep 29 11:50:51 2006 +0100
     1.2 +++ b/xen/arch/x86/mm/shadow/multi.c	Fri Sep 29 11:57:06 2006 +0100
     1.3 @@ -2180,7 +2180,12 @@ static shadow_l1e_t * shadow_get_and_cre
     1.4      /* Get the l2e */
     1.5      sl2e = shadow_get_and_create_l2e(v, gw, &sl2mfn, ft);
     1.6      if ( sl2e == NULL ) return NULL;
     1.7 -    if ( shadow_l2e_get_flags(*sl2e) & _PAGE_PRESENT ) 
     1.8 +    /* Install the sl1 in the l2e if it wasn't there or if we need to
     1.9 +     * re-do it to fix a PSE dirty bit. */
    1.10 +    if ( shadow_l2e_get_flags(*sl2e) & _PAGE_PRESENT 
    1.11 +         && likely(ft != ft_demand_write
    1.12 +                   || (guest_l2e_get_flags(*gw->l2e) & _PAGE_DIRTY) 
    1.13 +                   || !(guest_l2e_get_flags(*gw->l2e) & _PAGE_PSE)) )
    1.14      {
    1.15          *sl1mfn = shadow_l2e_get_mfn(*sl2e);
    1.16          ASSERT(valid_mfn(*sl1mfn));