vfio/pci: Fixup v0 PCIe capabilities
commit47985727e383eee191a39cc007541c17cd8680ee
authorAlex Williamson <alex.williamson@redhat.com>
Mon, 10 Jul 2017 16:39:43 +0000 (10 10:39 -0600)
committerAlex Williamson <alex.williamson@redhat.com>
Mon, 10 Jul 2017 16:39:43 +0000 (10 10:39 -0600)
tree7b57a973c840e256f9aed13ff5e60974bb7b0112
parent7da624e26a4ef149927fe0ac187148f24306412f
vfio/pci: Fixup v0 PCIe capabilities

Intel 82599 VFs report a PCIe capability version of 0, which is
invalid.  The earliest version of the PCIe spec used version 1.  This
causes Windows to fail startup on the device and it will be disabled
with error code 10.  Our choices are either to drop the PCIe cap on
such devices, which has the side effect of likely preventing the guest
from discovering any extended capabilities, or performing a fixup to
update the capability to the earliest valid version.  This implements
the latter.

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