* [PATCH] s390x/pci: set kvm_msi_via_irqfd_allowed
@ 2025-10-01 20:05 Matthew Rosato
2025-10-01 20:07 ` Matthew Rosato
` (2 more replies)
0 siblings, 3 replies; 5+ messages in thread
From: Matthew Rosato @ 2025-10-01 20:05 UTC (permalink / raw)
To: qemu-s390x
Cc: farman, thuth, pasic, borntraeger, richard.henderson, david, iii,
qemu-devel
Allow irqfd to be used for virtio-pci on s390x if the kernel supports
it.
Signed-off-by: Matthew Rosato <mjrosato@linux.ibm.com>
---
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();
}
static void s390_pcihost_unrealize(DeviceState *dev)
--
2.51.0
^ permalink raw reply related [flat|nested] 5+ messages in thread* Re: [PATCH] s390x/pci: set kvm_msi_via_irqfd_allowed
2025-10-01 20:05 [PATCH] s390x/pci: set kvm_msi_via_irqfd_allowed Matthew Rosato
@ 2025-10-01 20:07 ` Matthew Rosato
2025-10-02 7:27 ` David Hildenbrand
2025-10-02 13:48 ` Eric Farman
2 siblings, 0 replies; 5+ messages in thread
From: Matthew Rosato @ 2025-10-01 20:07 UTC (permalink / raw)
To: qemu-s390x
Cc: farman, thuth, pasic, borntraeger, richard.henderson, david, iii,
qemu-devel
On 10/1/25 4:05 PM, Matthew Rosato wrote:
> Allow irqfd to be used for virtio-pci on s390x if the kernel supports
> it.
>
> Signed-off-by: Matthew Rosato <mjrosato@linux.ibm.com>
> ---
FWIW we've been using this change in-house for a while now under test different scenarios - AFAICT failure to set this was just a past oversight since virtio-pci is not the default/recommendation for s390x.
> 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();
> }
>
> static void s390_pcihost_unrealize(DeviceState *dev)
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] s390x/pci: set kvm_msi_via_irqfd_allowed
2025-10-01 20:05 [PATCH] s390x/pci: set kvm_msi_via_irqfd_allowed Matthew Rosato
2025-10-01 20:07 ` Matthew Rosato
@ 2025-10-02 7:27 ` David Hildenbrand
2025-10-02 13:33 ` Matthew Rosato
2025-10-02 13:48 ` Eric Farman
2 siblings, 1 reply; 5+ messages in thread
From: David Hildenbrand @ 2025-10-02 7:27 UTC (permalink / raw)
To: Matthew Rosato, qemu-s390x
Cc: farman, thuth, pasic, borntraeger, richard.henderson, iii,
qemu-devel
On 01.10.25 22:05, Matthew Rosato wrote:
> Allow irqfd to be used for virtio-pci on s390x if the kernel supports
> it.
>
> Signed-off-by: Matthew Rosato <mjrosato@linux.ibm.com>
> ---
> 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();
Just wondering, what's the net result of this patch?
I assume better performance. Might be worth adding that "why" to the
patch description.
--
Cheers
David / dhildenb
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] s390x/pci: set kvm_msi_via_irqfd_allowed
2025-10-02 7:27 ` David Hildenbrand
@ 2025-10-02 13:33 ` Matthew Rosato
0 siblings, 0 replies; 5+ messages in thread
From: Matthew Rosato @ 2025-10-02 13:33 UTC (permalink / raw)
To: David Hildenbrand, qemu-s390x
Cc: farman, thuth, pasic, borntraeger, richard.henderson, iii,
qemu-devel
On 10/2/25 3:27 AM, David Hildenbrand wrote:
> On 01.10.25 22:05, Matthew Rosato wrote:
>> Allow irqfd to be used for virtio-pci on s390x if the kernel supports
>> it.
>>
>> Signed-off-by: Matthew Rosato <mjrosato@linux.ibm.com>
>> ---
>> 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();
>
> Just wondering, what's the net result of this patch?
>
It allows the virtio-pci core code on s390x to ever decide using irqfd is OK (e.g. without this change we would always reach virtio_queue_set_guest_notifier_fd_handler(..., with_irqfd=false) because kvm_msi_via_irqfd_enabled() was guaranteed to be false.
> I assume better performance. Might be worth adding that "why" to the patch description.
>
And yes, in a nutshell it means better performance.
How about something like...
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.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] s390x/pci: set kvm_msi_via_irqfd_allowed
2025-10-01 20:05 [PATCH] s390x/pci: set kvm_msi_via_irqfd_allowed Matthew Rosato
2025-10-01 20:07 ` Matthew Rosato
2025-10-02 7:27 ` David Hildenbrand
@ 2025-10-02 13:48 ` Eric Farman
2 siblings, 0 replies; 5+ messages in thread
From: Eric Farman @ 2025-10-02 13:48 UTC (permalink / raw)
To: Matthew Rosato, qemu-s390x
Cc: thuth, pasic, borntraeger, richard.henderson, david, iii,
qemu-devel
On Wed, 2025-10-01 at 16:05 -0400, Matthew Rosato wrote:
> Allow irqfd to be used for virtio-pci on s390x if the kernel supports
> it.
>
> Signed-off-by: Matthew Rosato <mjrosato@linux.ibm.com>
> ---
> hw/s390x/s390-pci-bus.c | 1 +
> 1 file changed, 1 insertion(+)
As Matt alluded to in another reply, this is probably just historical oversight.
Reviewed-by: Eric Farman <farman@linux.ibm.com>
>
> 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();
> }
>
> static void s390_pcihost_unrealize(DeviceState *dev)
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2025-10-02 13:50 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-10-01 20:05 [PATCH] s390x/pci: set kvm_msi_via_irqfd_allowed Matthew Rosato
2025-10-01 20:07 ` Matthew Rosato
2025-10-02 7:27 ` David Hildenbrand
2025-10-02 13:33 ` Matthew Rosato
2025-10-02 13:48 ` Eric Farman
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).