qemu-devel
[Top][All Lists]
Advanced

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

[PATCH] vfio/pci: Don't setup VFIO MSI-X for Kunlun VF


From: Cai Huoqing
Subject: [PATCH] vfio/pci: Don't setup VFIO MSI-X for Kunlun VF
Date: Tue, 14 Dec 2021 13:45:34 +0800

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




reply via email to

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