[PATCH 0/2] KVM: s390: Fix lpsw/e breaking event handling

Janosch Frank
2026-03-23T15:36:53Z

LPSW and LPSWE need to set the gbea on completion but currently don't.
Time to fix this up. LPSWEY was designed to not set the bear.

This is only ever problematic when a machine check is pending and the
guest hasn't opened the PSW machine check mask. In all other cases SIE
handles the BEAR. So impact is very low.

---
v2:
- BEAR needs to be current psw address - ilen since code 04 is
suppressing
- Added simple test
---
Janosch Frank (2):
KVM: s390: Fix lpsw/e breaking event handling
KVM: s390: selftests: Add load psw bear test

arch/s390/kvm/priv.c | 8 +-
tools/testing/selftests/kvm/Makefile.kvm | 1 +
tools/testing/selftests/kvm/s390/bear.c | 184 +++++++++++++++++++++++
3 files changed, 191 insertions(+), 2 deletions(-)
create mode 100644 tools/testing/selftests/kvm/s390/bear.c

--
2.51.0