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-3.4-testing] vt-d: do not enable VT-d on acpi=off

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-3.4-testing] vt-d: do not enable VT-d on acpi=off
From: "Xen patchbot-3.4-testing" <patchbot-3.4-testing@xxxxxxxxxxxxxxxxxxx>
Date: Mon, 19 Oct 2009 04:10:14 -0700
Delivery-date: Mon, 19 Oct 2009 04:10:34 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
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/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/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 1255950447 -3600
# Node ID 7e2169ea6687a3aca87998a139ef38a56c2906a2
# Parent  6a4ff02131a67a73b223efff6e7d1bf475156cce
vt-d: do not enable VT-d on acpi=off

This reverts changeset 20323: 2370e16ab6d3 and adds a small
check to iommu_setup() which should more correctly cover all cases.

Signed-off-by: Dexuan Cui <dexuan.cui@xxxxxxxxx>
xen-unstable changeset:   20338:5f28661bb2bb
xen-unstable date:        Mon Oct 19 10:57:58 2009 +0100
---
 xen/drivers/passthrough/iommu.c        |   10 +++++++---
 xen/drivers/passthrough/vtd/intremap.c |    6 ++----
 xen/drivers/passthrough/vtd/iommu.c    |    5 ++---
 3 files changed, 11 insertions(+), 10 deletions(-)

diff -r 6a4ff02131a6 -r 7e2169ea6687 xen/drivers/passthrough/iommu.c
--- a/xen/drivers/passthrough/iommu.c   Mon Oct 19 12:03:53 2009 +0100
+++ b/xen/drivers/passthrough/iommu.c   Mon Oct 19 12:07:27 2009 +0100
@@ -266,9 +266,13 @@ static int iommu_setup(void)
     if ( !iommu_enabled )
         goto out;
 
-    rc = iommu_hardware_setup();
-
-    iommu_enabled = (rc == 0);
+    if ( acpi_disabled )
+        iommu_enabled = 0;
+    else
+    {
+        rc = iommu_hardware_setup();
+        iommu_enabled = (rc == 0);
+    }
 
  out:
     if ( force_iommu && !iommu_enabled )
diff -r 6a4ff02131a6 -r 7e2169ea6687 xen/drivers/passthrough/vtd/intremap.c
--- a/xen/drivers/passthrough/vtd/intremap.c    Mon Oct 19 12:03:53 2009 +0100
+++ b/xen/drivers/passthrough/vtd/intremap.c    Mon Oct 19 12:07:27 2009 +0100
@@ -460,8 +460,7 @@ void msi_msg_read_remap_rte(
     struct iommu *iommu = NULL;
     struct ir_ctrl *ir_ctrl;
 
-    if ( (drhd = acpi_find_matched_drhd_unit(pdev)) == NULL )
-        return;
+    drhd = acpi_find_matched_drhd_unit(pdev);
     iommu = drhd->iommu;
 
     ir_ctrl = iommu_ir_ctrl(iommu);
@@ -479,8 +478,7 @@ void msi_msg_write_remap_rte(
     struct iommu *iommu = NULL;
     struct ir_ctrl *ir_ctrl;
 
-    if ( (drhd = acpi_find_matched_drhd_unit(pdev)) == NULL )
-        return;
+    drhd = acpi_find_matched_drhd_unit(pdev);
     iommu = drhd->iommu;
 
     ir_ctrl = iommu_ir_ctrl(iommu);
diff -r 6a4ff02131a6 -r 7e2169ea6687 xen/drivers/passthrough/vtd/iommu.c
--- a/xen/drivers/passthrough/vtd/iommu.c       Mon Oct 19 12:03:53 2009 +0100
+++ b/xen/drivers/passthrough/vtd/iommu.c       Mon Oct 19 12:07:27 2009 +0100
@@ -1411,8 +1411,7 @@ static int reassign_device_ownership(
     if (!pdev)
         return -ENODEV;
 
-    if ( (drhd = acpi_find_matched_drhd_unit(pdev)) == NULL )
-        return -ENODEV;
+    drhd = acpi_find_matched_drhd_unit(pdev);
     pdev_iommu = drhd->iommu;
     domain_context_unmap(source, bus, devfn);
 
@@ -1426,7 +1425,7 @@ static int reassign_device_ownership(
     for_each_pdev ( source, pdev )
     {
         drhd = acpi_find_matched_drhd_unit(pdev);
-        if ( drhd && drhd->iommu == pdev_iommu )
+        if ( drhd->iommu == pdev_iommu )
         {
             found = 1;
             break;

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

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [xen-3.4-testing] vt-d: do not enable VT-d on acpi=off, Xen patchbot-3.4-testing <=