qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] [PATCH] vfio/pci: Allow MSI-X relocation to fixup bogus PBA


From: Alex Williamson
Subject: [Qemu-devel] [PATCH] vfio/pci: Allow MSI-X relocation to fixup bogus PBA
Date: Tue, 04 Jun 2019 13:28:53 -0600
User-agent: StGit/0.19-dirty

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 <address@hidden>
---
 hw/vfio/pci.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

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);




reply via email to

[Prev in Thread] Current Thread [Next in Thread]