qemu/include/hw/pci
Huaitong Han a9403bfcd9 vhost: Don't set vring call if guest notifier is unused
The vring call fd is set even when the guest does not use MSI-X (e.g., in the
case of virtio PMD), leading to unnecessary CPU overhead for processing
interrupts.

The commit 96a3d98d2c("vhost: don't set vring call if no vector") optimized the
case where MSI-X is enabled but the queue vector is unset. However, there's an
additional case where the guest uses INTx and the INTx_DISABLED bit in the PCI
config is set, meaning that no interrupt notifier will actually be used.

In such cases, the vring call fd should also be cleared to avoid redundant
interrupt handling.

Fixes: 96a3d98d2c("vhost: don't set vring call if no vector")

Reported-by: Zhiyuan Yuan <yuanzhiyuan@chinatelecom.cn>
Signed-off-by: Jidong Xia <xiajd@chinatelecom.cn>
Signed-off-by: Huaitong Han <hanht2@chinatelecom.cn>
Message-Id: <20250522100548.212740-1-hanht2@chinatelecom.cn>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
2025-06-02 14:29:15 -04:00
..
msi.h hw/xen: Support MSI mapping to PIRQ 2023-03-01 09:09:22 +00:00
msix.h msix: Assert that specified vector is in range 2022-11-07 14:08:17 -05:00
pci.h vhost: Don't set vring call if guest notifier is unused 2025-06-02 14:29:15 -04:00
pci_bridge.h virtio-pci: fix memory_region_find for VirtIOPCIRegion's MR 2024-11-04 16:03:24 -05:00
pci_bus.h hw/pci: modify pci_setup_iommu() to set PCIIOMMUOps 2023-11-03 09:20:31 +01:00
pci_device.h pci: Cache the bus mastering status in the device 2025-06-01 06:38:53 -04:00
pci_host.h hw/pci-host: Remove unused pci_host_data_be_ops 2025-05-20 08:04:18 +02:00
pci_ids.h hw/vmapple/virtio-blk: Add support for apple virtio-blk 2025-03-04 14:45:34 +01:00
pci_regs.h pcie: Add 1.2 version token for the Power Management Capability 2022-03-06 05:08:23 -05:00
pcie.h pcie: Helper functions to check to check if PRI is enabled 2025-06-01 06:38:53 -04:00
pcie_aer.h pci: remove some types from typedefs.h 2024-05-03 15:47:48 +02:00
pcie_doe.h hw/nvme: Add SPDM over DOE support 2024-07-22 20:15:42 -04:00
pcie_host.h include/system: Move exec/memory.h to system/memory.h 2025-04-23 14:08:21 -07:00
pcie_port.h hw/pci: Remove unused pcie_chassis_find_slot 2024-10-03 17:26:06 +03:00
pcie_regs.h pcie: Add a helper to declare the PRI capability for a pcie device 2025-06-01 06:38:53 -04:00
pcie_sriov.h pcie_sriov: Make a PCI device with user-created VF ARI-capable 2025-05-14 05:39:14 -04:00
shpc.h include/system: Move exec/memory.h to system/memory.h 2025-04-23 14:08:21 -07:00
slotid_cap.h Include qemu-common.h exactly where needed 2019-06-12 13:20:20 +02:00