On 07/10/2025 22.56, Matthew Rosato wrote:
Allow irqfd to be used for virtio-pci on s390x if the kernel supports
it.  This improves s390x virtio-pci performance when using kvm
acceleration by allowing kvm to deliver interrupts instead of QEMU.

Reviewed-by: Eric Farman <[email protected]>
Signed-off-by: Matthew Rosato <[email protected]>
---
v2:
  - add review tag
  - tweak commit message (David)
---
  hw/s390x/s390-pci-bus.c | 1 +
  1 file changed, 1 insertion(+)

diff --git a/hw/s390x/s390-pci-bus.c b/hw/s390x/s390-pci-bus.c
index e8e41c8a9a..88852acf45 100644
--- a/hw/s390x/s390-pci-bus.c
+++ b/hw/s390x/s390-pci-bus.c
@@ -900,6 +900,7 @@ static void s390_pcihost_realize(DeviceState *dev, Error 
**errp)
      s390_pci_init_default_group();
      css_register_io_adapters(CSS_IO_ADAPTER_PCI, true, false,
                               S390_ADAPTER_SUPPRESSIBLE, errp);
+    kvm_msi_via_irqfd_allowed = kvm_irqfds_enabled();
  }

 Hi Matthew,

this unfortunately fails to compile without KVM (e.g. on x86 hosts):

../../devel/qemu/hw/s390x/s390-pci-bus.c: In function ‘s390_pcihost_realize’:
../../devel/qemu/hw/s390x/s390-pci-bus.c:903:5: error: ‘kvm_msi_via_irqfd_allowed’ undeclared (first use in this function); did you mean ‘kvm_msi_via_irqfd_enabled’?
  903 |     kvm_msi_via_irqfd_allowed = kvm_irqfds_enabled();
      |     ^~~~~~~~~~~~~~~~~~~~~~~~~
      |     kvm_msi_via_irqfd_enabled
../../devel/qemu/hw/s390x/s390-pci-bus.c:903:5: note: each undeclared identifier is reported only once for each function it appears in

 Thomas


Reply via email to