summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorJason Wang <jasowang@redhat.com>2017-03-13 11:29:58 +0800
committerMichael S. Tsirkin <mst@redhat.com>2017-03-15 19:37:19 +0200
commit3716d5902d743e9a395b7d82f48df4fa56ed1ad3 (patch)
tree429fdbf003372857ba522d7034b0745a4d9d1e7e /include
parente45da653223869849877ee8f4b86f511f891d4f8 (diff)
downloadqemu-3716d5902d743e9a395b7d82f48df4fa56ed1ad3.tar.gz
pci: introduce a bus master container
96a8821d2141 ("virtio: unbreak virtio-pci with IOMMU after caching ring translations") tries to make IOMMU works with virtio memory region cache, but it requires IOMMU to be created before any virtio devices. This is sub optimal, fixing this by introduce a bus master container to make sure address space can be initialized during device registering, and then we can safely set alias and make bus_master_enable_region as its subregion during bus master initialization. Cc: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Jason Wang <jasowang@redhat.com> Reviewed-by: Paolo Bonzini <pbonzini@redhat.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Diffstat (limited to 'include')
-rw-r--r--include/hw/pci/pci.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/hw/pci/pci.h b/include/hw/pci/pci.h
index 9349acbfb2..713ede00bf 100644
--- a/include/hw/pci/pci.h
+++ b/include/hw/pci/pci.h
@@ -284,6 +284,7 @@ struct PCIDevice {
char name[64];
PCIIORegion io_regions[PCI_NUM_REGIONS];
AddressSpace bus_master_as;
+ MemoryRegion bus_master_container_region;
MemoryRegion bus_master_enable_region;
/* do not access the following fields */