diff mbox series

vfio/pci: Allow MSI-X relocation to fixup bogus PBA

Message ID 155967651268.13907.5906121092622267460.stgit@gimli.home (mailing list archive)
State New, archived
Headers show
Series vfio/pci: Allow MSI-X relocation to fixup bogus PBA | expand

Commit Message

Alex Williamson June 4, 2019, 7:28 p.m. UTC
The MSI-X relocation code can sometimes be used to work around bogus
MSI-X capabilities, but this test for whether the PBA is outside of
the specified BAR causes the device to error before we can apply a
relocation.  Let it proceed if we intend to relocate MSI-X anyway.

Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
---
 hw/vfio/pci.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/hw/vfio/pci.c b/hw/vfio/pci.c
index 948e7aac5b0b..8a10bd310065 100644
--- a/hw/vfio/pci.c
+++ b/hw/vfio/pci.c
@@ -1532,7 +1532,7 @@  static void vfio_msix_early_setup(VFIOPCIDevice *vdev, Error **errp)
         if (vdev->vendor_id == PCI_VENDOR_ID_CHELSIO &&
             (vdev->device_id & 0xff00) == 0x5800) {
             msix->pba_offset = 0x1000;
-        } else {
+        } else if (vdev->msix_relo == OFF_AUTOPCIBAR_OFF) {
             error_setg(errp, "hardware reports invalid configuration, "
                        "MSIX PBA outside of specified BAR");
             g_free(msix);