You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
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>
5 days ago
..
msi.h hw/xen: Support MSI mapping to PIRQ 2 years ago
msix.h msix: Assert that specified vector is in range 3 years ago
pci.h vhost: Don't set vring call if guest notifier is unused 5 days ago
pci_bridge.h virtio-pci: fix memory_region_find for VirtIOPCIRegion's MR 7 months ago
pci_bus.h hw/pci: modify pci_setup_iommu() to set PCIIOMMUOps 2 years ago
pci_device.h pci: Cache the bus mastering status in the device 7 days ago
pci_host.h hw/pci-host: Remove unused pci_host_data_be_ops 3 weeks ago
pci_ids.h hw/vmapple/virtio-blk: Add support for apple virtio-blk 3 months ago
pci_regs.h pcie: Add 1.2 version token for the Power Management Capability 3 years ago
pcie.h pcie: Helper functions to check to check if PRI is enabled 7 days ago
pcie_aer.h pci: remove some types from typedefs.h 1 year ago
pcie_doe.h hw/nvme: Add SPDM over DOE support 11 months ago
pcie_host.h include/system: Move exec/memory.h to system/memory.h 2 months ago
pcie_port.h hw/pci: Remove unused pcie_chassis_find_slot 8 months ago
pcie_regs.h pcie: Add a helper to declare the PRI capability for a pcie device 7 days ago
pcie_sriov.h pcie_sriov: Make a PCI device with user-created VF ARI-capable 4 weeks ago
shpc.h include/system: Move exec/memory.h to system/memory.h 2 months ago
slotid_cap.h Include qemu-common.h exactly where needed 6 years ago