rpms/kernel/F-12 linux-2.6-iommu-another-hp-screwup.patch, NONE, 1.1 linux-2.6-iommu-sanity-checks-for-intr-remap-too.patch, NONE, 1.1 kernel.spec, 1.1934, 1.1935

David Woodhouse dwmw2 at fedoraproject.org
Wed Nov 25 10:39:11 UTC 2009


Author: dwmw2

Update of /cvs/pkgs/rpms/kernel/F-12
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv11479

Modified Files:
	kernel.spec 
Added Files:
	linux-2.6-iommu-another-hp-screwup.patch 
	linux-2.6-iommu-sanity-checks-for-intr-remap-too.patch 
Log Message:
Promote an attitude of violence to a BIOS engineer today

linux-2.6-iommu-another-hp-screwup.patch:
 intel-iommu.c |   10 ++++++++++
 1 file changed, 10 insertions(+)

--- NEW FILE linux-2.6-iommu-another-hp-screwup.patch ---
--- linux-2.6.31.x86_64/drivers/pci/intel-iommu.c.orig	2009-11-25 09:49:19.000000000 +0000
+++ linux-2.6.31.x86_64/drivers/pci/intel-iommu.c	2009-11-25 10:15:45.000000000 +0000
@@ -1990,6 +1990,16 @@ static int iommu_prepare_identity_map(st
 	       "IOMMU: Setting identity map for device %s [0x%Lx - 0x%Lx]\n",
 	       pci_name(pdev), start, end);
 	
+	if (end < start) {
+		WARN(1, "Your BIOS is broken; RMRR ends before it starts!\n"
+			"BIOS vendor: %s; Ver: %s; Product Version: %s\n",
+			dmi_get_system_info(DMI_BIOS_VENDOR),
+			dmi_get_system_info(DMI_BIOS_VERSION),
+		     dmi_get_system_info(DMI_PRODUCT_VERSION));
+		ret = -EIO;
+		goto error;
+	}
+
 	if (end >> agaw_to_width(domain->agaw)) {
 		WARN(1, "Your BIOS is broken; RMRR exceeds permitted address width (%d bits)\n"
 		     "BIOS vendor: %s; Ver: %s; Product Version: %s\n",

linux-2.6-iommu-sanity-checks-for-intr-remap-too.patch:
 dmar.c |   33 ++++++++++++++++++++++++++-------
 1 file changed, 26 insertions(+), 7 deletions(-)

--- NEW FILE linux-2.6-iommu-sanity-checks-for-intr-remap-too.patch ---
--- linux-2.6.31.x86_64/drivers/pci/dmar.c.orig	2009-11-25 09:49:15.000000000 +0000
+++ linux-2.6.31.x86_64/drivers/pci/dmar.c	2009-11-25 10:17:44.000000000 +0000
@@ -564,6 +564,8 @@ int __init dmar_table_init(void)
 	return 0;
 }
 
+static int bios_warned;
+
 int __init check_zero_address(void)
 {
 	struct acpi_table_dmar *dmar;
@@ -594,6 +596,7 @@ int __init check_zero_address(void)
 				     dmi_get_system_info(DMI_BIOS_VENDOR),
 				     dmi_get_system_info(DMI_BIOS_VERSION),
 				     dmi_get_system_info(DMI_PRODUCT_VERSION));
+				bios_warned = 1;
 				goto failed;
 			}
 
@@ -613,6 +616,7 @@ int __init check_zero_address(void)
 				      dmi_get_system_info(DMI_BIOS_VENDOR),
 				      dmi_get_system_info(DMI_BIOS_VERSION),
 				      dmi_get_system_info(DMI_PRODUCT_VERSION));
+				bios_warned = 1;
 				goto failed;
 			}
 		}
