qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Philippe Mathieu-Daudé" <philippe@mathieu-daude.net>
To: Richard Henderson <richard.henderson@linaro.org>,
	Thomas Huth <huth@tuxfamily.org>
Cc: Aleksandar Markovic <amarkovic@wavecomp.com>,
	"qemu-devel@nongnu.org Developers" <qemu-devel@nongnu.org>,
	Alex Richardson <Alexander.Richardson@cl.cam.ac.uk>,
	Aleksandar Rikalo <aleksandar.rikalo@rt-rk.com>,
	James Clarke <jrtc27@jrtc27.com>,
	Aurelien Jarno <aurelien@aurel32.net>
Subject: Re: [PATCH] target/mips: Fix ll/sc after 7dd547e5ab6b31e7a0cfc182d3ad131dd55a948f
Date: Mon, 3 Feb 2020 10:35:50 +0100	[thread overview]
Message-ID: <CAAdtpL4hH_ogA4jqsd=U2Xt58q2c_1OqnaM-oLpLqqfeX9_RFQ@mail.gmail.com> (raw)
In-Reply-To: <75960e9f-3d28-4db6-ba9a-098b576c6d9d@linaro.org>

On Mon, Feb 3, 2020 at 8:52 AM Richard Henderson
<richard.henderson@linaro.org> wrote:
> On 2/2/20 3:34 PM, James Clarke wrote:
> > From: Alex Richardson <Alexander.Richardson@cl.cam.ac.uk>
> >
> > After 7dd547e5ab6b31e7a0cfc182d3ad131dd55a948f the env->llval value is
> > loaded as an unsigned value (instead of sign-extended as before).
> > Therefore, the CMPXCHG in gen_st_cond() in translate.c fails if the sign
> > bit is set in the loaded value.
> > Fix this by sign-extending the llval value for the 32-bit case.

Thanks!

This fix the problem I spent my Saturday debugging:
https://lists.gnu.org/archive/html/qemu-devel/2020-02/msg00071.html
Too bad we crossed by few hours, you'd have saved my Saturday.

Thomas, I think this also fixes the problem you reported here:
https://www.mail-archive.com/qemu-devel@nongnu.org/msg676025.html

Tested-by: Philippe Mathieu-Daudé <f4bug@amsat.org>

> >
> > I discovered this issue because FreeBSD MIPS64 was looping forever in an
> > atomic helper function when trying to start /sbin/init.
> >
> > Signed-off-by: Alex Richardson <Alexander.Richardson@cl.cam.ac.uk>
> > Fixes: 7dd547e5ab6b ("target/mips: Use cpu_*_mmuidx_ra instead of MMU_MODE*_SUFFIX")
> > Buglink: https://bugs.launchpad.net/qemu/+bug/1861605
> > Cc: Aurelien Jarno <aurelien@aurel32.net>
> > Cc: Aleksandar Markovic <amarkovic@wavecomp.com>
> > Cc: Aleksandar Rikalo <aleksandar.rikalo@rt-rk.com>
> > Cc: Richard Henderson <richard.henderson@linaro.org>
> > Signed-off-by: James Clarke <jrtc27@jrtc27.com>
> > ---
> >  target/mips/op_helper.c | 8 ++++----
> >  1 file changed, 4 insertions(+), 4 deletions(-)
>
> My fault.  Sorry about that.
>
> Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
>
>
> r~
>


  reply	other threads:[~2020-02-03  9:36 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-02-02 15:34 [PATCH] target/mips: Fix ll/sc after 7dd547e5ab6b31e7a0cfc182d3ad131dd55a948f James Clarke
2020-02-03  7:52 ` Richard Henderson
2020-02-03  9:35   ` Philippe Mathieu-Daudé [this message]
2020-02-03 14:24   ` [EXTERNAL]Re: " Aleksandar Markovic

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='CAAdtpL4hH_ogA4jqsd=U2Xt58q2c_1OqnaM-oLpLqqfeX9_RFQ@mail.gmail.com' \
    --to=philippe@mathieu-daude.net \
    --cc=Alexander.Richardson@cl.cam.ac.uk \
    --cc=aleksandar.rikalo@rt-rk.com \
    --cc=amarkovic@wavecomp.com \
    --cc=aurelien@aurel32.net \
    --cc=huth@tuxfamily.org \
    --cc=jrtc27@jrtc27.com \
    --cc=qemu-devel@nongnu.org \
    --cc=richard.henderson@linaro.org \
    /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).