qemu/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
..
Kconfig kconfig: Add PCIe devices to s390x machines 2023-07-14 11:10:57 +02:00
meson.build meson: remove CONFIG_ALL 2023-12-31 09:11:28 +01:00
msi.c include: Rename sysemu/ -> system/ 2024-12-20 17:44:56 +01:00
msix.c hw/pci/msix: Warn on PBA writes 2025-02-21 07:18:03 -05:00
pci-hmp-cmds.c qapi: Move include/qapi/qmp/ to include/qobject/ 2025-02-10 15:33:16 +01:00
pci-internal.h hw/pci/aer: Make PCIE AER error injection facility available for other emulation to use. 2023-03-07 12:39:00 -05:00
pci-qmp-cmds.c pci: Move QMP commands to new hw/pci/pci-qmp-cmds.c 2022-12-19 16:15:17 +01:00
pci-stub.c hw/pci: remove return after g_assert_not_reached() 2024-09-24 13:53:35 +02:00
pci.c vhost: Don't set vring call if guest notifier is unused 2025-06-02 14:29:15 -04:00
pci_bridge.c qom: Make InterfaceInfo[] uses const 2025-04-25 17:00:41 +02:00
pci_host.c hw/pci-host: Remove unused pci_host_data_be_ops 2025-05-20 08:04:18 +02:00
pcie.c pcie: Helper functions to check to check if PRI is enabled 2025-06-01 06:38:53 -04:00
pcie_aer.c hw/pci: Constify VMState 2023-12-30 07:38:06 +11:00
pcie_doe.c hw/pci: PCIe Data Object Exchange emulation 2022-11-07 13:12:19 -05:00
pcie_host.c include/hw/pci: Split pci_device.h off pci.h 2023-01-08 01:54:22 -05:00
pcie_port.c hw/pci/pcie_port: Fix pcie_slot_is_hotpluggbale_bus typo 2025-05-08 14:22:12 +02:00
pcie_sriov.c pcie_sriov: Make a PCI device with user-created VF ARI-capable 2025-05-14 05:39:14 -04:00
shpc.c hw/pci: add some convenient trace-events for pcie and shpc hotplug 2024-03-11 22:09:42 +01:00
slotid_cap.c include/hw/pci: Split pci_device.h off pci.h 2023-01-08 01:54:22 -05:00
trace-events hw/pci/pci.c: Turn DPRINTF into trace events 2025-05-09 23:49:26 +03:00
trace.h trace: switch position of headers to what Meson requires 2020-08-21 06:18:24 -04:00