diff options
Diffstat (limited to 'drivers/pci/intel-iommu.c')
| -rw-r--r-- | drivers/pci/intel-iommu.c | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/drivers/pci/intel-iommu.c b/drivers/pci/intel-iommu.c index 90938c7a74c1..b0de57947189 100644 --- a/drivers/pci/intel-iommu.c +++ b/drivers/pci/intel-iommu.c | |||
| @@ -340,7 +340,7 @@ int dmar_disabled = 0; | |||
| 340 | int dmar_disabled = 1; | 340 | int dmar_disabled = 1; |
| 341 | #endif /*CONFIG_DMAR_DEFAULT_ON*/ | 341 | #endif /*CONFIG_DMAR_DEFAULT_ON*/ |
| 342 | 342 | ||
| 343 | static int __initdata dmar_map_gfx = 1; | 343 | static int dmar_map_gfx = 1; |
| 344 | static int dmar_forcedac; | 344 | static int dmar_forcedac; |
| 345 | static int intel_iommu_strict; | 345 | static int intel_iommu_strict; |
| 346 | 346 | ||
| @@ -1874,14 +1874,15 @@ static struct dmar_domain *get_domain_for_dev(struct pci_dev *pdev, int gaw) | |||
| 1874 | } | 1874 | } |
| 1875 | } | 1875 | } |
| 1876 | if (found) { | 1876 | if (found) { |
| 1877 | spin_unlock_irqrestore(&device_domain_lock, flags); | ||
| 1877 | free_devinfo_mem(info); | 1878 | free_devinfo_mem(info); |
| 1878 | domain_exit(domain); | 1879 | domain_exit(domain); |
| 1879 | domain = found; | 1880 | domain = found; |
| 1880 | } else { | 1881 | } else { |
| 1881 | list_add(&info->link, &domain->devices); | 1882 | list_add(&info->link, &domain->devices); |
| 1882 | list_add(&info->global, &device_domain_list); | 1883 | list_add(&info->global, &device_domain_list); |
| 1884 | spin_unlock_irqrestore(&device_domain_lock, flags); | ||
| 1883 | } | 1885 | } |
| 1884 | spin_unlock_irqrestore(&device_domain_lock, flags); | ||
| 1885 | } | 1886 | } |
| 1886 | 1887 | ||
| 1887 | found_domain: | 1888 | found_domain: |
| @@ -3631,7 +3632,8 @@ static int intel_iommu_attach_device(struct iommu_domain *domain, | |||
| 3631 | pte = dmar_domain->pgd; | 3632 | pte = dmar_domain->pgd; |
| 3632 | if (dma_pte_present(pte)) { | 3633 | if (dma_pte_present(pte)) { |
| 3633 | free_pgtable_page(dmar_domain->pgd); | 3634 | free_pgtable_page(dmar_domain->pgd); |
| 3634 | dmar_domain->pgd = (struct dma_pte *)dma_pte_addr(pte); | 3635 | dmar_domain->pgd = (struct dma_pte *) |
| 3636 | phys_to_virt(dma_pte_addr(pte)); | ||
| 3635 | } | 3637 | } |
| 3636 | dmar_domain->agaw--; | 3638 | dmar_domain->agaw--; |
| 3637 | } | 3639 | } |
| @@ -3724,6 +3726,8 @@ static int intel_iommu_domain_has_cap(struct iommu_domain *domain, | |||
| 3724 | 3726 | ||
| 3725 | if (cap == IOMMU_CAP_CACHE_COHERENCY) | 3727 | if (cap == IOMMU_CAP_CACHE_COHERENCY) |
| 3726 | return dmar_domain->iommu_snooping; | 3728 | return dmar_domain->iommu_snooping; |
| 3729 | if (cap == IOMMU_CAP_INTR_REMAP) | ||
| 3730 | return intr_remapping_enabled; | ||
| 3727 | 3731 | ||
| 3728 | return 0; | 3732 | return 0; |
| 3729 | } | 3733 | } |
| @@ -3747,6 +3751,12 @@ static void __devinit quirk_iommu_rwbf(struct pci_dev *dev) | |||
| 3747 | */ | 3751 | */ |
| 3748 | printk(KERN_INFO "DMAR: Forcing write-buffer flush capability\n"); | 3752 | printk(KERN_INFO "DMAR: Forcing write-buffer flush capability\n"); |
| 3749 | rwbf_quirk = 1; | 3753 | rwbf_quirk = 1; |
| 3754 | |||
| 3755 | /* https://bugzilla.redhat.com/show_bug.cgi?id=538163 */ | ||
| 3756 | if (dev->revision == 0x07) { | ||
| 3757 | printk(KERN_INFO "DMAR: Disabling IOMMU for graphics on this chipset\n"); | ||
| 3758 | dmar_map_gfx = 0; | ||
| 3759 | } | ||
| 3750 | } | 3760 | } |
| 3751 | 3761 | ||
| 3752 | DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, 0x2a40, quirk_iommu_rwbf); | 3762 | DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, 0x2a40, quirk_iommu_rwbf); |
