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] vt-d: Only setup rmrr identity mappings o

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] vt-d: Only setup rmrr identity mappings of the assigned devices
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Fri, 28 Dec 2007 12:00:10 -0800
Delivery-date: Fri, 28 Dec 2007 12:00:10 -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 Keir Fraser <keir.fraser@xxxxxxxxxx>
# Date 1198855587 0
# Node ID c0a9b8ab631cf4ee089c02be890f5cf42759f7bd
# Parent  19f549449cb5ed7e60c86b63b25702d24f31bd47
vt-d: Only setup rmrr identity mappings of the assigned devices

Current implementation setups identity mappings for all the rmrrs
whether the assigned device has rmrr or not. It's wasteful and not
necessary, because only USB controllers and UMA integarated graphics
devices have rmrr. This patch only setups rmrr identity mappings of
the assigned devices. If the assigned devices don't have rmrr, needn't
to setup rmrr identity mapping for guest.

BTW, this patch fixes the VT-d bug (Fail to boot smp Linux guest with
VT-d NIC assigned on IA32e platform).

Signed-off-by: Weidong Han <weidong.han@xxxxxxxxx>
---
 xen/arch/x86/hvm/vmx/vtd/intel-iommu.c |   17 ++++++++++-------
 1 files changed, 10 insertions(+), 7 deletions(-)

diff -r 19f549449cb5 -r c0a9b8ab631c xen/arch/x86/hvm/vmx/vtd/intel-iommu.c
--- a/xen/arch/x86/hvm/vmx/vtd/intel-iommu.c    Fri Dec 28 15:23:28 2007 +0000
+++ b/xen/arch/x86/hvm/vmx/vtd/intel-iommu.c    Fri Dec 28 15:26:27 2007 +0000
@@ -1866,14 +1866,17 @@ int assign_device(struct domain *d, u8 b
 
     reassign_device_ownership(dom0, d, bus, devfn);
 
-    /* setup rmrr identify mapping just once per domain */
-    for_each_rmrr_device(rmrr, pdev)
-        ret = iommu_prepare_rmrr_dev(d, rmrr, pdev);
-        if ( ret )
+    /* Setup rmrr identify mapping */
+    for_each_rmrr_device( rmrr, pdev )
+        if ( pdev->bus == bus && pdev->devfn == devfn )
         {
-            gdprintk(XENLOG_ERR VTDPREFIX,
-                     "IOMMU: mapping reserved region failed\n");
-            return ret;
+            ret = iommu_prepare_rmrr_dev(d, rmrr, pdev);
+            if ( ret )
+            {
+                gdprintk(XENLOG_ERR VTDPREFIX,
+                         "IOMMU: mapping reserved region failed\n");
+                return ret;
+            }
         }
     end_for_each_rmrr_device(rmrr, pdev)
 

_______________________________________________
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] vt-d: Only setup rmrr identity mappings of the assigned devices, Xen patchbot-unstable <=