summary refs log tree commit diff stats
path: root/include/hw/pci
diff options
context:
space:
mode:
authorCLEMENT MATHIEU--DRIF <clement.mathieu--drif@eviden.com>2025-05-20 07:18:58 +0000
committerMichael S. Tsirkin <mst@redhat.com>2025-06-01 06:38:53 -0400
commit8ff9e1def0ef3388333b6cc639c9f958f97ebe05 (patch)
tree72648308fd7873cbf9d9057ff081e31be2eeb23c /include/hw/pci
parent5be8cf79188a2a1c73d16f3a8b458d909ac976f4 (diff)
downloadfocaccia-qemu-8ff9e1def0ef3388333b6cc639c9f958f97ebe05.tar.gz
focaccia-qemu-8ff9e1def0ef3388333b6cc639c9f958f97ebe05.zip
pci: Cache the bus mastering status in the device
The cached is_master value is necessary to know if a device is
allowed to issue ATS/PRI requests or not as these operations do not go
through the master_enable memory region.

Signed-off-by: Clement Mathieu--Drif <clement.mathieu--drif@eviden.com>
Message-Id: <20250520071823.764266-7-clement.mathieu--drif@eviden.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Diffstat (limited to 'include/hw/pci')
-rw-r--r--include/hw/pci/pci_device.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/hw/pci/pci_device.h b/include/hw/pci/pci_device.h
index e41d95b0b0..eee0338568 100644
--- a/include/hw/pci/pci_device.h
+++ b/include/hw/pci/pci_device.h
@@ -90,6 +90,7 @@ struct PCIDevice {
     char name[64];
     PCIIORegion io_regions[PCI_NUM_REGIONS];
     AddressSpace bus_master_as;
+    bool is_master;
     MemoryRegion bus_master_container_region;
     MemoryRegion bus_master_enable_region;