]>
Commit | Line | Data |
---|---|---|
2cb7cef9 BS |
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 | |
6 | ||
7 | Signed-off-by: Thomas Renninger <trenn@suse.de> | |
8 | ||
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. | |
12 | ||
13 | For now, Support for IOTLB invalidation using queued invalidation is | |
14 | missing. Meanwhile, disable DMA-remapping, if Interrupt-remapping | |
15 | support is detected. | |
16 | ||
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. | |
20 | ||
21 | And given that none of the release platforms support intr-remapping yet, | |
22 | we should be ok for this temporary hack. | |
23 | ||
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 | |
30 | Cc: steiner@sgi.com | |
31 | Signed-off-by: Ingo Molnar <mingo@elte.hu> | |
32 | ||
33 | --- | |
34 | drivers/pci/dmar.c | 25 +++++++++++++++++++++++++ | |
35 | 1 file changed, 25 insertions(+) | |
36 | ||
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) | |
42 | ||
43 | #ifdef CONFIG_DMAR | |
44 | { | |
45 | + struct acpi_table_dmar *dmar; | |
46 | + /* | |
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. | |
51 | + */ | |
52 | + dmar = (struct acpi_table_dmar *) dmar_tbl; | |
53 | + if (ret && cpu_has_x2apic && dmar->flags & 0x1) { | |
54 | + printk(KERN_INFO | |
55 | + "Queued invalidation will be enabled to support " | |
56 | + "x2apic and Intr-remapping.\n"); | |
57 | + printk(KERN_INFO | |
58 | + "Disabling IOMMU detection, because of missing " | |
59 | + "queued invalidation support for IOTLB " | |
60 | + "invalidation\n"); | |
61 | + printk(KERN_INFO | |
62 | + "Use \"nox2apic\", if you want to use Intel " | |
63 | + " IOMMU for DMA-remapping and don't care about " | |
64 | + " x2apic support\n"); | |
65 | + | |
66 | + dmar_disabled = 1; | |
67 | + return; | |
68 | + } | |
69 | + | |
70 | if (ret && !no_iommu && !iommu_detected && !swiotlb && | |
71 | !dmar_disabled) | |
72 | iommu_detected = 1; |