direct-io.hg

changeset 11277:a926e72e0491

Merge
author tdeegan@york.uk.xensource.com
date Tue Aug 29 09:42:35 2006 +0100 (2006-08-29)
parents 20bb80e54f21 9956c3a3bd84
children 8273f730371b
files xen/arch/x86/mm/shadow/common.c
line diff
     1.1 --- a/xen/arch/x86/mm/shadow/common.c	Mon Aug 28 22:44:31 2006 +0100
     1.2 +++ b/xen/arch/x86/mm/shadow/common.c	Tue Aug 29 09:42:35 2006 +0100
     1.3 @@ -397,22 +397,14 @@ shadow_validate_guest_pt_write(struct vc
     1.4      ASSERT(shadow_lock_is_acquired(v->domain));
     1.5      rc = __shadow_validate_guest_entry(v, gmfn, entry, size);
     1.6      if ( rc & SHADOW_SET_FLUSH )
     1.7 -    {
     1.8 -        // Flush everyone except the local processor, which will flush when it
     1.9 -        // re-enters the HVM guest.
    1.10 -        //
    1.11 -        cpumask_t mask = d->domain_dirty_cpumask;
    1.12 -        cpu_clear(v->processor, mask);
    1.13 -        flush_tlb_mask(mask);
    1.14 -    }
    1.15 +        /* Need to flush TLBs to pick up shadow PT changes */
    1.16 +        flush_tlb_mask(d->domain_dirty_cpumask);
    1.17      if ( rc & SHADOW_SET_ERROR ) 
    1.18      {
    1.19          /* This page is probably not a pagetable any more: tear it out of the 
    1.20           * shadows, along with any tables that reference it */
    1.21          shadow_remove_all_shadows_and_parents(v, gmfn);
    1.22      }
    1.23 -    /* We ignore the other bits: since we are about to change CR3 on
    1.24 -     * VMENTER we don't need to do any extra TLB flushes. */ 
    1.25  }
    1.26  
    1.27  
    1.28 @@ -1129,7 +1121,7 @@ sh_gfn_to_mfn_foreign(struct domain *d, 
    1.29  
    1.30  
    1.31  #if CONFIG_PAGING_LEVELS > 2
    1.32 -    if ( gpfn > (RO_MPT_VIRT_END - RO_MPT_VIRT_START) / sizeof(l1_pgentry_t) ) 
    1.33 +    if ( gpfn >= (RO_MPT_VIRT_END-RO_MPT_VIRT_START) / sizeof(l1_pgentry_t) ) 
    1.34          /* This pfn is higher than the p2m map can hold */
    1.35          return _mfn(INVALID_MFN);
    1.36  #endif
     2.1 --- a/xen/arch/x86/mm/shadow/private.h	Mon Aug 28 22:44:31 2006 +0100
     2.2 +++ b/xen/arch/x86/mm/shadow/private.h	Tue Aug 29 09:42:35 2006 +0100
     2.3 @@ -555,7 +555,7 @@ vcpu_gfn_to_mfn_nofault(struct vcpu *v, 
     2.4          return _mfn(gfn);
     2.5  
     2.6  #if CONFIG_PAGING_LEVELS > 2
     2.7 -    if ( gfn > (RO_MPT_VIRT_END - RO_MPT_VIRT_START) / sizeof(l1_pgentry_t) ) 
     2.8 +    if ( gfn >= (RO_MPT_VIRT_END - RO_MPT_VIRT_START) / sizeof(l1_pgentry_t) ) 
     2.9          /* This pfn is higher than the p2m map can hold */
    2.10          return _mfn(INVALID_MFN);
    2.11  #endif
     3.1 --- a/xen/include/asm-x86/mm.h	Mon Aug 28 22:44:31 2006 +0100
     3.2 +++ b/xen/include/asm-x86/mm.h	Tue Aug 29 09:42:35 2006 +0100
     3.3 @@ -368,7 +368,7 @@ static inline unsigned long get_mfn_from
     3.4      int ret;
     3.5  
     3.6  #if CONFIG_PAGING_LEVELS > 2
     3.7 -    if ( pfn > (RO_MPT_VIRT_END - RO_MPT_VIRT_START) / sizeof (l1_pgentry_t) ) 
     3.8 +    if ( pfn >= (RO_MPT_VIRT_END - RO_MPT_VIRT_START) / sizeof(l1_pgentry_t) ) 
     3.9          /* This pfn is higher than the p2m map can hold */
    3.10          return INVALID_MFN;
    3.11  #endif