|
|
|
|
|
|
|
|
|
|
xen-changelog
[Xen-changelog] [xen-unstable] vt-d: do not enable VT-d on acpi=off
# HG changeset patch
# User Keir Fraser <keir.fraser@xxxxxxxxxx>
# Date 1255946278 -3600
# Node ID 5f28661bb2bbfd903b79d52e2aeabc4e4cb1f4d8
# Parent ba5fe6e2abb6a0643d8b889de0f460a9bf985058
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/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 ba5fe6e2abb6 -r 5f28661bb2bb xen/drivers/passthrough/iommu.c
--- a/xen/drivers/passthrough/iommu.c Mon Oct 19 10:56:58 2009 +0100
+++ b/xen/drivers/passthrough/iommu.c Mon Oct 19 10:57:58 2009 +0100
@@ -266,9 +266,13 @@ int iommu_setup(void)
{
int rc = -ENODEV;
- rc = iommu_hardware_setup();
-
- iommu_enabled = (rc == 0);
+ if ( acpi_disabled )
+ iommu_enabled = 0;
+ else
+ {
+ rc = iommu_hardware_setup();
+ iommu_enabled = (rc == 0);
+ }
if ( force_iommu && !iommu_enabled )
panic("IOMMU setup failed, crash Xen for security purpose!\n");
diff -r ba5fe6e2abb6 -r 5f28661bb2bb xen/drivers/passthrough/vtd/intremap.c
--- a/xen/drivers/passthrough/vtd/intremap.c Mon Oct 19 10:56:58 2009 +0100
+++ b/xen/drivers/passthrough/vtd/intremap.c Mon Oct 19 10:57:58 2009 +0100
@@ -575,8 +575,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);
@@ -594,8 +593,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 ba5fe6e2abb6 -r 5f28661bb2bb xen/drivers/passthrough/vtd/iommu.c
--- a/xen/drivers/passthrough/vtd/iommu.c Mon Oct 19 10:56:58 2009 +0100
+++ b/xen/drivers/passthrough/vtd/iommu.c Mon Oct 19 10:57:58 2009 +0100
@@ -1349,8 +1349,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);
@@ -1364,7 +1363,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-unstable] vt-d: do not enable VT-d on acpi=off,
Xen patchbot-unstable <=
|
|
|
|
|