From: Eric Farman <farman@linux.ibm.com>
To: Christian Borntraeger <borntraeger@linux.ibm.com>,
Janosch Frank <frankja@linux.ibm.com>,
Claudio Imbrenda <imbrenda@linux.ibm.com>,
David Hildenbrand <david@kernel.org>,
Christoph Schlameuss <schlameuss@linux.ibm.com>
Cc: kvm@vger.kernel.org, linux-s390@vger.kernel.org,
Eric Farman <farman@linux.ibm.com>
Subject: [PATCH] KVM: s390: vsie: retry SIE when unable to get vsie_page
Date: Wed, 17 Dec 2025 04:01:07 +0100 [thread overview]
Message-ID: <20251217030107.1729776-1-farman@linux.ibm.com> (raw)
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 <farman@linux.ibm.com>
---
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
next reply other threads:[~2025-12-17 3:01 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-12-17 3:01 Eric Farman [this message]
2026-01-05 12:41 ` [PATCH] KVM: s390: vsie: retry SIE when unable to get vsie_page Janosch Frank
2026-01-05 15:46 ` Eric Farman
2026-01-14 9:50 ` Claudio Imbrenda
2026-01-15 21:17 ` Eric Farman
2026-01-16 15:45 ` Eric Farman
2026-01-16 17:01 ` Claudio Imbrenda
2026-01-19 14:49 ` Janosch Frank
2026-01-20 15:23 ` Eric Farman
2026-01-14 9:39 ` Christoph Schlameuss
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20251217030107.1729776-1-farman@linux.ibm.com \
--to=farman@linux.ibm.com \
--cc=borntraeger@linux.ibm.com \
--cc=david@kernel.org \
--cc=frankja@linux.ibm.com \
--cc=imbrenda@linux.ibm.com \
--cc=kvm@vger.kernel.org \
--cc=linux-s390@vger.kernel.org \
--cc=schlameuss@linux.ibm.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox