From: Alistair Francis <alistair23@gmail.com>
To: Rahul Pathak <rpathak@ventanamicro.com>
Cc: Alistair Francis <Alistair.Francis@wdc.com>,
Bin Meng <bmeng.cn@gmail.com>,
"open list:RISC-V" <qemu-riscv@nongnu.org>,
"qemu-devel@nongnu.org Developers" <qemu-devel@nongnu.org>
Subject: Re: [PATCH v2 1/2] target/riscv: Add priv spec 1.12.0 version check
Date: Wed, 27 Oct 2021 12:38:07 +1000 [thread overview]
Message-ID: <CAKmqyKORccGLiwCtFu=-M88bDXbKJiYPFh38tccB5=hBDdrCPg@mail.gmail.com> (raw)
In-Reply-To: <20211025124319.195290-2-rpathak@ventanamicro.com>
On Mon, Oct 25, 2021 at 10:55 PM Rahul Pathak <rpathak@ventanamicro.com> wrote:
>
> Signed-off-by: Rahul Pathak <rpathak@ventanamicro.com>
> ---
> target/riscv/cpu.c | 4 +++-
> target/riscv/cpu.h | 1 +
> 2 files changed, 4 insertions(+), 1 deletion(-)
>
> diff --git a/target/riscv/cpu.c b/target/riscv/cpu.c
> index 788fa0b11c..83c3814a5a 100644
> --- a/target/riscv/cpu.c
> +++ b/target/riscv/cpu.c
> @@ -405,7 +405,9 @@ static void riscv_cpu_realize(DeviceState *dev, Error **errp)
> }
>
> if (cpu->cfg.priv_spec) {
> - if (!g_strcmp0(cpu->cfg.priv_spec, "v1.11.0")) {
> + if (!g_strcmp0(cpu->cfg.priv_spec, "v1.12.0")) {
> + priv_version = PRIV_VERSION_1_12_0;
> + } else if (!g_strcmp0(cpu->cfg.priv_spec, "v1.11.0")) {
This change, actually allowing the user to enable the spec, should be
in a separate patch at the end of the series.
The idea is to add the feature, then expose it.
Alistair
> priv_version = PRIV_VERSION_1_11_0;
> } else if (!g_strcmp0(cpu->cfg.priv_spec, "v1.10.0")) {
> priv_version = PRIV_VERSION_1_10_0;
> diff --git a/target/riscv/cpu.h b/target/riscv/cpu.h
> index a33dc30be8..67c52e6f9e 100644
> --- a/target/riscv/cpu.h
> +++ b/target/riscv/cpu.h
> @@ -79,6 +79,7 @@ enum {
>
> #define PRIV_VERSION_1_10_0 0x00011000
> #define PRIV_VERSION_1_11_0 0x00011100
> +#define PRIV_VERSION_1_12_0 0x00011200
>
> #define VEXT_VERSION_0_07_1 0x00000701
>
> --
> 2.25.1
>
>
next prev parent reply other threads:[~2021-10-27 2:39 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-10-25 12:43 [PATCH v2 0/2] mconfigptr support Rahul Pathak
2021-10-25 12:43 ` [PATCH v2 1/2] target/riscv: Add priv spec 1.12.0 version check Rahul Pathak
2021-10-27 2:38 ` Alistair Francis [this message]
2021-10-28 2:32 ` Rahul Pathak
2021-10-25 12:43 ` [PATCH v2 2/2] target/riscv: csr: Implement mconfigptr CSR Rahul Pathak
2021-10-27 2:42 ` Alistair Francis
2021-10-28 2:31 ` Rahul Pathak
2021-10-27 2:44 ` [PATCH v2 0/2] mconfigptr support Alistair Francis
2021-10-28 2:34 ` Rahul Pathak
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='CAKmqyKORccGLiwCtFu=-M88bDXbKJiYPFh38tccB5=hBDdrCPg@mail.gmail.com' \
--to=alistair23@gmail.com \
--cc=Alistair.Francis@wdc.com \
--cc=bmeng.cn@gmail.com \
--cc=qemu-devel@nongnu.org \
--cc=qemu-riscv@nongnu.org \
--cc=rpathak@ventanamicro.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).