public inbox for linux-s390@vger.kernel.org
 help / color / mirror / Atom feed
From: Claudio Imbrenda <imbrenda@linux.ibm.com>
To: David Hildenbrand <david@redhat.com>
Cc: Janosch Frank <frankja@linux.ibm.com>,
	kvm@vger.kernel.org, linux-s390@vger.kernel.org,
	thuth@redhat.com, cohuck@redhat.com
Subject: Re: [kvm-unit-tests PATCH] s390x: sie: Only overwrite r3 if it isn't needed anymore
Date: Wed, 2 Jun 2021 12:54:16 +0200	[thread overview]
Message-ID: <20210602125416.392d0868@ibm-vm> (raw)
In-Reply-To: <539ca61d-eaf8-f47f-c7ce-d5a520273517@redhat.com>

On Wed, 2 Jun 2021 11:47:12 +0200
David Hildenbrand <david@redhat.com> wrote:

> On 02.06.21 11:43, Janosch Frank wrote:
> > The lmg overwrites r3 which we later use to reference the fprs and
> > fpc. Let's do the lmg at the end where overwriting is fine.
> > 
> > Signed-off-by: Janosch Frank <frankja@linux.ibm.com>

Reviewed-by: Claudio Imbrenda <imbrenda@linux.ibm.com>

> > ---
> > 
> > Finding this took me longer than I'd like to admit. :)
> > 
> > ---
> >   s390x/cpu.S | 2 +-
> >   1 file changed, 1 insertion(+), 1 deletion(-)
> > 
> > diff --git a/s390x/cpu.S b/s390x/cpu.S
> > index e2ad56c8..82b5e25d 100644
> > --- a/s390x/cpu.S
> > +++ b/s390x/cpu.S
> > @@ -81,11 +81,11 @@ sie64a:
> >   	stg	%r3,__SF_SIE_SAVEAREA(%r15)	# save
> > guest register save area 
> >   	# Load guest's gprs, fprs and fpc
> > -	lmg	%r0,%r13,SIE_SAVEAREA_GUEST_GRS(%r3)
> >   	.irp i, 0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15
> >   	ld	\i, \i * 8 + SIE_SAVEAREA_GUEST_FPRS(%r3)
> >   	.endr
> >   	lfpc	SIE_SAVEAREA_GUEST_FPC(%r3)
> > +	lmg	%r0,%r13,SIE_SAVEAREA_GUEST_GRS(%r3)
> >   
> >   	# Move scb ptr into r14 for the sie instruction
> >   	lg	%r14,__SF_SIE_CONTROL(%r15)
> >   
> 
> Oh, that's nasty
> 
> Reviewed-by: David Hildenbrand <david@redhat.com>
> 


  reply	other threads:[~2021-06-02 10:54 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-02  9:43 [kvm-unit-tests PATCH] s390x: sie: Only overwrite r3 if it isn't needed anymore Janosch Frank
2021-06-02  9:47 ` David Hildenbrand
2021-06-02 10:54   ` Claudio Imbrenda [this message]
2021-06-02 10:55 ` Cornelia Huck

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=20210602125416.392d0868@ibm-vm \
    --to=imbrenda@linux.ibm.com \
    --cc=cohuck@redhat.com \
    --cc=david@redhat.com \
    --cc=frankja@linux.ibm.com \
    --cc=kvm@vger.kernel.org \
    --cc=linux-s390@vger.kernel.org \
    --cc=thuth@redhat.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