ia64/xen-unstable

changeset 18667:f4dab783b58b

x86: Add TLB flushing to HAP p2m changes

Removing an MFN from the p2m requires it to be flushed from the
guest's TLBs on HAP, like we do when we're using shadows.

Signed-off-by: Tim Deegan <Tim.Deegan@citrix.com>
author Keir Fraser <keir.fraser@citrix.com>
date Mon Oct 20 16:49:25 2008 +0100 (2008-10-20)
parents c003e5a23a4e
children 54d74fc0037c
files xen/arch/x86/mm/hap/hap.c
line diff
     1.1 --- a/xen/arch/x86/mm/hap/hap.c	Mon Oct 20 16:48:17 2008 +0100
     1.2 +++ b/xen/arch/x86/mm/hap/hap.c	Mon Oct 20 16:49:25 2008 +0100
     1.3 @@ -639,9 +639,16 @@ static void
     1.4  hap_write_p2m_entry(struct vcpu *v, unsigned long gfn, l1_pgentry_t *p,
     1.5                      mfn_t table_mfn, l1_pgentry_t new, unsigned int level)
     1.6  {
     1.7 +    uint32_t old_flags;
     1.8 +
     1.9      hap_lock(v->domain);
    1.10  
    1.11 +    old_flags = l1e_get_flags(*p);
    1.12      safe_write_pte(p, new);
    1.13 +    if ( (old_flags & _PAGE_PRESENT)
    1.14 +         && (level == 1 || (level == 2 && (old_flags & _PAGE_PSE))) )
    1.15 +             flush_tlb_mask(v->domain->domain_dirty_cpumask);
    1.16 +
    1.17  #if CONFIG_PAGING_LEVELS == 3
    1.18      /* install P2M in monitor table for PAE Xen */
    1.19      if ( level == 3 )