From: Atish Kumar Patra <atishp@rivosinc.com>
To: Daniel Henrique Barboza <dbarboza@ventanamicro.com>
Cc: qemu-devel@nongnu.org,
Alistair Francis <alistair.francis@wdc.com>,
Bin Meng <bin.meng@windriver.com>,
Liu Zhiwei <zhiwei_liu@linux.alibaba.com>,
Palmer Dabbelt <palmer@dabbelt.com>,
qemu-riscv@nongnu.org, Weiwei Li <liwei1518@gmail.com>,
kaiwenxue1@gmail.com
Subject: Re: [v2 2/5] target/riscv: Add cycle & instret privilege mode filtering properties
Date: Wed, 3 Jan 2024 15:26:50 -0800 [thread overview]
Message-ID: <CAHBxVyEqiutsbsADKpOOJ_oT5Y-W8MWUWQgQY7ihAriL4et3+Q@mail.gmail.com> (raw)
In-Reply-To: <ff37b49d-e152-472e-8c24-4adbb8cdcb46@ventanamicro.com>
On Wed, Jan 3, 2024 at 12:11 PM Daniel Henrique Barboza
<dbarboza@ventanamicro.com> wrote:
>
>
>
> On 12/28/23 21:49, Atish Patra wrote:
> > From: Kaiwen Xue <kaiwenx@rivosinc.com>
> >
> > This adds the properties for ISA extension smcntrpmf. Patches
> > implementing it will follow.
> >
> > Signed-off-by: Atish Patra <atishp@rivosinc.com>
> > Signed-off-by: Kaiwen Xue <kaiwenx@rivosinc.com>
> > ---
> > target/riscv/cpu.c | 3 ++-
> > target/riscv/cpu_cfg.h | 1 +
> > 2 files changed, 3 insertions(+), 1 deletion(-)
> >
> > diff --git a/target/riscv/cpu.c b/target/riscv/cpu.c
> > index 83c7c0cf07be..da3f05cd5373 100644
> > --- a/target/riscv/cpu.c
> > +++ b/target/riscv/cpu.c
> > @@ -148,6 +148,7 @@ const RISCVIsaExtData isa_edata_arr[] = {
> > ISA_EXT_DATA_ENTRY(smstateen, PRIV_VERSION_1_12_0, ext_smstateen),
> > ISA_EXT_DATA_ENTRY(ssaia, PRIV_VERSION_1_12_0, ext_ssaia),
> > ISA_EXT_DATA_ENTRY(sscofpmf, PRIV_VERSION_1_12_0, ext_sscofpmf),
> > + ISA_EXT_DATA_ENTRY(smcntrpmf, PRIV_VERSION_1_12_0, ext_smcntrpmf),
> > ISA_EXT_DATA_ENTRY(sstc, PRIV_VERSION_1_12_0, ext_sstc),
> > ISA_EXT_DATA_ENTRY(svadu, PRIV_VERSION_1_12_0, ext_svadu),
> > ISA_EXT_DATA_ENTRY(svinval, PRIV_VERSION_1_12_0, ext_svinval),
> > @@ -1296,6 +1297,7 @@ const char *riscv_get_misa_ext_description(uint32_t bit)
> > const RISCVCPUMultiExtConfig riscv_cpu_extensions[] = {
> > /* Defaults for standard extensions */
> > MULTI_EXT_CFG_BOOL("sscofpmf", ext_sscofpmf, false),
> > + DEFINE_PROP_BOOL("smcntrpmf", RISCVCPU, cfg.ext_smcntrpmf, false),
>
> This will end up breaking the build since this macro is adding a Property object
> inside a RISCVCPUMultiExtConfig array. Patch 3 is then fixing it by removing this
> line, so in the end the build works fine. But having a patch that doesn't build
> can make future bisects unpleasant.
>
This was a rebase error. I will fix it in the next version.
> I don't see a problem adding right now the actual flag:
>
> + MULTI_EXT_CFG_BOOL("smcntrpmf", ext_smcntrpmf, false),
>
> The flag will do nothing, sure, but the commit msg already mentions "Patches
> implementing it will follow", so it's fine to me.
>
>
>
> Thanks,
>
> Daniel
>
>
> > MULTI_EXT_CFG_BOOL("zifencei", ext_zifencei, true),
> > MULTI_EXT_CFG_BOOL("zicsr", ext_zicsr, true),
> > MULTI_EXT_CFG_BOOL("zihintntl", ext_zihintntl, true),
> > @@ -1308,7 +1310,6 @@ const RISCVCPUMultiExtConfig riscv_cpu_extensions[] = {
> > MULTI_EXT_CFG_BOOL("zve64f", ext_zve64f, false),
> > MULTI_EXT_CFG_BOOL("zve64d", ext_zve64d, false),
> > MULTI_EXT_CFG_BOOL("sstc", ext_sstc, true),
> > -
> > MULTI_EXT_CFG_BOOL("smepmp", ext_smepmp, false),
> > MULTI_EXT_CFG_BOOL("smstateen", ext_smstateen, false),
> > MULTI_EXT_CFG_BOOL("svadu", ext_svadu, true),
> > diff --git a/target/riscv/cpu_cfg.h b/target/riscv/cpu_cfg.h
> > index f4605fb190b9..00c34fdd3209 100644
> > --- a/target/riscv/cpu_cfg.h
> > +++ b/target/riscv/cpu_cfg.h
> > @@ -72,6 +72,7 @@ struct RISCVCPUConfig {
> > bool ext_zihpm;
> > bool ext_smstateen;
> > bool ext_sstc;
> > + bool ext_smcntrpmf;
> > bool ext_svadu;
> > bool ext_svinval;
> > bool ext_svnapot;
next prev parent reply other threads:[~2024-01-03 23:28 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-12-29 0:49 [v2 0/5] Add ISA extension smcntrpmf support Atish Patra
2023-12-29 0:49 ` [v2 1/5] target/riscv: Fix the predicate functions for mhpmeventhX CSRs Atish Patra
2024-01-03 20:11 ` Daniel Henrique Barboza
2024-01-05 2:43 ` Alistair Francis
2023-12-29 0:49 ` [v2 2/5] target/riscv: Add cycle & instret privilege mode filtering properties Atish Patra
2024-01-03 20:11 ` Daniel Henrique Barboza
2024-01-03 23:26 ` Atish Kumar Patra [this message]
2023-12-29 0:49 ` [v2 3/5] target/riscv: Add cycle & instret privilege mode filtering definitions Atish Patra
2024-01-05 2:45 ` Alistair Francis
2024-01-05 22:14 ` Atish Kumar Patra
2023-12-29 0:49 ` [v2 4/5] target/riscv: Add cycle & instret privilege mode filtering support Atish Patra
2024-01-03 20:18 ` Daniel Henrique Barboza
2024-01-03 23:27 ` Atish Kumar Patra
2023-12-29 0:49 ` [v2 5/5] target/riscv: Implement privilege mode filtering for cycle/instret Atish Patra
2024-01-03 20:22 ` Daniel Henrique Barboza
-- strict thread matches above, loose matches on Subject: below --
2023-12-29 0:47 [v2 0/5] Add ISA extension smcntrpmf support Atish Patra
2023-12-29 0:47 ` [v2 2/5] target/riscv: Add cycle & instret privilege mode filtering properties Atish Patra
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=CAHBxVyEqiutsbsADKpOOJ_oT5Y-W8MWUWQgQY7ihAriL4et3+Q@mail.gmail.com \
--to=atishp@rivosinc.com \
--cc=alistair.francis@wdc.com \
--cc=bin.meng@windriver.com \
--cc=dbarboza@ventanamicro.com \
--cc=kaiwenxue1@gmail.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).