]> git.proxmox.com Git - mirror_qemu.git/commit
vfio/pci: Foundation for new quirk structure
authorAlex Williamson <alex.williamson@redhat.com>
Wed, 23 Sep 2015 19:04:46 +0000 (13:04 -0600)
committerAlex Williamson <alex.williamson@redhat.com>
Wed, 23 Sep 2015 19:04:46 +0000 (13:04 -0600)
commit8c4f234853d9d438dc1733ca98674b1139a87c99
treef7f9eb2c4bba660b288e059b1aa0aa370cd96da1
parent056dfcb695cde3c62b7dc1d5ed6d2e38b3a73e29
vfio/pci: Foundation for new quirk structure

VFIOQuirk hosts a single memory region and a fixed set of data fields
that try to handle all the quirk cases, but end up making those that
don't exactly match really confusing.  This patch introduces a struct
intended to provide more flexibility and simpler code.  VFIOQuirk is
stripped to its basics, an opaque data pointer for quirk specific
data and a pointer to an array of MemoryRegions with a counter.  This
still allows us to have common teardown routines, but adds much
greater flexibility to support multiple memory regions and quirk
specific data structures that are easier to maintain.  The existing
VFIOQuirk is transformed into VFIOLegacyQuirk, which further patches
will eliminate entirely.

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