From: Cornelia Huck <cohuck@redhat.com>
To: Thomas Huth <thuth@redhat.com>
Cc: qemu-s390x@nongnu.org, qemu-devel@nongnu.org,
Janosch Frank <frankja@linux.ibm.com>
Subject: Re: [PATCH] tests/boot-sector: Fix the bad s390x assembler code
Date: Wed, 18 Dec 2019 17:53:03 +0100 [thread overview]
Message-ID: <20191218175303.4ba0e378.cohuck@redhat.com> (raw)
In-Reply-To: <20191217150642.27946-1-thuth@redhat.com>
On Tue, 17 Dec 2019 16:06:42 +0100
Thomas Huth <thuth@redhat.com> wrote:
> There are currently two bugs in s390x_code[]: First, the initial jump
> uses the wrong offset, so it was jumping to 0x1014 instead of 0x1010.
> Second, LHI only loads the lower 32-bit of the register.
>
> Everything worked fine as long as the s390-ccw bios code was jumping
> here with r3 containing zeroes in the uppermost 48 bit - which just
> happened to be the case so far by accident. But we can not rely on this
> fact, and indeed one of the recent suggested patches to jump2ipl.c cause
> the newer GCCs to put different values into r3. In that case the code
> from s390x_code[] crashes very ungracefully.
>
> Thus let's make sure to jump to the right instruction, and use LGHI
> instead of LHI to make sure that we always zero out the upper bits
> of the register.
>
> Signed-off-by: Thomas Huth <thuth@redhat.com>
> ---
> tests/boot-sector.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
Thanks, applied.
prev parent reply other threads:[~2019-12-18 16:54 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-12-17 15:06 [PATCH] tests/boot-sector: Fix the bad s390x assembler code Thomas Huth
2019-12-18 11:47 ` Cornelia Huck
2019-12-18 14:49 ` Christian Borntraeger
2019-12-18 16:53 ` Cornelia Huck [this message]
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=20191218175303.4ba0e378.cohuck@redhat.com \
--to=cohuck@redhat.com \
--cc=frankja@linux.ibm.com \
--cc=qemu-devel@nongnu.org \
--cc=qemu-s390x@nongnu.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;
as well as URLs for NNTP newsgroup(s).