Browse Source

pci: Block ATS requests when privileged mode is disabled

Signed-off-by: Clement Mathieu--Drif <clement.mathieu--drif@eviden.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Message-Id: <20251029105137.1097933-5-clement.mathieu--drif@eviden.com>
pull/319/head
CLEMENT MATHIEU--DRIF 6 months ago
committed by Michael S. Tsirkin
parent
commit
ccd162e5be
  1. 4
      hw/pci/pci.c

4
hw/pci/pci.c

@ -3171,6 +3171,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,

Loading…
Cancel
Save