vfio/pci: Add base BAR MemoryRegion
commit3a286732d1563bdb440718d4e68137e06af785dd
authorAlex Williamson <alex.williamson@redhat.com>
Tue, 6 Feb 2018 18:08:25 +0000 (6 11:08 -0700)
committerAlex Williamson <alex.williamson@redhat.com>
Tue, 6 Feb 2018 18:08:25 +0000 (6 11:08 -0700)
tree6ab4cc8b5a57a85bfc09984e19ad21aa04adcfe0
parentedd09278932ac24adbf23ca7f7329bebaa7d9741
vfio/pci: Add base BAR MemoryRegion

Add one more layer to our stack of MemoryRegions, this base region
allows us to register BARs independently of the vfio region or to
extend the size of BARs which do map to a region.  This will be
useful when we want hypervisor defined BARs or sections of BARs,
for purposes such as relocating MSI-X emulation.  We therefore call
msix_init() based on this new base MemoryRegion, while the quirks,
which only modify regions still operate on those sub-MemoryRegions.

Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
hw/vfio/pci.c
hw/vfio/pci.h