mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH v2 0/2] KVM: s390: vsie: fix instruction retry for nested guests in ESA mode
@ 2026-11-25 16:56 Yvan Janssens
  2026-11-25 16:56 ` [PATCH v2 1/2] KVM: s390: vsie: Rewind the PSW of ESA mode guests in the right format Yvan Janssens
  2026-11-25 16:56 ` [PATCH v2 2/2] KVM: s390: selftests: Add a test for nested guests in ESA mode Yvan Janssens
  0 siblings, 2 replies; 3+ messages in thread
From: Yvan Janssens @ 2026-11-25 16:56 UTC (permalink / raw)
  To: Christian Borntraeger, Janosch Frank, Claudio Imbrenda
  Cc: David Hildenbrand, Eric Farman, Hendrik Brueckner,
	Heiko Carstens, Vasily Gorbik, Alexander Gordeev, Sven Schnelle,
	Paolo Bonzini, Sean Christopherson, Shuah Khan, kvm, linux-s390,
	linux-kselftest, linux-kernel

This series of patches fixes vsie rewinding the PSW of ESA-mode nested
guests in the wrong doubleword, which made an intercepted instruction be
skipped instead of repeated. Patch 1 is the fix, patch 2 is a selftest
that reproduces the issue. The base is the current mainline
(v7.4-rc4-260).

Claude has been used to try to find this bug; it was used to figure out
what went wrong and what would be the most appropriate way to fix the
problem. I've reviewed, verified and tested the results myself on my own
machine (MTM 3907).

Changes in v2:
- patch 1: shorter commit message;
- patch 1: removed the comment block above vsie_rewind_psw(), added a
  short comment in the ESA branch (as requested by Janosch);
- dropped the Assisted-by trailers (removed from the documentation in
  the 7.4 cycle); the AI assistance is disclosed above instead;
- no code change in patch 2.

v1: https://lore.kernel.org/all/20261125151607.3039477-1-yvanj@cyber.gent/

Also - a note on the context of this fix; these problems were identified
when trying to bring up Proxmox on s390x in my lab while adding support
for non-Linux guests. This bug was found while trying to bring up z/VM
as a KVM guest. There is another patch set on its way as an RFC to add
the ESA/390-compatibility mode for first-level KVM guests, for programs
that start in ESA/390 mode themselves, such as stand-alone utilities and
the early IPL code of older systems. z/VM's ESA guests, e.g. CMS,
already run as nested guests with this fix; what is still missing there
is support for its ESA/XC guests, which is later work.

I understand the concern wrt. ESA accommodations; the annoying thing is
that there are a bunch of potential guest OSes from the transition
period from ESA to z/Arch only that need this to work to survive their
initial bootstrap until they can reach z/Architecture mode; one example
here is the IPL text used in z/OS 1.10->1.12.

I also understand that the support cycle for these systems expired long
ago, and that the support cycle for a 3907 has also expired. My
remaining question here is if you are open to support for this, as long
as this does not provide a significant amount of overhead for
maintenance.

If you want to discuss this off-list, I'm also available on the Open
Mainframe Project Slack.

Yvan Janssens (2):
  KVM: s390: vsie: Rewind the PSW of ESA mode guests in the right format
  KVM: s390: selftests: Add a test for nested guests in ESA mode

 arch/s390/kvm/s390/vsie.c                     |  18 +-
 tools/testing/selftests/kvm/Makefile.kvm      |   1 +
 .../selftests/kvm/s390/vsie_esa_test.c        | 180 ++++++++++++++++++
 3 files changed, 197 insertions(+), 2 deletions(-)
 create mode 100644 tools/testing/selftests/kvm/s390/vsie_esa_test.c


base-commit: 4dce97c6c265544342e716e62fd24bbb232590c5
-- 
2.47.3


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

end of thread, other threads:[~2026-11-25 16:56 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-11-25 16:56 [PATCH v2 0/2] KVM: s390: vsie: fix instruction retry for nested guests in ESA mode Yvan Janssens
2026-11-25 16:56 ` [PATCH v2 1/2] KVM: s390: vsie: Rewind the PSW of ESA mode guests in the right format Yvan Janssens
2026-11-25 16:56 ` [PATCH v2 2/2] KVM: s390: selftests: Add a test for nested guests in ESA mode Yvan Janssens

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

all inboxes | Powered by JetHome®