Signed-off-by: Clement Mathieu--Drif <clement.mathieu--drif@eviden.com>
---
hw/pci/pci.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/hw/pci/pci.c b/hw/pci/pci.c
index acc03fd470..3c304158ac 100644
--- a/hw/pci/pci.c
+++ b/hw/pci/pci.c
@@ -3096,6 +3096,10 @@ ssize_t pci_ats_request_translation(PCIDevice *dev, uint32_t pasid,
return -EPERM;
}
+ if (priv_req && !pcie_pasid_priv_enabled(dev)) {
+ return -EPERM;
+ }
+
pci_device_get_iommu_bus_devfn(dev, &iommu_bus, &bus, &devfn);
if (iommu_bus && iommu_bus->iommu_ops->ats_request_translation) {
return iommu_bus->iommu_ops->ats_request_translation(bus,
--
2.51.0