KVM Archive mirror
 help / color / mirror / Atom feed
From: Eric Farman <farman@linux.ibm.com>
To: Christian Borntraeger <borntraeger@linux.ibm.com>,
	David Hildenbrand <david@redhat.com>,
	Janosch Frank <frankja@linux.ibm.com>,
	Claudio Imbrenda <imbrenda@linux.ibm.com>
Cc: kvm@vger.kernel.org, linux-s390@vger.kernel.org,
	Heiko Carstens <hca@linux.ibm.com>,
	Vasily Gorbik <gor@linux.ibm.com>,
	Alexander Gordeev <agordeev@linux.ibm.com>,
	Sven Schnelle <svens@linux.ibm.com>
Subject: Re: [PATCH] KVM: s390: vsie: retry SIE instruction on host intercepts
Date: Mon, 04 Mar 2024 10:37:29 -0500	[thread overview]
Message-ID: <8fbd41c0fb16a5e10401f6c2888d44084e9af86a.camel@linux.ibm.com> (raw)
In-Reply-To: <1deb0e32-7351-45d2-a342-96a659402be8@linux.ibm.com>

On Mon, 2024-03-04 at 09:44 +0100, Christian Borntraeger wrote:
> 
> 
> Am 04.03.24 um 09:35 schrieb David Hildenbrand:
> > On 01.03.24 21:43, Eric Farman wrote:
> > > It's possible that SIE exits for work that the host needs to
> > > perform
> > > rather than something that is intended for the guest.
> > > 
> > > A Linux guest will ignore this intercept code since there is
> > > nothing
> > > for it to do, but a more robust solution would rewind the PSW
> > > back to
> > > the SIE instruction. This will transparently resume the guest
> > > once
> > > the host completes its work, without the guest needing to process
> > > what is effectively a NOP and re-issue SIE itself.
> > 
> > I recall that 0-intercepts are valid by the architecture. Further,
> > I recall that there were some rather tricky corner cases where
> > avoiding 0-intercepts would not be that easy.

Any chance you recall any details of those corner cases? I can try to
chase some of them down.

> > 
> > Now, it's been a while ago, and maybe I misremember. SoI'm trusting
> > people with access to documentation can review this.
> 
> Yes, 0-intercepts are allowed, and this also happens when LPAR has an
> exit.

From an offline conversation I'd had some months back:

"""
The arch does allow ICODE=0 to be stored, but it's supposed to happen
only upon a host interruption -- in which case the old PSW is supposed
to point back at the SIE, to resume guest execution if the host should
LPSW oldPSW.
"""

> So this patch is not necessary, the question is if this would be an
> valuable optimization?

It's a reasonable question. I don't think I have a reasonable way of
measuring the exit, though. :/

  reply	other threads:[~2024-03-04 15:37 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-03-01 20:43 [PATCH] KVM: s390: vsie: retry SIE instruction on host intercepts Eric Farman
2024-03-04  8:35 ` David Hildenbrand
2024-03-04  8:44   ` Christian Borntraeger
2024-03-04 15:37     ` Eric Farman [this message]
2024-04-29 10:18       ` Christian Borntraeger
2024-04-30 19:31         ` Eric Farman

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=8fbd41c0fb16a5e10401f6c2888d44084e9af86a.camel@linux.ibm.com \
    --to=farman@linux.ibm.com \
    --cc=agordeev@linux.ibm.com \
    --cc=borntraeger@linux.ibm.com \
    --cc=david@redhat.com \
    --cc=frankja@linux.ibm.com \
    --cc=gor@linux.ibm.com \
    --cc=hca@linux.ibm.com \
    --cc=imbrenda@linux.ibm.com \
    --cc=kvm@vger.kernel.org \
    --cc=linux-s390@vger.kernel.org \
    --cc=svens@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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).