vfio/pci: Add virtual capabilities quirk infrastructure
commite3f79f3bd4582b673a3a447edfe5211188741072
authorAlex Williamson <alex.williamson@redhat.com>
Tue, 29 Aug 2017 22:05:39 +0000 (29 16:05 -0600)
committerAlex Williamson <alex.williamson@redhat.com>
Tue, 3 Oct 2017 18:57:36 +0000 (3 12:57 -0600)
tree5713b053aef75149f108b11a80f076fcae535f46
parent5b31c8229d903f27b7d6e3aa5c59e660dcc5908b
vfio/pci: Add virtual capabilities quirk infrastructure

If the hypervisor needs to add purely virtual capabilties, give us a
hook through quirks to do that.  Note that we determine the maximum
size for a capability based on the physical device, if we insert a
virtual capability, that can change.  Therefore if maximum size is
smaller after added virt capabilities, use that.

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