rpms/kernel/F-10 linux-2.6-iommu-write-buf.patch, NONE, 1.1 kernel.spec, 1.1261, 1.1262
Chuck Ebbert
cebbert at fedoraproject.org
Sat Feb 14 00:48:20 UTC 2009
Author: cebbert
Update of /cvs/pkgs/rpms/kernel/F-10
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv21155
Modified Files:
kernel.spec
Added Files:
linux-2.6-iommu-write-buf.patch
Log Message:
Apply IOMMU write-buffer quirk. (F10#479996)
linux-2.6-iommu-write-buf.patch:
--- NEW FILE linux-2.6-iommu-write-buf.patch ---
>From dwmw2 at infradead.org Fri Feb 13 23:18:30 2009
Subject: [2.6.29 PATCH] Fix Intel IOMMU write-buffer flushing
This is the cause of the DMA faults and disk corruption that people have
been seeing. Some chipsets neglect to report the RWBF "capability" --
the flag which says that we need to flush the chipset write-buffer when
changing the DMA page tables, to ensure that the change is visible to
the IOMMU.
Override that bit on the affected chipsets, and everything is happy
again.
Thanks to Chris and Bhavesh and others for helping to debug.
Signed-off-by: David Woodhouse <David.Woodhouse at intel.com>
diff --git a/drivers/pci/intel-iommu.c b/drivers/pci/intel-iommu.c
index 3dfecb2..812a3ec 100644
--- a/drivers/pci/intel-iommu.c
+++ b/drivers/pci/intel-iommu.c
@@ -61,6 +61,8 @@
/* global iommu list, set NULL for ignored DMAR units */
static struct intel_iommu **g_iommus;
+static int rwbf_quirk = 0;
+
/*
* 0: Present
* 1-11: Reserved
@@ -777,7 +779,7 @@ static void iommu_flush_write_buffer(struct intel_iommu *iommu)
u32 val;
unsigned long flag;
- if (!cap_rwbf(iommu->cap))
+ if (!rwbf_quirk && !cap_rwbf(iommu->cap))
return;
val = iommu->gcmd | DMA_GCMD_WBF;
@@ -3129,3 +3131,13 @@ static struct iommu_ops intel_iommu_ops = {
.unmap = intel_iommu_unmap_range,
.iova_to_phys = intel_iommu_iova_to_phys,
};
+
+static void __devinit quirk_iommu_rwbf(struct pci_dev *dev)
+{
+ /* Mobile 4 Series Chipset neglects to set RWBF capability,
+ but needs it */
+ printk(KERN_INFO "DMAR: Forcing write-buffer flush capability\n");
+ rwbf_quirk = 1;
+}
+
+DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, 0x2a40, quirk_iommu_rwbf);
--
David Woodhouse Open Source Technology Centre
David.Woodhouse at intel.com Intel Corporation
Index: kernel.spec
===================================================================
RCS file: /cvs/pkgs/rpms/kernel/F-10/kernel.spec,v
retrieving revision 1.1261
retrieving revision 1.1262
diff -u -r1.1261 -r1.1262
--- kernel.spec 14 Feb 2009 00:11:43 -0000 1.1261
+++ kernel.spec 14 Feb 2009 00:47:49 -0000 1.1262
@@ -12,7 +12,7 @@
# that the kernel isn't the stock distribution kernel, for example,
# by setting the define to ".local" or ".bz123456"
#
-#% define buildid .local
+# % define buildid .local
# fedora_build defines which build revision of this kernel version we're
# building. Rather than incrementing forever, as with the prior versioning
@@ -583,6 +583,8 @@
# Git trees.
Patch10: git-cpufreq.patch
+Patch15: linux-2.6-iommu-write-buf.patch
+
# Standalone patches
Patch20: linux-2.6-hotfixes.patch
@@ -1017,6 +1019,8 @@
ApplyPatch linux-2.6-hotfixes.patch
+ApplyPatch linux-2.6-iommu-write-buf.patch
+
# Roland's utrace ptrace replacement.
ApplyPatch linux-2.6-utrace.patch
@@ -1748,6 +1752,9 @@
%kernel_variant_files -k vmlinux %{with_kdump} kdump
%changelog
+* Fri Feb 13 2009 Chuck Ebbert <cebbert at redhat.com> 2.6.29-0.32.rc5
+- Apply IOMMU write-buffer quirk. (F10#479996)
+
* Fri Feb 13 2009 Chuck Ebbert <cebbert at redhat.com> 2.6.29-0.31.rc5
- 2.6.29-rc5
More information about the fedora-extras-commits
mailing list