From: Richard Henderson <richard.henderson@linaro.org>
To: David Hildenbrand <david@redhat.com>, qemu-devel@nongnu.org
Cc: Thomas Huth <thuth@redhat.com>, Cornelia Huck <cohuck@redhat.com>,
Nick Desaulniers <ndesaulniers@google.com>,
Christian Borntraeger <borntraeger@de.ibm.com>,
qemu-s390x@nongnu.org, Guenter Roeck <linux@roeck-us.net>
Subject: Re: [PATCH v2 2/4] s390x/tcg: Fix RISBHG
Date: Fri, 8 Jan 2021 09:38:12 -1000 [thread overview]
Message-ID: <4d239f69-57aa-b213-578f-a5d8a219bf16@linaro.org> (raw)
In-Reply-To: <20210108132049.8501-3-david@redhat.com>
On 1/8/21 3:20 AM, David Hildenbrand wrote:
> RISBHG is broken and currently hinders clang-11 builds of upstream kernels
> from booting: the kernel crashes early, while decompressing the image.
>
> [...]
> Kernel fault: interruption code 0005 ilc:2
> Kernel random base: 0000000000000000
> PSW : 0000200180000000 0000000000017a1e
> R:0 T:0 IO:0 EX:0 Key:0 M:0 W:0 P:0 AS:0 CC:2 PM:0 RI:0 EA:3
> GPRS: 0000000000000001 0000000c00000000 00000003fffffff4 00000000fffffff0
> 0000000000000000 00000000fffffff4 000000000000000c 00000000fffffff0
> 00000000fffffffc 0000000000000000 00000000fffffff8 00000000008e25a8
> 0000000000000009 0000000000000002 0000000000000008 000000000000bce0
>
> One example of a buggy instruction is:
>
> 17dde: ec 1e 00 9f 20 5d risbhg %r1,%r14,0,159,32
>
> With %r14 = 0x9 and %r1 = 0x7 should result in %r1 = 0x900000007, however,
> results in %r1 = 0.
>
> Let's interpret values of i3/i4 as documented in the PoP and make
> computation of "mask" only based on i3 and i4 and use "pmask" only at the
> very end to make sure wrapping is only applied to the high/low doubleword.
>
> With this patch, I can successfully boot a v5.11-rc2 kernel built with
> clang-11, and gcc builds keep on working.
>
> Fixes: 2d6a869833d9 ("target-s390: Implement RISBG")
> Reported-by: Nick Desaulniers <ndesaulniers@google.com>
> Cc: Guenter Roeck <linux@roeck-us.net>
> Cc: Christian Borntraeger <borntraeger@de.ibm.com>
> Signed-off-by: David Hildenbrand <david@redhat.com>
> ---
> target/s390x/translate.c | 18 ++++++++----------
> 1 file changed, 8 insertions(+), 10 deletions(-)
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
r~
next prev parent reply other threads:[~2021-01-08 19:39 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-01-08 13:20 [PATCH v2 0/4] s390x/tcg: fix booting Linux kernels compiled with clang-11 and clang-12 David Hildenbrand
2021-01-08 13:20 ` [PATCH v2 1/4] s390x/tcg: Fix ALGSI David Hildenbrand
2021-01-08 19:33 ` Richard Henderson
2021-01-08 13:20 ` [PATCH v2 2/4] s390x/tcg: Fix RISBHG David Hildenbrand
2021-01-08 19:38 ` Richard Henderson [this message]
2021-01-08 13:20 ` [PATCH v2 3/4] s390x/tcg: Only ignore content in r0 when specified via "b" or "x" David Hildenbrand
2021-01-08 19:43 ` Richard Henderson
2021-01-08 13:20 ` [PATCH v2 4/4] s390x/tcg: Ignore register content if b1/b2 is zero when handling EXECUTE David Hildenbrand
2021-01-08 19:47 ` Richard Henderson
2021-01-10 10:11 ` Thomas Huth
2021-01-08 19:00 ` [PATCH v2 0/4] s390x/tcg: fix booting Linux kernels compiled with clang-11 and clang-12 Nick Desaulniers via
2021-01-08 19:21 ` Guenter Roeck
2021-01-11 9:14 ` David Hildenbrand
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=4d239f69-57aa-b213-578f-a5d8a219bf16@linaro.org \
--to=richard.henderson@linaro.org \
--cc=borntraeger@de.ibm.com \
--cc=cohuck@redhat.com \
--cc=david@redhat.com \
--cc=linux@roeck-us.net \
--cc=ndesaulniers@google.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).