From: Alistair Francis <alistair23@gmail.com>
To: "Fea.Wang" <fea.wang@sifive.com>
Cc: qemu-devel@nongnu.org, qemu-riscv@nongnu.org,
Palmer Dabbelt <palmer@dabbelt.com>,
Alistair Francis <alistair.francis@wdc.com>,
Bin Meng <bmeng.cn@gmail.com>, Weiwei Li <liwei1518@gmail.com>,
Daniel Henrique Barboza <dbarboza@ventanamicro.com>,
Liu Zhiwei <zhiwei_liu@linux.alibaba.com>
Subject: Re: [PATCH v4 6/6] target/riscv: Check svukte is not enabled in RV32
Date: Fri, 22 Nov 2024 15:00:02 +1000 [thread overview]
Message-ID: <CAKmqyKOFp3dXjvX-Q2=a2ny3aDv33B064dFGzxgUB1cD0M5M_g@mail.gmail.com> (raw)
In-Reply-To: <20241120074854.1767780-7-fea.wang@sifive.com>
On Wed, Nov 20, 2024 at 5:47 PM Fea.Wang <fea.wang@sifive.com> wrote:
>
> Based on the spec, svukte depends on SV39, so it should not be enabled
> in RV32.
The spec explicitly says it doesn't support RV32.
>
> Signed-off-by: Fea.Wang <fea.wang@sifive.com>
> ---
> target/riscv/tcg/tcg-cpu.c | 5 +++++
> 1 file changed, 5 insertions(+)
>
> diff --git a/target/riscv/tcg/tcg-cpu.c b/target/riscv/tcg/tcg-cpu.c
> index c62c221696..4273f1f472 100644
> --- a/target/riscv/tcg/tcg-cpu.c
> +++ b/target/riscv/tcg/tcg-cpu.c
> @@ -652,6 +652,11 @@ void riscv_cpu_validate_set_extensions(RISCVCPU *cpu, Error **errp)
> return;
> }
>
> + if (mcc->misa_mxl_max == MXL_RV32 && cpu->cfg.ext_svukte) {
> + error_setg(errp, "svukte is not supported by to RV32");
"svukte is not supported for RV32"
Alistair
> + return;
> + }
> +
> /*
> * Disable isa extensions based on priv spec after we
> * validated and set everything we need.
> --
> 2.34.1
>
>
next prev parent reply other threads:[~2024-11-22 5:00 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-11-20 7:48 [PATCH v4 0/6] Introduce svukte ISA extension Fea.Wang
2024-11-20 7:48 ` [PATCH v4 1/6] target/riscv: Add svukte extension capability variable Fea.Wang
2024-11-20 7:48 ` [PATCH v4 2/6] target/riscv: Support senvcfg[UKTE] bit when svukte extension is enabled Fea.Wang
2024-11-20 7:48 ` [PATCH v4 3/6] target/riscv: Support hstatus[HUKTE] " Fea.Wang
2024-11-20 7:48 ` [PATCH v4 4/6] target/riscv: Check memory access to meet svukte rule Fea.Wang
2024-11-22 4:58 ` Alistair Francis
2024-11-20 7:48 ` [PATCH v4 5/6] target/riscv: Expose svukte ISA extension Fea.Wang
2024-11-20 7:48 ` [PATCH v4 6/6] target/riscv: Check svukte is not enabled in RV32 Fea.Wang
2024-11-22 5:00 ` Alistair Francis [this message]
2024-11-25 8:36 ` Fea Wang
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='CAKmqyKOFp3dXjvX-Q2=a2ny3aDv33B064dFGzxgUB1cD0M5M_g@mail.gmail.com' \
--to=alistair23@gmail.com \
--cc=alistair.francis@wdc.com \
--cc=bmeng.cn@gmail.com \
--cc=dbarboza@ventanamicro.com \
--cc=fea.wang@sifive.com \
--cc=liwei1518@gmail.com \
--cc=palmer@dabbelt.com \
--cc=qemu-devel@nongnu.org \
--cc=qemu-riscv@nongnu.org \
--cc=zhiwei_liu@linux.alibaba.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).