ia64/xen-unstable

changeset 8133:73d19afe543c

We need to do sync when mov_to_cr3 to a value already shadowed.
The L2 page and already shadowed L1 page may be out of sync.
This fixes the problems of segmentation faults and strange prints
when booting Redhat FC3 and make kernel in FC3 in VMX domain.

Signed-off-by: Xiaofeng Ling <xiaofeng.ling@intel.com>
author kaf24@firebug.cl.cam.ac.uk
date Wed Nov 30 12:16:35 2005 +0100 (2005-11-30)
parents b6dfdbeb2780
children 590915af8117
files xen/arch/x86/shadow.c xen/arch/x86/shadow32.c
line diff
     1.1 --- a/xen/arch/x86/shadow.c	Wed Nov 30 12:13:53 2005 +0100
     1.2 +++ b/xen/arch/x86/shadow.c	Wed Nov 30 12:16:35 2005 +0100
     1.3 @@ -2154,7 +2154,8 @@ static void shadow_update_pagetables(str
     1.4  #elif CONFIG_PAGING_LEVELS == 4
     1.5          smfn = shadow_l4_table(d, gpfn, gmfn);
     1.6  #endif
     1.7 -    }
     1.8 +    }else
     1.9 +        shadow_sync_all(d);
    1.10      if ( !get_shadow_ref(smfn) )
    1.11          BUG();
    1.12      old_smfn = pagetable_get_pfn(v->arch.shadow_table);
     2.1 --- a/xen/arch/x86/shadow32.c	Wed Nov 30 12:13:53 2005 +0100
     2.2 +++ b/xen/arch/x86/shadow32.c	Wed Nov 30 12:16:35 2005 +0100
     2.3 @@ -2911,6 +2911,8 @@ void __update_pagetables(struct vcpu *v)
     2.4       */
     2.5      if ( unlikely(!(smfn = __shadow_status(d, gpfn, PGT_base_page_table))) )
     2.6          smfn = shadow_l2_table(d, gpfn, gmfn);
     2.7 +    else
     2.8 +        shadow_sync_all(d);
     2.9      if ( !get_shadow_ref(smfn) )
    2.10          BUG();
    2.11      old_smfn = pagetable_get_pfn(v->arch.shadow_table);