qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] vfio/pci: Don't setup VFIO MSI-X for Kunlun VF
@ 2021-12-14  5:45 Cai Huoqing
  2021-12-21 19:16 ` Alex Williamson
  0 siblings, 1 reply; 2+ messages in thread
From: Cai Huoqing @ 2021-12-14  5:45 UTC (permalink / raw)
  To: alex.williamson; +Cc: Cai Huoqing, qemu-devel

No support MSI-X in BAIDU KUNLUN Virtual Function devices,
so add a quirk to avoid setuping VFIO MSI-X

Signed-off-by: Cai Huoqing <cai.huoqing@linux.dev>
---
 hw/vfio/pci.c | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/hw/vfio/pci.c b/hw/vfio/pci.c
index 7b45353ce2..15f76bbe56 100644
--- a/hw/vfio/pci.c
+++ b/hw/vfio/pci.c
@@ -1994,6 +1994,13 @@ static int vfio_add_std_cap(VFIOPCIDevice *vdev, uint8_t pos, Error **errp)
         ret = vfio_setup_pcie_cap(vdev, pos, size, errp);
         break;
     case PCI_CAP_ID_MSIX:
+        /*
+         * BAIDU KUNLUN Virtual Function devices for KUNLUN AI processor
+         * don't support MSI-X, so don't setup VFIO MSI-X here.
+         */
+        if (vdev->vendor_id == PCI_VENDOR_ID_BAIDU &&
+            vdev->device_id == PCI_DEVICE_ID_KUNLUN_VF)
+            break;
         ret = vfio_msix_setup(vdev, pos, errp);
         break;
     case PCI_CAP_ID_PM:
-- 
2.25.1



^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-12-21 19:19 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-12-14  5:45 [PATCH] vfio/pci: Don't setup VFIO MSI-X for Kunlun VF Cai Huoqing
2021-12-21 19:16 ` Alex Williamson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).