From: Palmer Dabbelt <palmer@sifive.com>
To: Richard Henderson <richard.henderson@linaro.org>
Cc: Carlos Eduardo de Paula <me@carlosedp.com>,
"open list:RISC-V" <qemu-riscv@nongnu.org>,
Palmer Dabbelt <palmer@sifive.com>,
qemu-devel@nongnu.org, Joel Sing <joel@sing.id.au>,
Alistair Francis <Alistair.Francis@wdc.com>,
Marco Peereboom <marco@decred.org>
Subject: Re: [Qemu-devel] [PATCH] atomic failures on qemu-system-riscv64
Date: Sun, 23 Jun 2019 23:42:42 -0700 [thread overview]
Message-ID: <CANs6eM=ir68d9KEn1_uOGVAxFp61OT2bCCJNFa+JrWnHWeMJFA@mail.gmail.com> (raw)
In-Reply-To: <41ef5fbf-f438-e60a-2fba-a72e3ad422f9@linaro.org>
On Mon, Jun 17, 2019 at 4:53 PM Richard Henderson <
richard.henderson@linaro.org> wrote:
> On 6/16/19 12:19 PM, Joel Sing wrote:
> > + /*
> > + * Clear the load reservation, since an SC must fail if there is
> > + * an SC to any address, in between an LR and SC pair.
> > + */
> > + tcg_gen_movi_tl(load_res, 0);
> > +
> > gen_set_label(l2);
>
> This clear needs to be moved down below label l2.
> Otherwise, with lr / sc / sc, the second sc could succeed in error.
>
> FWIW, other targets have used -1 as the "invalid" load reservation, since
> the
> architecture does not require address 0 to be unmapped. This should be
> quite
> visible in M-mode with paging disabled and ram at offset 0. Often, other
> targets require alignment for the lr/sc address, though I don't see that
> for riscv.
>
>
> r~
>
Joel: can you submit this with a "Signed-off-by" line? There's only a week
until the soft freeze, and I'd really like this in if possible. It'd be
great if you could fix up the other issues, but I can't even do that myself
without a SOB.
next prev parent reply other threads:[~2019-06-24 6:43 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-06-16 19:19 [Qemu-devel] [PATCH] atomic failures on qemu-system-riscv64 Joel Sing
2019-06-16 20:54 ` no-reply
2019-06-17 23:52 ` Richard Henderson
2019-06-24 6:42 ` Palmer Dabbelt [this message]
2019-06-24 18:08 ` Joel Sing
2019-06-25 15:36 ` Richard Henderson
2019-06-26 6:07 ` Palmer Dabbelt
2019-06-26 7:48 ` Richard Henderson
2019-06-26 8:25 ` Palmer Dabbelt
2019-06-26 8:30 ` Richard Henderson
2019-06-26 8:31 ` Palmer Dabbelt
2019-06-25 15:39 ` Richard Henderson
2019-06-26 6:07 ` Palmer Dabbelt
2019-09-24 18:29 ` Alistair Francis
2019-09-24 20:04 ` Palmer Dabbelt
2019-09-24 23:35 ` Alistair Francis
2019-09-25 1:01 ` Alistair Francis
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='CANs6eM=ir68d9KEn1_uOGVAxFp61OT2bCCJNFa+JrWnHWeMJFA@mail.gmail.com' \
--to=palmer@sifive.com \
--cc=Alistair.Francis@wdc.com \
--cc=joel@sing.id.au \
--cc=marco@decred.org \
--cc=me@carlosedp.com \
--cc=qemu-devel@nongnu.org \
--cc=qemu-riscv@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).