diff options
author | Suresh Siddha <suresh.b.siddha@intel.com> | 2008-07-10 14:16:51 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2008-07-12 02:45:00 -0400 |
commit | 1cb11583a6c4ceda7426eb36f7bf0419da8dfbc2 (patch) | |
tree | ee13b5125001f49fc162719cf5412f87707df54a /drivers/pci/dmar.c | |
parent | 32e1d0a0651004f5fe47f85a2a5c725ad579a90c (diff) |
x64, x2apic/intr-remap: disable DMA-remapping if Interrupt-remapping is detected (temporary quirk)
Interrupt-remapping enables queued invalidation. And once queued invalidation
is enabled, IOTLB invalidation also needs to use the queued invalidation
mechanism and the register based IOTLB invalidation doesn't work.
For now, Support for IOTLB invalidation using queued invalidation is
missing. Meanwhile, disable DMA-remapping, if Interrupt-remapping
support is detected.
For the meanwhile, if someone wants to really enable DMA-remapping, they
can use nox2apic, which will disable interrupt-remapping and as such
doesn't enable queued invalidation.
And given that none of the release platforms support intr-remapping yet,
we should be ok for this temporary hack.
Signed-off-by: Suresh Siddha <suresh.b.siddha@intel.com>
Cc: akpm@linux-foundation.org
Cc: arjan@linux.intel.com
Cc: andi@firstfloor.org
Cc: ebiederm@xmission.com
Cc: jbarnes@virtuousgeek.org
Cc: steiner@sgi.com
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'drivers/pci/dmar.c')
-rw-r--r-- | drivers/pci/dmar.c | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/drivers/pci/dmar.c b/drivers/pci/dmar.c index 23a119e6485e..bd2c01674f5e 100644 --- a/drivers/pci/dmar.c +++ b/drivers/pci/dmar.c | |||
@@ -457,6 +457,31 @@ void __init detect_intel_iommu(void) | |||
457 | 457 | ||
458 | #ifdef CONFIG_DMAR | 458 | #ifdef CONFIG_DMAR |
459 | { | 459 | { |
460 | struct acpi_table_dmar *dmar; | ||
461 | /* | ||
462 | * for now we will disable dma-remapping when interrupt | ||
463 | * remapping is enabled. | ||
464 | * When support for queued invalidation for IOTLB invalidation | ||
465 | * is added, we will not need this any more. | ||
466 | */ | ||
467 | dmar = (struct acpi_table_dmar *) dmar_tbl; | ||
468 | if (ret && cpu_has_x2apic && dmar->flags & 0x1) { | ||
469 | printk(KERN_INFO | ||
470 | "Queued invalidation will be enabled to support " | ||
471 | "x2apic and Intr-remapping.\n"); | ||
472 | printk(KERN_INFO | ||
473 | "Disabling IOMMU detection, because of missing " | ||
474 | "queued invalidation support for IOTLB " | ||
475 | "invalidation\n"); | ||
476 | printk(KERN_INFO | ||
477 | "Use \"nox2apic\", if you want to use Intel " | ||
478 | " IOMMU for DMA-remapping and don't care about " | ||
479 | " x2apic support\n"); | ||
480 | |||
481 | dmar_disabled = 1; | ||
482 | return; | ||
483 | } | ||
484 | |||
460 | if (ret && !no_iommu && !iommu_detected && !swiotlb && | 485 | if (ret && !no_iommu && !iommu_detected && !swiotlb && |
461 | !dmar_disabled) | 486 | !dmar_disabled) |
462 | iommu_detected = 1; | 487 | iommu_detected = 1; |