direct-io.hg

changeset 14119:78c0ae1f77f2

[HVM] Revert cset 14083
which was wrong, and not very useful.
Signed-off-by: Tim Deegan <Tim.Deegan@xensource.com>
author Tim Deegan <Tim.Deegan@xensource.com>
date Mon Feb 26 09:28:30 2007 +0000 (2007-02-26)
parents 2d3ceb082114
children a20ec270998b a70cf505aef9
files xen/arch/x86/mm/shadow/multi.c xen/include/asm-x86/p2m.h
line diff
     1.1 --- a/xen/arch/x86/mm/shadow/multi.c	Mon Feb 26 09:13:50 2007 +0000
     1.2 +++ b/xen/arch/x86/mm/shadow/multi.c	Mon Feb 26 09:28:30 2007 +0000
     1.3 @@ -2394,8 +2394,7 @@ static int validate_gl1e(struct vcpu *v,
     1.4      gfn = guest_l1e_get_gfn(*new_gl1e);
     1.5      gmfn = vcpu_gfn_to_mfn(v, gfn);
     1.6  
     1.7 -    mmio = (is_hvm_vcpu(v) && paging_vcpu_mode_translate(v) && 
     1.8 -            mmio_space(gfn_to_paddr(gfn)));
     1.9 +    mmio = (is_hvm_vcpu(v) && paging_vcpu_mode_translate(v) && !mfn_valid(gmfn));
    1.10      l1e_propagate_from_guest(v, new_gl1e, _mfn(INVALID_MFN), gmfn, &new_sl1e, 
    1.11                               ft_prefetch, mmio);
    1.12      
     2.1 --- a/xen/include/asm-x86/p2m.h	Mon Feb 26 09:13:50 2007 +0000
     2.2 +++ b/xen/include/asm-x86/p2m.h	Mon Feb 26 09:28:30 2007 +0000
     2.3 @@ -86,11 +86,11 @@ static inline unsigned long get_mfn_from
     2.4      return mfn_x(gfn_to_mfn_current(pfn));
     2.5  }
     2.6  
     2.7 -/* Is this guest address an mmio one? */
     2.8 +/* Is this guest address an mmio one? (i.e. not defined in p2m map) */
     2.9  static inline int mmio_space(paddr_t gpa)
    2.10  {
    2.11 -    return (gpa >= 0xf0000000 /* 256MB hole just below 4GB */
    2.12 -            || (gpa >= 0xa0000 && gpa < 0xc0000)); /* VGA hole */
    2.13 +    unsigned long gfn = gpa >> PAGE_SHIFT;
    2.14 +    return !mfn_valid(mfn_x(gfn_to_mfn_current(gfn)));
    2.15  }
    2.16  
    2.17  /* Translate the frame number held in an l1e from guest to machine */