[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#404148: disabling hw iommu on nvidia



hey Andi,
 Debian is looking at patching our kernel to disable the hw iommu on
nvidia chipsets for the data corruption bug that's been discussed on
lkml[1]. As far as I can tell there isn't an upstream solution yet, but
Steve Langasek has proposed the following patch which seems to work
for one of our users. Would you mind taking a look at it and see if
you can pick out any obvious problems?

The full text of this discussion can be found at:
 http://bugs.debian.org/404148

[1] http://marc.info/?l=linux-kernel&m=116898325616149&w=2

--- a/arch/x86_64/kernel/io_apic.c	2007-03-22 00:54:33.000000000 -0700
+++ b/arch/x86_64/kernel/io_apic.c	2007-03-22 01:13:06.000000000 -0700
@@ -344,6 +344,22 @@
 						    "timer override.\n");
 					}
 #endif
+#ifdef CONFIG_IOMMU
+					/* Forcibly disabling nvidia HW iommu,
+					   per Debian bug #404148. */
+					if ((end_pfn > MAX_DMA32_PFN ||
+					     force_iommu) &&
+					    !iommu_aperture_allowed) {
+						printk(KERN_INFO
+    "Looks like an nvidia chipset. Disabling HW IOMMU. Override with \"iommu=allowed\"\n");
+#ifdef CONFIG_SWIOTLB
+						swiotlb = 1;
+#else
+						no_iommu = 1;
+#endif
+					}
+#endif
+
 					/* RED-PEN skip them on mptables too? */
 					return;
 
-- 
dann frazier




Reply to: