vfio/pci: Config window quirks
commit0e54f24a5b4bb756715928058b60a7d5f70ccd7f
authorAlex Williamson <alex.williamson@redhat.com>
Wed, 23 Sep 2015 19:04:48 +0000 (23 13:04 -0600)
committerAlex Williamson <alex.williamson@redhat.com>
Wed, 23 Sep 2015 19:04:48 +0000 (23 13:04 -0600)
tree745f7fd0d063c8045adf6a197687b64aef1ef118
parent954258a5f11b51abd1ceed7c96d1204d4cef1353
vfio/pci: Config window quirks

Config windows make use of an address register and a data register.
In VGA cards, these are often used to provide real mode code in the
BIOS an easy way to access MMIO registers since the window often
resides in an I/O port register.  When the MMIO register has a mirror
of PCI config space, we need to trap those accesses and redirect them
to emulated config space.

The previous version of this functionality made use of a single
MemoryRegion and single match address.  This version uses separate
MemoryRegions for each of the address and data registers and allows
for multiple match addresses.  This is useful for Nvidia cards which
have two ranges which index into PCI config space.

The previous implementation is left for the follow-on patch for a more
reviewable diff.

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