1 From: Suresh Siddha <suresh.b.siddha@intel.com>
2 Subject: x64, x2apic/intr-remap: disable DMA-remapping if Interrupt-remapping is detected (temporary quirk)
3 References: fate #303948 and fate #303984
4 Patch-Mainline: queued for .28
5 Commit-ID: 1cb11583a6c4ceda7426eb36f7bf0419da8dfbc2
7 Signed-off-by: Thomas Renninger <trenn@suse.de>
9 Interrupt-remapping enables queued invalidation. And once queued invalidation
10 is enabled, IOTLB invalidation also needs to use the queued invalidation
11 mechanism and the register based IOTLB invalidation doesn't work.
13 For now, Support for IOTLB invalidation using queued invalidation is
14 missing. Meanwhile, disable DMA-remapping, if Interrupt-remapping
17 For the meanwhile, if someone wants to really enable DMA-remapping, they
18 can use nox2apic, which will disable interrupt-remapping and as such
19 doesn't enable queued invalidation.
21 And given that none of the release platforms support intr-remapping yet,
22 we should be ok for this temporary hack.
24 Signed-off-by: Suresh Siddha <suresh.b.siddha@intel.com>
25 Cc: akpm@linux-foundation.org
26 Cc: arjan@linux.intel.com
27 Cc: andi@firstfloor.org
28 Cc: ebiederm@xmission.com
29 Cc: jbarnes@virtuousgeek.org
31 Signed-off-by: Ingo Molnar <mingo@elte.hu>
34 drivers/pci/dmar.c | 25 +++++++++++++++++++++++++
35 1 file changed, 25 insertions(+)
37 Index: linux-2.6.26/drivers/pci/dmar.c
38 ===================================================================
39 --- linux-2.6.26.orig/drivers/pci/dmar.c
40 +++ linux-2.6.26/drivers/pci/dmar.c
41 @@ -459,6 +459,31 @@ void __init detect_intel_iommu(void)
45 + struct acpi_table_dmar *dmar;
47 + * for now we will disable dma-remapping when interrupt
48 + * remapping is enabled.
49 + * When support for queued invalidation for IOTLB invalidation
50 + * is added, we will not need this any more.
52 + dmar = (struct acpi_table_dmar *) dmar_tbl;
53 + if (ret && cpu_has_x2apic && dmar->flags & 0x1) {
55 + "Queued invalidation will be enabled to support "
56 + "x2apic and Intr-remapping.\n");
58 + "Disabling IOMMU detection, because of missing "
59 + "queued invalidation support for IOTLB "
62 + "Use \"nox2apic\", if you want to use Intel "
63 + " IOMMU for DMA-remapping and don't care about "
64 + " x2apic support\n");
70 if (ret && !no_iommu && !iommu_detected && !swiotlb &&