s390x/pci: set kvm_msi_via_irqfd_allowed
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. Signed-off-by: Matthew Rosato <mjrosato@linux.ibm.com> Reviewed-by: Farhan Ali <alifm@linux.ibm.com> Reviewed-by: Eric Farman <farman@linux.ibm.com> Message-ID: <20251008203350.354121-1-mjrosato@linux.ibm.com> Signed-off-by: Thomas Huth <thuth@redhat.com>
This commit is contained in:
parent
00457aed51
commit
47ea726370
2 changed files with 8 additions and 0 deletions
|
|
@ -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);
|
||||
s390_pcihost_kvm_realize();
|
||||
}
|
||||
|
||||
static void s390_pcihost_unrealize(DeviceState *dev)
|
||||
|
|
|
|||
|
|
@ -14,12 +14,19 @@
|
|||
|
||||
#include "hw/s390x/s390-pci-bus.h"
|
||||
#include "hw/s390x/s390-pci-inst.h"
|
||||
#include "system/kvm.h"
|
||||
|
||||
#ifdef CONFIG_KVM
|
||||
static inline void s390_pcihost_kvm_realize(void)
|
||||
{
|
||||
kvm_msi_via_irqfd_allowed = kvm_irqfds_enabled();
|
||||
}
|
||||
|
||||
bool s390_pci_kvm_interp_allowed(void);
|
||||
int s390_pci_kvm_aif_enable(S390PCIBusDevice *pbdev, ZpciFib *fib, bool assist);
|
||||
int s390_pci_kvm_aif_disable(S390PCIBusDevice *pbdev);
|
||||
#else
|
||||
static inline void s390_pcihost_kvm_realize(void) {}
|
||||
static inline bool s390_pci_kvm_interp_allowed(void)
|
||||
{
|
||||
return false;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue