diff options
Diffstat (limited to 'drivers/iommu/intel-iommu.c')
-rw-r--r-- | drivers/iommu/intel-iommu.c | 23 |
1 files changed, 17 insertions, 6 deletions
diff --git a/drivers/iommu/intel-iommu.c b/drivers/iommu/intel-iommu.c index b9d091157884..43d5c8b8e7ad 100644 --- a/drivers/iommu/intel-iommu.c +++ b/drivers/iommu/intel-iommu.c | |||
@@ -46,6 +46,8 @@ | |||
46 | #include <asm/cacheflush.h> | 46 | #include <asm/cacheflush.h> |
47 | #include <asm/iommu.h> | 47 | #include <asm/iommu.h> |
48 | 48 | ||
49 | #include "irq_remapping.h" | ||
50 | |||
49 | #define ROOT_SIZE VTD_PAGE_SIZE | 51 | #define ROOT_SIZE VTD_PAGE_SIZE |
50 | #define CONTEXT_SIZE VTD_PAGE_SIZE | 52 | #define CONTEXT_SIZE VTD_PAGE_SIZE |
51 | 53 | ||
@@ -4234,6 +4236,21 @@ static struct iommu_ops intel_iommu_ops = { | |||
4234 | .pgsize_bitmap = INTEL_IOMMU_PGSIZES, | 4236 | .pgsize_bitmap = INTEL_IOMMU_PGSIZES, |
4235 | }; | 4237 | }; |
4236 | 4238 | ||
4239 | static void quirk_iommu_g4x_gfx(struct pci_dev *dev) | ||
4240 | { | ||
4241 | /* G4x/GM45 integrated gfx dmar support is totally busted. */ | ||
4242 | printk(KERN_INFO "DMAR: Disabling IOMMU for graphics on this chipset\n"); | ||
4243 | dmar_map_gfx = 0; | ||
4244 | } | ||
4245 | |||
4246 | DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, 0x2a40, quirk_iommu_g4x_gfx); | ||
4247 | DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, 0x2e00, quirk_iommu_g4x_gfx); | ||
4248 | DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, 0x2e10, quirk_iommu_g4x_gfx); | ||
4249 | DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, 0x2e20, quirk_iommu_g4x_gfx); | ||
4250 | DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, 0x2e30, quirk_iommu_g4x_gfx); | ||
4251 | DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, 0x2e40, quirk_iommu_g4x_gfx); | ||
4252 | DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, 0x2e90, quirk_iommu_g4x_gfx); | ||
4253 | |||
4237 | static void quirk_iommu_rwbf(struct pci_dev *dev) | 4254 | static void quirk_iommu_rwbf(struct pci_dev *dev) |
4238 | { | 4255 | { |
4239 | /* | 4256 | /* |
@@ -4242,12 +4259,6 @@ static void quirk_iommu_rwbf(struct pci_dev *dev) | |||
4242 | */ | 4259 | */ |
4243 | printk(KERN_INFO "DMAR: Forcing write-buffer flush capability\n"); | 4260 | printk(KERN_INFO "DMAR: Forcing write-buffer flush capability\n"); |
4244 | rwbf_quirk = 1; | 4261 | rwbf_quirk = 1; |
4245 | |||
4246 | /* https://bugzilla.redhat.com/show_bug.cgi?id=538163 */ | ||
4247 | if (dev->revision == 0x07) { | ||
4248 | printk(KERN_INFO "DMAR: Disabling IOMMU for graphics on this chipset\n"); | ||
4249 | dmar_map_gfx = 0; | ||
4250 | } | ||
4251 | } | 4262 | } |
4252 | 4263 | ||
4253 | DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, 0x2a40, quirk_iommu_rwbf); | 4264 | DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, 0x2a40, quirk_iommu_rwbf); |