All of lore.kernel.org
 help / color / mirror / Atom feed
From: Rahul Pathak <rpathak@ventanamicro.com>
To: qemu-riscv@nongnu.org, qemu-devel@nongnu.org, bmeng.cn@gmail.com,
	Alistair.Francis@wdc.com
Cc: rpathak@ventanamicro.com
Subject: [PATCH v2 1/2] target/riscv: Add priv spec 1.12.0 version check
Date: Mon, 25 Oct 2021 18:13:18 +0530	[thread overview]
Message-ID: <20211025124319.195290-2-rpathak@ventanamicro.com> (raw)
In-Reply-To: <20211025124319.195290-1-rpathak@ventanamicro.com>

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")) {
             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



  reply	other threads:[~2021-10-25 12:57 UTC|newest]

Thread overview: 15+ 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 ` Rahul Pathak [this message]
2021-10-27  2:38   ` [PATCH v2 1/2] target/riscv: Add priv spec 1.12.0 version check Alistair Francis
2021-10-27  2:38     ` Alistair Francis
2021-10-28  2:32     ` Rahul Pathak
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-27  2:42     ` Alistair Francis
2021-10-28  2:31     ` Rahul Pathak
2021-10-28  2:31       ` Rahul Pathak
2021-10-27  2:44 ` [PATCH v2 0/2] mconfigptr support Alistair Francis
2021-10-27  2:44   ` Alistair Francis
2021-10-28  2:34   ` Rahul Pathak
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=20211025124319.195290-2-rpathak@ventanamicro.com \
    --to=rpathak@ventanamicro.com \
    --cc=Alistair.Francis@wdc.com \
    --cc=bmeng.cn@gmail.com \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.