From: Eric Farman Date: Wed, 17 Dec 2025 03:01:07 +0000 (+0100) Subject: KVM: s390: vsie: retry SIE when unable to get vsie_page X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=929fde5e8457ac9af0ab63b59009102de4a08704;p=thirdparty%2Flinux.git KVM: s390: vsie: retry SIE when unable to get vsie_page SIE may exit because of pending host work, such as handling an interrupt, in which case VSIE rewinds the guest PSW such that it is transparently resumed (see Fixes tag). Unlike those other places that return rc=0, this return leaves the guest PSW in place, requiring the guest to handle a spurious intercept. This showed up when testing heavy I/O workloads, when multiple vcpus attempted to dispatch the same SIE block and incurred failures inserting them into the radix tree. Fixes: 33a729a1770b ("KVM: s390: vsie: retry SIE instruction on host intercepts") Signed-off-by: Eric Farman Reviewed-by: Christoph Schlameuss Reviewed-by: Claudio Imbrenda [frankja@linux.ibm.com: Replaced commit message as agreed on the list] Signed-off-by: Janosch Frank --- diff --git a/arch/s390/kvm/vsie.c b/arch/s390/kvm/vsie.c index b526621d2a1b0..b8064c6a4b579 100644 --- a/arch/s390/kvm/vsie.c +++ b/arch/s390/kvm/vsie.c @@ -1498,11 +1498,13 @@ int kvm_s390_handle_vsie(struct kvm_vcpu *vcpu) } vsie_page = get_vsie_page(vcpu->kvm, scb_addr); - if (IS_ERR(vsie_page)) + if (IS_ERR(vsie_page)) { return PTR_ERR(vsie_page); - else if (!vsie_page) + } else if (!vsie_page) { /* double use of sie control block - simply do nothing */ + kvm_s390_rewind_psw(vcpu, 4); return 0; + } rc = pin_scb(vcpu, vsie_page, scb_addr); if (rc)