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] iommu p2m ops: check guest is trans

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] [HVM] iommu p2m ops: check guest is translated, and maintain m2p consistency
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Wed, 26 Sep 2007 03:40:55 -0700
Delivery-date: Wed, 26 Sep 2007 03:43:34 -0700
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 1190282092 -3600
# Node ID a93ebecda83bbc73d01449ef6d3c89a7809db5fb
# Parent  c2d65181174119bc262da42e9d484b351dd0a7ef
[HVM] iommu p2m ops: check guest is translated, and maintain m2p consistency
Signed-off-by: Tim Deegan <Tim.Deegan@xxxxxxxxxxxxx>
---
 xen/arch/x86/mm/p2m.c |   17 ++++++++++++++++-
 1 files changed, 16 insertions(+), 1 deletion(-)

diff -r c2d651811741 -r a93ebecda83b xen/arch/x86/mm/p2m.c
--- a/xen/arch/x86/mm/p2m.c     Thu Sep 20 10:31:49 2007 +0100
+++ b/xen/arch/x86/mm/p2m.c     Thu Sep 20 10:54:52 2007 +0100
@@ -873,6 +873,18 @@ set_mmio_p2m_entry(struct domain *d, uns
 set_mmio_p2m_entry(struct domain *d, unsigned long gfn, mfn_t mfn)
 {
     int rc = 0;
+    p2m_type_t ot;
+    mfn_t omfn;
+
+    if ( !paging_mode_translate(d) )
+        return 0;
+
+    omfn = gfn_to_mfn(d, gfn, &ot);
+    if ( p2m_is_ram(ot) )
+    {
+        ASSERT(mfn_valid(omfn));
+        set_gpfn_from_mfn(mfn_x(omfn), INVALID_M2P_ENTRY);
+    }
 
     rc = set_p2m_entry(d, gfn, mfn, p2m_mmio_direct);
     if ( 0 == rc )
@@ -886,8 +898,11 @@ clear_mmio_p2m_entry(struct domain *d, u
 clear_mmio_p2m_entry(struct domain *d, unsigned long gfn)
 {
     int rc = 0;
-
     unsigned long mfn;
+
+    if ( !paging_mode_translate(d) )
+        return 0;
+
     mfn = gmfn_to_mfn(d, gfn);
     if ( INVALID_MFN == mfn )
     {

_______________________________________________
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] iommu p2m ops: check guest is translated, and maintain m2p consistency, Xen patchbot-unstable <=