summaryrefslogtreecommitdiffstats
path: root/hw/vfio/pci-quirks.c
Commit message (Collapse)AuthorAgeFilesLines
...
* vfio/pci: Cleanup Nvidia 0x3d0 quirkAlex Williamson2015-09-231-65/+107
| | | | | | | | The Nvidia 0x3d0 quirk makes use of a two separate registers and gives us our first chance to make use of separate memory regions for each to simplify the code a bit. Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
* vfio/pci: Cleanup ATI 0x3c3 quirkAlex Williamson2015-09-231-17/+9Star
| | | | | | | | This is an easy quirk that really doesn't need a data structure if its own. We can pass vdev as the opaque data and access to the MemoryRegion isn't required. Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
* vfio/pci: Foundation for new quirk structureAlex Williamson2015-09-231-101/+148
| | | | | | | | | | | | | | | | 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>
* vfio/pci: Cleanup ROM blacklist quirkAlex Williamson2015-09-231-15/+25
| | | | | | | | | | | | | Create a vendor:device ID helper that we'll also use as we rework the rest of the quirks. Re-reading the config entries, even if we get more blacklist entries, is trivial overhead and only incurred during device setup. There's no need to typedef the blacklist structure, it's a static private data type used once. The elements get bumped up to uint32_t to avoid future maintenance issues if PCI_ANY_ID gets used for a blacklist entry (avoiding an actual hardware match). Our test loop is also crying out to be simplified as a for loop. Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
* vfio/pci: Split quirks to a separate fileAlex Williamson2015-09-231-0/+887
Signed-off-by: Alex Williamson <alex.williamson@redhat.com>