@@ -670,6 +674,18 @@ int alloc_iommu(struct dmar_drhd_unit *d
 	int agaw = 0;
 	int msagaw = 0;
 
+	if (!drhd->reg_base_addr) {
+		if (!bios_warned) {
+			WARN(1, "Your BIOS is broken; DMAR reported at address zero!\n"
+			     "BIOS vendor: %s; Ver: %s; Product Version: %s\n",
+			     dmi_get_system_info(DMI_BIOS_VENDOR),
+			     dmi_get_system_info(DMI_BIOS_VERSION),
+			     dmi_get_system_info(DMI_PRODUCT_VERSION));
+			bios_warned = 1;
+		}
+		return -EINVAL;
+	}
+
 	iommu = kzalloc(sizeof(*iommu), GFP_KERNEL);
 	if (!iommu)
 		return -ENOMEM;
@@ -686,13 +702,16 @@ int alloc_iommu(struct dmar_drhd_unit *d
 	iommu->ecap = dmar_readq(iommu->reg + DMAR_ECAP_REG);
 
 	if (iommu->cap == (uint64_t)-1 && iommu->ecap == (uint64_t)-1) {
-		/* Promote an attitude of violence to a BIOS engineer today */
-		WARN(1, "Your BIOS is broken; DMAR reported at address %llx returns all ones!\n"
-		     "BIOS vendor: %s; Ver: %s; Product Version: %s\n",
-		     drhd->reg_base_addr,
-		     dmi_get_system_info(DMI_BIOS_VENDOR),
-		     dmi_get_system_info(DMI_BIOS_VERSION),
-		     dmi_get_system_info(DMI_PRODUCT_VERSION));
+		if (!bios_warned) {
+			/* Promote an attitude of violence to a BIOS engineer today */
+			WARN(1, "Your BIOS is broken; DMAR reported at address %llx returns all ones!\n"
+			     "BIOS vendor: %s; Ver: %s; Product Version: %s\n",
+			     drhd->reg_base_addr,
+			     dmi_get_system_info(DMI_BIOS_VENDOR),
+			     dmi_get_system_info(DMI_BIOS_VERSION),
+			     dmi_get_system_info(DMI_PRODUCT_VERSION));
+			bios_warned = 1;
+		}
 		goto err_unmap;
 	}
 


Index: kernel.spec
===================================================================
RCS file: /cvs/pkgs/rpms/kernel/F-12/kernel.spec,v
retrieving revision 1.1934
retrieving revision 1.1935
diff -u -p -r1.1934 -r1.1935
--- kernel.spec	24 Nov 2009 00:03:01 -0000	1.1934
+++ kernel.spec	25 Nov 2009 10:39:10 -0000	1.1935
@@ -628,6 +628,8 @@ Patch100: linux-2.6-die-closed-source-bi
 Patch101: linux-2.6-intel-iommu-updates.patch
 Patch102: linux-2.6-iommu-at-zero.patch
 Patch103: linux-2.6-iommu-dmar-all-1s.patch
+Patch104: linux-2.6-iommu-another-hp-screwup.patch
+Patch105: linux-2.6-iommu-sanity-checks-for-intr-remap-too.patch
 
 Patch141: linux-2.6-ps3-storage-alias.patch
 Patch143: linux-2.6-g5-therm-shutdown.patch
@@ -1241,6 +1243,10 @@ ApplyPatch linux-2.6-die-closed-source-b
 ApplyPatch linux-2.6-intel-iommu-updates.patch
 ApplyPatch linux-2.6-iommu-at-zero.patch
 ApplyPatch linux-2.6-iommu-dmar-all-1s.patch
+# Check for RMRRs which end before they start
+ApplyPatch linux-2.6-iommu-another-hp-screwup.patch
+# Apply the 'at zero' and 'all 0xFF' sanity checks for intr_remap too
+ApplyPatch linux-2.6-iommu-sanity-checks-for-intr-remap-too.patch
 
 #
 # PowerPC
@@ -2142,6 +2148,9 @@ fi
 # and build.
 
 %changelog
+* Wed Nov 25 2009 David Woodhouse <David.Woodhouse at intel.com> 2.6.31.6-149
+- VT-d: Work around more HP BIOS brokenness.
+
 * Tue Nov 24 2009 Dave Airlie <airlied at redhat.com> 2.6.31.6-148
 - radeon: flush HDP cache on rendering wait - fixes r600 rendercheck failure
 




More information about the fedora-extras-commits mailing list