mirror of
https://github.com/qemu/qemu.git
synced 2026-05-07 04:46:12 +00:00
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>
This commit is contained in:
committed by
Michael S. Tsirkin
parent
b7e31028a3
commit
ccd162e5be
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user