WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-changelog

[Xen-changelog] [xen-unstable] [HVM] Only treat gfns in known MMIO regio

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] [HVM] Only treat gfns in known MMIO regions as MMIO
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Fri, 23 Feb 2007 09:50:39 -0800
Delivery-date: Fri, 23 Feb 2007 10:21:17 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# HG changeset patch
# User Tim Deegan <Tim.Deegan@xxxxxxxxxxxxx>
# Date 1172241847 0
# Node ID 2c3a13993b0d1c6b374e96c5a365fe615dca2f72
# Parent  eb3ebf11abfe06232495d5a1d2fc90b1ebafb9e2
[HVM] Only treat gfns in known MMIO regions as MMIO
instead of assuming that all non-RAM addresses are MMIO
Signed-off-by: Tim Deegan <Tim.Deegan@xxxxxxxxxxxxx>
---
 xen/arch/x86/mm/shadow/multi.c |    3 ++-
 xen/include/asm-x86/p2m.h      |    6 +++---
 2 files changed, 5 insertions(+), 4 deletions(-)

diff -r eb3ebf11abfe -r 2c3a13993b0d xen/arch/x86/mm/shadow/multi.c
--- a/xen/arch/x86/mm/shadow/multi.c    Fri Feb 23 14:36:33 2007 +0000
+++ b/xen/arch/x86/mm/shadow/multi.c    Fri Feb 23 14:44:07 2007 +0000
@@ -2394,7 +2394,8 @@ static int validate_gl1e(struct vcpu *v,
     gfn = guest_l1e_get_gfn(*new_gl1e);
     gmfn = vcpu_gfn_to_mfn(v, gfn);
 
-    mmio = (is_hvm_vcpu(v) && paging_vcpu_mode_translate(v) && 
!mfn_valid(gmfn));
+    mmio = (is_hvm_vcpu(v) && paging_vcpu_mode_translate(v) && 
+            mmio_space(gfn_to_paddr(gfn)));
     l1e_propagate_from_guest(v, new_gl1e, _mfn(INVALID_MFN), gmfn, &new_sl1e, 
                              ft_prefetch, mmio);
     
diff -r eb3ebf11abfe -r 2c3a13993b0d xen/include/asm-x86/p2m.h
--- a/xen/include/asm-x86/p2m.h Fri Feb 23 14:36:33 2007 +0000
+++ b/xen/include/asm-x86/p2m.h Fri Feb 23 14:44:07 2007 +0000
@@ -86,11 +86,11 @@ static inline unsigned long get_mfn_from
     return mfn_x(gfn_to_mfn_current(pfn));
 }
 
-/* Is this guest address an mmio one? (i.e. not defined in p2m map) */
+/* Is this guest address an mmio one? */
 static inline int mmio_space(paddr_t gpa)
 {
-    unsigned long gfn = gpa >> PAGE_SHIFT;
-    return !mfn_valid(mfn_x(gfn_to_mfn_current(gfn)));
+    return (gpa >= 0xf0000000 /* 256MB hole just below 4GB */
+            || (gpa >= 0xa0000 && gpa < 0xc0000)); /* VGA hole */
 }
 
 /* Translate the frame number held in an l1e from guest to machine */

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [xen-unstable] [HVM] Only treat gfns in known MMIO regions as MMIO, Xen patchbot-unstable <=