From: Alistair Francis <alistair.francis@wdc.com> To: qemu-devel@nongnu.org, qemu-riscv@nongnu.org Cc: alistair23@gmail.com, palmer@sifive.com, alistair.francis@wdc.com Subject: [Qemu-devel] [PATCH v1 9/9] target/riscv: Add Zifencei and Zicsr as command line options Date: Mon, 17 Jun 2019 18:31:25 -0700 [thread overview] Message-ID: <b1a3188a4d5538d4d0ed0a77114926a2fdae1258.1560821342.git.alistair.francis@wdc.com> (raw) In-Reply-To: <cover.1560821342.git.alistair.francis@wdc.com> For completeness let's add Zifencei and Zicsr as command line options, even though they can't be disabled at the moment. Signed-off-by: Alistair Francis <alistair.francis@wdc.com> --- target/riscv/cpu.c | 9 +++++++++ target/riscv/cpu.h | 2 ++ 2 files changed, 11 insertions(+) diff --git a/target/riscv/cpu.c b/target/riscv/cpu.c index 5af1c9b38c..53cf8607f7 100644 --- a/target/riscv/cpu.c +++ b/target/riscv/cpu.c @@ -409,6 +409,13 @@ static void riscv_cpu_realize(DeviceState *dev, Error **errp) set_misa(env, RVXLEN | target_misa); } + if (!cpu->cfg.ext_ifencei) { + warn_report("QEMU does not support disabling Zifencei"); + } + if (!cpu->cfg.ext_icsr) { + warn_report("QEMU does not support disabling Zicsr"); + } + riscv_cpu_register_gdb_regs_for_features(cs); qemu_init_vcpu(cs); @@ -441,6 +448,8 @@ static Property riscv_cpu_properties[] = { DEFINE_PROP_BOOL("s", RISCVCPU, cfg.ext_s, true), DEFINE_PROP_BOOL("u", RISCVCPU, cfg.ext_u, true), DEFINE_PROP_BOOL("Counters", RISCVCPU, cfg.ext_counters, true), + DEFINE_PROP_BOOL("Zifencei", RISCVCPU, cfg.ext_ifencei, true), + DEFINE_PROP_BOOL("Zicsr", RISCVCPU, cfg.ext_icsr, true), DEFINE_PROP_STRING("priv_spec", RISCVCPU, cfg.priv_spec), DEFINE_PROP_BOOL("mmu", RISCVCPU, cfg.mmu, true), DEFINE_PROP_BOOL("pmp", RISCVCPU, cfg.pmp, true), diff --git a/target/riscv/cpu.h b/target/riscv/cpu.h index 786f620564..b4c212dfcf 100644 --- a/target/riscv/cpu.h +++ b/target/riscv/cpu.h @@ -222,6 +222,8 @@ typedef struct RISCVCPU { bool ext_s; bool ext_u; bool ext_counters; + bool ext_ifencei; + bool ext_icsr; char *priv_spec; char *user_spec; -- 2.22.0
WARNING: multiple messages have this Message-ID (diff)
From: Alistair Francis <alistair.francis@wdc.com> To: qemu-devel@nongnu.org, qemu-riscv@nongnu.org Cc: palmer@sifive.com, alistair.francis@wdc.com, alistair23@gmail.com Subject: [Qemu-riscv] [PATCH v1 9/9] target/riscv: Add Zifencei and Zicsr as command line options Date: Mon, 17 Jun 2019 18:31:25 -0700 [thread overview] Message-ID: <b1a3188a4d5538d4d0ed0a77114926a2fdae1258.1560821342.git.alistair.francis@wdc.com> (raw) In-Reply-To: <cover.1560821342.git.alistair.francis@wdc.com> For completeness let's add Zifencei and Zicsr as command line options, even though they can't be disabled at the moment. Signed-off-by: Alistair Francis <alistair.francis@wdc.com> --- target/riscv/cpu.c | 9 +++++++++ target/riscv/cpu.h | 2 ++ 2 files changed, 11 insertions(+) diff --git a/target/riscv/cpu.c b/target/riscv/cpu.c index 5af1c9b38c..53cf8607f7 100644 --- a/target/riscv/cpu.c +++ b/target/riscv/cpu.c @@ -409,6 +409,13 @@ static void riscv_cpu_realize(DeviceState *dev, Error **errp) set_misa(env, RVXLEN | target_misa); } + if (!cpu->cfg.ext_ifencei) { + warn_report("QEMU does not support disabling Zifencei"); + } + if (!cpu->cfg.ext_icsr) { + warn_report("QEMU does not support disabling Zicsr"); + } + riscv_cpu_register_gdb_regs_for_features(cs); qemu_init_vcpu(cs); @@ -441,6 +448,8 @@ static Property riscv_cpu_properties[] = { DEFINE_PROP_BOOL("s", RISCVCPU, cfg.ext_s, true), DEFINE_PROP_BOOL("u", RISCVCPU, cfg.ext_u, true), DEFINE_PROP_BOOL("Counters", RISCVCPU, cfg.ext_counters, true), + DEFINE_PROP_BOOL("Zifencei", RISCVCPU, cfg.ext_ifencei, true), + DEFINE_PROP_BOOL("Zicsr", RISCVCPU, cfg.ext_icsr, true), DEFINE_PROP_STRING("priv_spec", RISCVCPU, cfg.priv_spec), DEFINE_PROP_BOOL("mmu", RISCVCPU, cfg.mmu, true), DEFINE_PROP_BOOL("pmp", RISCVCPU, cfg.pmp, true), diff --git a/target/riscv/cpu.h b/target/riscv/cpu.h index 786f620564..b4c212dfcf 100644 --- a/target/riscv/cpu.h +++ b/target/riscv/cpu.h @@ -222,6 +222,8 @@ typedef struct RISCVCPU { bool ext_s; bool ext_u; bool ext_counters; + bool ext_ifencei; + bool ext_icsr; char *priv_spec; char *user_spec; -- 2.22.0
next prev parent reply other threads:[~2019-06-18 1:41 UTC|newest] Thread overview: 48+ messages / expand[flat|nested] mbox.gz Atom feed top 2019-06-18 1:31 [Qemu-devel] [PATCH v1 0/9] Update the RISC-V specification versions Alistair Francis 2019-06-18 1:31 ` [Qemu-riscv] " Alistair Francis 2019-06-18 1:31 ` [Qemu-devel] [PATCH v1 1/9] target/riscv: Restructure deprecatd CPUs Alistair Francis 2019-06-18 1:31 ` [Qemu-riscv] " Alistair Francis 2019-06-18 5:23 ` [Qemu-devel] " Philippe Mathieu-Daudé 2019-06-18 5:23 ` [Qemu-riscv] " Philippe Mathieu-Daudé 2019-06-18 15:59 ` Alistair Francis 2019-06-18 15:59 ` [Qemu-riscv] " Alistair Francis 2019-06-18 1:31 ` [Qemu-devel] [PATCH v1 2/9] target/riscv: Add the privledge spec version 1.11.0 Alistair Francis 2019-06-18 1:31 ` [Qemu-riscv] " Alistair Francis 2019-06-18 1:31 ` [Qemu-devel] [PATCH v1 3/9] target/riscv: Comment in the mcountinhibit CSR Alistair Francis 2019-06-18 1:31 ` [Qemu-riscv] " Alistair Francis 2019-06-24 9:31 ` [Qemu-devel] " Palmer Dabbelt 2019-06-24 9:31 ` [Qemu-riscv] " Palmer Dabbelt 2019-06-24 20:14 ` [Qemu-devel] " Alistair Francis 2019-06-24 20:14 ` [Qemu-riscv] " Alistair Francis 2019-06-18 1:31 ` [Qemu-devel] [PATCH v1 4/9] target/riscv: Set privledge spec 1.11.0 as default Alistair Francis 2019-06-18 1:31 ` [Qemu-riscv] " Alistair Francis 2019-06-18 1:31 ` [Qemu-devel] [PATCH v1 5/9] qemu-deprecated.texi: Deprecate the RISC-V privledge spec 1.09.1 Alistair Francis 2019-06-18 1:31 ` [Qemu-riscv] " Alistair Francis 2019-06-18 1:31 ` [Qemu-devel] [PATCH v1 6/9] target/riscv: Require either I or E base extension Alistair Francis 2019-06-18 1:31 ` [Qemu-riscv] " Alistair Francis 2019-06-18 1:31 ` [Qemu-devel] [PATCH v1 7/9] target/riscv: Remove user version information Alistair Francis 2019-06-18 1:31 ` [Qemu-riscv] " Alistair Francis 2019-06-18 1:31 ` [Qemu-devel] [PATCH v1 8/9] target/riscv: Add support for disabling/enabling Counters Alistair Francis 2019-06-18 1:31 ` [Qemu-riscv] " Alistair Francis 2019-06-18 1:31 ` Alistair Francis [this message] 2019-06-18 1:31 ` [Qemu-riscv] [PATCH v1 9/9] target/riscv: Add Zifencei and Zicsr as command line options Alistair Francis 2019-06-24 9:31 ` [Qemu-devel] " Palmer Dabbelt 2019-06-24 9:31 ` [Qemu-riscv] " Palmer Dabbelt 2019-06-24 23:16 ` [Qemu-devel] " Alistair Francis 2019-06-24 23:16 ` [Qemu-riscv] " Alistair Francis 2019-06-25 10:08 ` [Qemu-devel] " Palmer Dabbelt 2019-06-25 10:08 ` [Qemu-riscv] " Palmer Dabbelt 2019-06-19 10:58 ` [Qemu-devel] [PATCH v1 0/9] Update the RISC-V specification versions Palmer Dabbelt 2019-06-19 10:58 ` [Qemu-riscv] " Palmer Dabbelt 2019-06-19 14:19 ` [Qemu-devel] " Alistair Francis 2019-06-19 14:19 ` [Qemu-riscv] " Alistair Francis 2019-06-21 2:49 ` [Qemu-devel] " Palmer Dabbelt 2019-06-21 2:49 ` [Qemu-riscv] " Palmer Dabbelt 2019-06-22 0:23 ` [Qemu-devel] " Alistair Francis 2019-06-22 0:23 ` [Qemu-riscv] " Alistair Francis 2019-06-23 14:40 ` [Qemu-devel] " Palmer Dabbelt 2019-06-23 14:40 ` [Qemu-riscv] " Palmer Dabbelt 2019-06-24 9:33 ` [Qemu-devel] " Palmer Dabbelt 2019-06-24 9:33 ` [Qemu-riscv] " Palmer Dabbelt 2019-06-24 20:13 ` [Qemu-devel] " Alistair Francis 2019-06-24 20:13 ` [Qemu-riscv] " 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=b1a3188a4d5538d4d0ed0a77114926a2fdae1258.1560821342.git.alistair.francis@wdc.com \ --to=alistair.francis@wdc.com \ --cc=alistair23@gmail.com \ --cc=palmer@sifive.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: linkBe 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.