Message ID | 20190315050744.7952-5-aaron.ma@canonical.com |
---|---|
State | New |
Headers | show |
Series | iommu: add kernel dma protection | expand |
diff --git a/drivers/iommu/intel-iommu.c b/drivers/iommu/intel-iommu.c index 58f77ef74cbe..1c72434af56d 100644 --- a/drivers/iommu/intel-iommu.c +++ b/drivers/iommu/intel-iommu.c @@ -1531,7 +1531,8 @@ static void iommu_enable_dev_iotlb(struct device_domain_info *info) if (info->pri_supported && !pci_reset_pri(pdev) && !pci_enable_pri(pdev, 32)) info->pri_enabled = 1; #endif - if (info->ats_supported && !pci_enable_ats(pdev, VTD_PAGE_SHIFT)) { + if (!pdev->untrusted && info->ats_supported && + !pci_enable_ats(pdev, VTD_PAGE_SHIFT)) { info->ats_enabled = 1; domain_update_iotlb(info->domain); info->ats_qdep = pci_ats_queue_depth(pdev);