aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJan Beulich <jbeulich@suse.com>2013-04-02 12:31:36 +0200
committerJan Beulich <jbeulich@suse.com>2013-04-02 12:31:36 +0200
commit842a6cedc61eabe5731ef192bf39dad66403d0c6 (patch)
tree0bf614d7c2951ff0a11ad83029ea9c6b7e830a56
parent0734ad109457365d8801601860fd98077944dd15 (diff)
downloadxen-842a6cedc61eabe5731ef192bf39dad66403d0c6.tar.gz
xen-842a6cedc61eabe5731ef192bf39dad66403d0c6.tar.bz2
xen-842a6cedc61eabe5731ef192bf39dad66403d0c6.zip
AMD IOMMU: allow disabling only interrupt remapping when certain IVRS consistency checks fail
After some more thought on the XSA-36 and specifically the comments we got regarding disabling the IOMMU in this situation altogether making things worse instead of better, I came to the conclusion that we can actually restrict the action in affected cases to just disabling interrupt remapping. That doesn't make the situation worse than prior to the XSA-36 fixes (where interrupt remapping didn't really protect domains from one another), but allows at least DMA isolation to still be utilized. To do so, disabling of interrupt remapping must be explicitly requested on the command line - respective checks will then be skipped. Signed-off-by: Jan Beulich <jbeulich@suse.com> Acked-by: Suravee Suthikulanit <suravee.suthikulpanit@amd.com> master changeset: 92b8bc03bd4b582cb524db51494d0dba7607e7ac master date: 2013-03-25 16:55:22 +0100
-rw-r--r--xen/drivers/passthrough/amd/iommu_acpi.c5
-rw-r--r--xen/drivers/passthrough/amd/iommu_init.c5
2 files changed, 7 insertions, 3 deletions
diff --git a/xen/drivers/passthrough/amd/iommu_acpi.c b/xen/drivers/passthrough/amd/iommu_acpi.c
index eb9c13cbb2..73524384c2 100644
--- a/xen/drivers/passthrough/amd/iommu_acpi.c
+++ b/xen/drivers/passthrough/amd/iommu_acpi.c
@@ -664,6 +664,9 @@ static u16 __init parse_ivhd_device_special(
return dev_length;
}
+ if ( !iommu_intremap )
+ return dev_length;
+
/*
* Some BIOSes have IOAPIC broken entries so we check for IVRS
* consistency here --- whether entry's IOAPIC ID is valid and
@@ -902,7 +905,7 @@ static int __init parse_ivrs_table(struct acpi_table_header *_table)
}
/* Each IO-APIC must have been mentioned in the table. */
- for ( apic = 0; !error && apic < nr_ioapics; ++apic )
+ for ( apic = 0; !error && iommu_intremap && apic < nr_ioapics; ++apic )
{
if ( !nr_ioapic_registers[apic] ||
ioapic_bdf[IO_APIC_ID(apic)].pin_setup )
diff --git a/xen/drivers/passthrough/amd/iommu_init.c b/xen/drivers/passthrough/amd/iommu_init.c
index 31acec9310..fcb7e87f5f 100644
--- a/xen/drivers/passthrough/amd/iommu_init.c
+++ b/xen/drivers/passthrough/amd/iommu_init.c
@@ -971,7 +971,8 @@ int __init amd_iommu_init(void)
BUG_ON( !iommu_found() );
- if ( amd_iommu_perdev_intremap && amd_sp5100_erratum28() )
+ if ( iommu_intremap && amd_iommu_perdev_intremap &&
+ amd_sp5100_erratum28() )
goto error_out;
irq_to_iommu = xmalloc_array(struct amd_iommu *, nr_irqs);
@@ -991,7 +992,7 @@ int __init amd_iommu_init(void)
goto error_out;
/* initialize io-apic interrupt remapping entries */
- if ( amd_iommu_setup_ioapic_remapping() != 0 )
+ if ( iommu_intremap && amd_iommu_setup_ioapic_remapping() != 0 )
goto error_out;
/* allocate and initialize a global device table shared by all iommus */