KVM Archive mirror
 help / color / mirror / Atom feed
From: Christian Borntraeger <borntraeger@linux.ibm.com>
To: Eric Farman <farman@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, 29 Apr 2024 12:18:36 +0200	[thread overview]
Message-ID: <dceeac23-0c58-4c78-850a-d09e7b45d6e8@linux.ibm.com> (raw)
In-Reply-To: <8fbd41c0fb16a5e10401f6c2888d44084e9af86a.camel@linux.ibm.com>

Am 04.03.24 um 16:37 schrieb Eric Farman:
> 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.
> """

Just re-read the architecture again and I agree, the SIE instruction should
be nullified. So we should go forward with this somehow.

Eric, can you maybe add this to devel for CI coverage so that we see if there
are corner cases? Maybe also try to do some performance things (how many IPIs
can we get in guest2 when a guest3 is running and how many IPIs are possible
in a guest3).


  reply	other threads:[~2024-04-29 10:18 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
2024-04-29 10:18       ` Christian Borntraeger [this message]
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=dceeac23-0c58-4c78-850a-d09e7b45d6e8@linux.ibm.com \
    --to=borntraeger@linux.ibm.com \
    --cc=agordeev@linux.ibm.com \
    --cc=david@redhat.com \
    --cc=farman@linux.ibm.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).