Commit 929fde5e authored by Eric Farman's avatar Eric Farman Committed by Janosch Frank
Browse files

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: 33a729a1 ("KVM: s390: vsie: retry SIE instruction on host intercepts")
Signed-off-by: default avatarEric Farman <farman@linux.ibm.com>
Reviewed-by: default avatarChristoph Schlameuss <schlameuss@linux.ibm.com>
Reviewed-by: default avatarClaudio Imbrenda <imbrenda@linux.ibm.com>
[frankja@linux.ibm.com: Replaced commit message as agreed on the list]
Signed-off-by: default avatarJanosch Frank <frankja@linux.ibm.com>
parent 9448598b
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -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)