From: Richard Henderson <richard.henderson@linaro.org>
To: Philipp Tomsich <philipp.tomsich@vrull.eu>,
Christoph Muellner <cmuellner@linux.com>
Cc: "Weiwei Li" <liweiwei@iscas.ac.cn>,
qemu-riscv@nongnu.org, "Anup Patel" <anup@brainfault.org>,
"Bin Meng" <bin.meng@windriver.com>,
"Atish Patra" <atishp@rivosinc.com>,
qemu-devel@nongnu.org,
"Alistair Francis" <Alistair.Francis@wdc.com>,
"Palmer Dabbelt" <palmer@dabbelt.com>,
"Frédéric Pétrot" <frederic.petrot@univ-grenoble-alpes.fr>
Subject: Re: [PATCH v3] target/riscv: Enable Zicbo[m,z,p] instructions
Date: Fri, 11 Feb 2022 09:10:24 +1100 [thread overview]
Message-ID: <313aec1f-5c19-a4a8-ef9d-ee4214e9bcd8@linaro.org> (raw)
In-Reply-To: <CAAeLtUAf-mXKupWuQR6vK3ZfEtyD57sStEDO6VCUS=4LnzGB5A@mail.gmail.com>
On 2/11/22 03:48, Philipp Tomsich wrote:
> -lq ............ ..... 010 ..... 0001111 @i
> +{
> + [
> + # *** RV32 Zicbom Standard Extension ***
> + cbo_clean 0000000 00001 ..... 010 00000 0001111 @sfence_vm
> + cbo_flush 0000000 00010 ..... 010 00000 0001111 @sfence_vm
> + cbo_inval 0000000 00000 ..... 010 00000 0001111 @sfence_vm
> +
> + # *** RV32 Zicboz Standard Extension ***
> + cbo_zero 0000000 00100 ..... 010 00000 0001111 @sfence_vm
> + ]
> +
> + # *** RVI128 lq ***
> + lq ............ ..... 010 ..... 0001111 @i
> +}
...
> +#define REQUIRE_ZICBOM(ctx) do { \
> + if (!RISCV_CPU(ctx->cs)->cfg.ext_icbom) { \
> + return false; \
> + } \
> +} while (0)
>
>
> The exception semantics seem to be broken here: if Zicbom is not implemented, but the
> requirements for lq (i.e. rv128) are satisfied, then this needs to be passed on to lq: "lq
> zero, 0(rs1)" is still expected to raise exceptions based on the permissions for the
> address at 0(rs1).
>
> There are multiple ways to do this, including:
> 1) perform a tail-call to trans_lq, in case Zicbom is not enabled (instead of just
> returning false);
> 2) use the table-based dispatch (added for XVentanaCondOps) and hook a Zicbom
> disptacher before the RVI dispatcher: if Zicbom then falls through, the RVI dispatcher
> would drop into trans_lq;
No, returning false will cause the next pattern in the { } group to be matched. No need
for other workarounds.
r~
next prev parent reply other threads:[~2022-02-10 22:12 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-02-10 16:34 [PATCH v3] target/riscv: Enable Zicbo[m,z,p] instructions Christoph Muellner
2022-02-10 16:48 ` Philipp Tomsich
2022-02-10 22:10 ` Richard Henderson [this message]
2022-02-11 2:41 ` Weiwei Li
2022-02-16 13:51 ` Christoph Müllner
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=313aec1f-5c19-a4a8-ef9d-ee4214e9bcd8@linaro.org \
--to=richard.henderson@linaro.org \
--cc=Alistair.Francis@wdc.com \
--cc=anup@brainfault.org \
--cc=atishp@rivosinc.com \
--cc=bin.meng@windriver.com \
--cc=cmuellner@linux.com \
--cc=frederic.petrot@univ-grenoble-alpes.fr \
--cc=liweiwei@iscas.ac.cn \
--cc=palmer@dabbelt.com \
--cc=philipp.tomsich@vrull.eu \
--cc=qemu-devel@nongnu.org \
--cc=qemu-riscv@nongnu.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).