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). There is still one scenario where those conditions are not present, but that the VSIE processor returns with effectively rc=0, resulting in additional (and unnecessary) guest work to be performed. For this case, rewind the guest PSW as we do in the other non-error exits. Fixes: 33a729a1770b ("KVM: s390: vsie: retry SIE instruction on host intercepts") Signed-off-by: Eric Farman --- arch/s390/kvm/vsie.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/arch/s390/kvm/vsie.c b/arch/s390/kvm/vsie.c index b526621d2a1b..b8064c6a4b57 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) -- 2.51.0