vfio/pci: Emulate BARs
commit04f336b05ff54f53234b391e444226d8c2481fb7
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)
treeb0239c61212185f0326e59a08ef6ed06c777ddbe
parent3a286732d1563bdb440718d4e68137e06af785dd
vfio/pci: Emulate BARs

The kernel provides similar emulation of PCI BAR register access to
QEMU, so up until now we've used that for things like BAR sizing and
storing the BAR address.  However, if we intend to resize BARs or add
BARs that don't exist on the physical device, we need to switch to the
pure QEMU emulation of the BAR.

Tested-by: Alexey Kardashevskiy <aik@ozlabs.ru>
Reviewed-by: Eric Auger <eric.auger@redhat.com>
Tested-by: Eric Auger <eric.auger@redhat.com>
Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
hw/vfio/pci.c