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: Some fixes of Intel iommu

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] vt-d: Some fixes of Intel iommu
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Sat, 24 Nov 2007 19:00:20 -0800
Delivery-date: Sat, 24 Nov 2007 19:01:20 -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 1195911623 0
# Node ID b92239112869819849028a7f333ed439bf2c8bd4
# Parent  483329e219c97cd8317f751976ee495df5fdc883
vt-d: Some fixes of Intel iommu

This patch removes a wrong if condition judgement to setup rmrr
identify mapping for guests, and passes page count rather than address
size to iommu_flush_iotlb_psi().

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

diff -r 483329e219c9 -r b92239112869 xen/arch/x86/hvm/vmx/vtd/intel-iommu.c
--- a/xen/arch/x86/hvm/vmx/vtd/intel-iommu.c    Sat Nov 24 13:39:13 2007 +0000
+++ b/xen/arch/x86/hvm/vmx/vtd/intel-iommu.c    Sat Nov 24 13:40:23 2007 +0000
@@ -1538,7 +1538,7 @@ int iommu_page_mapping(struct domain *do
     {
         iommu = drhd->iommu;
         if ( cap_caching_mode(iommu->cap) )
-            iommu_flush_iotlb_psi(iommu, domain->domain_id, iova, size, 0);
+            iommu_flush_iotlb_psi(iommu, domain->domain_id, iova, index, 0);
         else if ( cap_rwbf(iommu->cap) )
             iommu_flush_write_buffer(iommu);
     }
@@ -1726,13 +1726,11 @@ static void setup_dom0_rmrr(void)
 
     for_each_rmrr_device ( rmrr, pdev )
         ret = iommu_prepare_rmrr_dev(dom0, rmrr, pdev);
-
-    if ( ret )
-        gdprintk(XENLOG_ERR VTDPREFIX,
-                 "IOMMU: mapping reserved region failed\n");
-
+        if ( ret )
+            gdprintk(XENLOG_ERR VTDPREFIX,
+                     "IOMMU: mapping reserved region failed\n");
     end_for_each_rmrr_device ( rmrr, pdev )
-        }
+}
 
 int iommu_setup(void)
 {
@@ -1798,7 +1796,6 @@ int device_assigned(u8 bus, u8 devfn)
 
 int assign_device(struct domain *d, u8 bus, u8 devfn)
 {
-    struct hvm_iommu *hd  = domain_hvm_iommu(d);
     struct acpi_rmrr_unit *rmrr;
     struct pci_dev *pdev;
     int ret = 0;
@@ -1813,14 +1810,17 @@ int assign_device(struct domain *d, u8 b
     reassign_device_ownership(dom0, d, bus, devfn);
 
     /* setup rmrr identify mapping just once per domain */
-    if ( list_empty(&hd->pdev_list) )
-        for_each_rmrr_device(rmrr, pdev)
-            ret = iommu_prepare_rmrr_dev(d, rmrr, pdev);
-    if ( ret )
-        gdprintk(XENLOG_ERR VTDPREFIX,
-                 "IOMMU: mapping reserved region failed\n");
+    for_each_rmrr_device(rmrr, pdev)
+        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)
-        return ret;
+
+    return ret;
 }
 
 void iommu_set_pgd(struct domain *d)

_______________________________________________
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: Some fixes of Intel iommu, Xen patchbot-unstable <=