public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/3] KVM: s390: Use generic VIRT_XFER_TO_GUEST_WORK entry helpers
@ 2025-11-25  7:45 Andrew Donnellan
  2025-11-25  7:45 ` [PATCH 1/3] KVM: s390: Add signal_exits counter Andrew Donnellan
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Andrew Donnellan @ 2025-11-25  7:45 UTC (permalink / raw)
  To: kvm, linux-s390, linux-kernel, Christian Borntraeger,
	Janosch Frank, Claudio Imbrenda, Heiko Carstens, Vasily Gorbik,
	Alexander Gordeev, Sven Schnelle
  Cc: Nicholas Miehlbradt, Thomas Gleixner, Peter Zijlstra,
	Andy Lutomirski, David Hildenbrand

This series enables VIRT_XFER_TO_GUEST_WORK on s390.

This requires:

  1) adding a signal_exits stats counter, which is used by
     kvm_handle_signal_exit()
  2) moving the point where interrupts are enabled and disabled in the
     guest entry path, so that interrupts aren't enabled until after the
     __TI_sie flag is set
  3) enabling VIRT_XFER_TO_GUEST_WORK and adding the appropriate calls to
     check for and handle outstanding work in __vcpu_run() and the VSIE
     path.

With this series applied, the kvm-unit-tests suite passes on both the host
and an L1 guest with nested KVM enabled, and benchmarks done using the
exittime tests from kvm-unit-tests show that the impact on entry path
performance is generally small enough to be noise (in my tests, around
+/-3%, running directly in an LPAR and in a L1 KVM guest).

Thanks to Heiko for feedback and guidance on this.

Signed-off-by: Andrew Donnellan <ajd@linux.ibm.com>
---
Andrew Donnellan (2):
      KVM: s390: Add signal_exits counter
      KVM: s390: Use generic VIRT_XFER_TO_GUEST_WORK functions

Heiko Carstens (1):
      KVM: s390: Enable and disable interrupts in entry code

 arch/s390/include/asm/kvm_host.h   |  1 +
 arch/s390/include/asm/stacktrace.h |  1 +
 arch/s390/kernel/asm-offsets.c     |  1 +
 arch/s390/kernel/entry.S           |  2 ++
 arch/s390/kvm/Kconfig              |  1 +
 arch/s390/kvm/kvm-s390.c           | 34 +++++++++++++++++++++-------------
 arch/s390/kvm/vsie.c               | 17 ++++++++++++-----
 7 files changed, 39 insertions(+), 18 deletions(-)
---
base-commit: ac3fd01e4c1efce8f2c054cdeb2ddd2fc0fb150d
change-id: 20251105-s390-kvm-xfer-to-guest-work-3eaba6c0ea04


--
Andrew Donnellan    OzLabs, ADL Canberra
ajd@linux.ibm.com   IBM Australia Limited


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2025-11-26  2:02 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-11-25  7:45 [PATCH 0/3] KVM: s390: Use generic VIRT_XFER_TO_GUEST_WORK entry helpers Andrew Donnellan
2025-11-25  7:45 ` [PATCH 1/3] KVM: s390: Add signal_exits counter Andrew Donnellan
2025-11-25  7:45 ` [PATCH 2/3] KVM: s390: Enable and disable interrupts in entry code Andrew Donnellan
2025-11-25  7:45 ` [PATCH 3/3] KVM: s390: Use generic VIRT_XFER_TO_GUEST_WORK functions Andrew Donnellan
2025-11-25 11:16   ` Heiko Carstens
2025-11-26  2:01     ` Andrew Donnellan

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox