diff options
author | David Woodhouse <David.Woodhouse@intel.com> | 2009-12-02 04:21:55 -0500 |
---|---|---|
committer | David Woodhouse <David.Woodhouse@intel.com> | 2009-12-08 05:02:52 -0500 |
commit | 5595b528b49a702c0428c0762bab60999648254c (patch) | |
tree | aa6c04a00e90eb7ac91e24aa295fc2022de4161d /drivers/pci/intel-iommu.c | |
parent | 6ecbf01c7ce4c0f4c3bdfa0e64ac6258328fda6c (diff) |
intel-iommu: Check for an RMRR which ends before it starts.
Some HP BIOSes report an RMRR region (a region which needs a 1:1 mapping
in the IOMMU for a given device) which has an end address lower than its
start address. Detect that and warn, rather than triggering the
BUG() in dma_pte_clear_range().
Cc: stable@kernel.org
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
Diffstat (limited to 'drivers/pci/intel-iommu.c')
-rw-r--r-- | drivers/pci/intel-iommu.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/drivers/pci/intel-iommu.c b/drivers/pci/intel-iommu.c index cb5cae3e020..83cabdc118d 100644 --- a/drivers/pci/intel-iommu.c +++ b/drivers/pci/intel-iommu.c | |||
@@ -2000,6 +2000,16 @@ static int iommu_prepare_identity_map(struct pci_dev *pdev, | |||
2000 | "IOMMU: Setting identity map for device %s [0x%Lx - 0x%Lx]\n", | 2000 | "IOMMU: Setting identity map for device %s [0x%Lx - 0x%Lx]\n", |
2001 | pci_name(pdev), start, end); | 2001 | pci_name(pdev), start, end); |
2002 | 2002 | ||
2003 | if (end < start) { | ||
2004 | WARN(1, "Your BIOS is broken; RMRR ends before it starts!\n" | ||
2005 | "BIOS vendor: %s; Ver: %s; Product Version: %s\n", | ||
2006 | dmi_get_system_info(DMI_BIOS_VENDOR), | ||
2007 | dmi_get_system_info(DMI_BIOS_VERSION), | ||
2008 | dmi_get_system_info(DMI_PRODUCT_VERSION)); | ||
2009 | ret = -EIO; | ||
2010 | goto error; | ||
2011 | } | ||
2012 | |||
2003 | if (end >> agaw_to_width(domain->agaw)) { | 2013 | if (end >> agaw_to_width(domain->agaw)) { |
2004 | WARN(1, "Your BIOS is broken; RMRR exceeds permitted address width (%d bits)\n" | 2014 | WARN(1, "Your BIOS is broken; RMRR exceeds permitted address width (%d bits)\n" |
2005 | "BIOS vendor: %s; Ver: %s; Product Version: %s\n", | 2015 | "BIOS vendor: %s; Ver: %s; Product Version: %s\n", |