If the device itself reports ATS in its PCIe capabilities, but the BIOS
neglects to provide an ATSR structure to indicate that the root port can
also cope, then assume the latter is lying.

Signed-off-by: David Woodhouse <[email protected]>
---
 drivers/iommu/intel-iommu.c | 11 ++++++++---
 1 file changed, 8 insertions(+), 3 deletions(-)

diff --git a/drivers/iommu/intel-iommu.c b/drivers/iommu/intel-iommu.c
index a6fd639..b5ab009 100644
--- a/drivers/iommu/intel-iommu.c
+++ b/drivers/iommu/intel-iommu.c
@@ -1447,9 +1447,14 @@ iommu_support_dev_iotlb (struct dmar_domain *domain, 
struct intel_iommu *iommu,
        if (!pci_find_ext_capability(pdev, PCI_EXT_CAP_ID_ATS))
                return NULL;
 
-       if (!dmar_find_matched_atsr_unit(pdev))
-               return NULL;
-
+       if (!dmar_find_matched_atsr_unit(pdev)) {
+               if (intel_iommu_pasid28 && IS_GFX_DEVICE(pdev) &&
+                   pdev->vendor == 0x8086) {
+                       pr_warn("BIOS denies ATSR capability for %s; assuming 
it lies\n",
+                               dev_name(info->dev));
+               } else
+                       return NULL;
+       }
        return info;
 }
 
-- 
2.4.3

-- 
David Woodhouse                            Open Source Technology Centre
[email protected]                              Intel Corporation

Attachment: smime.p7s
Description: S/MIME cryptographic signature

_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx

Reply via email to