diff options
author | Atish Patra <atish.patra@wdc.com> | 2022-06-20 16:15:55 -0700 |
---|---|---|
committer | Alistair Francis <alistair@alistair23.me> | 2022-07-03 10:03:20 +1000 |
commit | b1675eeb3e6e38b042a23a9647559c9c548c733d (patch) | |
tree | bc5b0e5aa6ee899d84d2f2d63c172f315f618c3c /target/riscv/machine.c | |
parent | 18d6d89efc60f1c030c4a8a22816d2d911ece105 (diff) |
target/riscv: Implement mcountinhibit CSR
As per the privilege specification v1.11, mcountinhibit allows to start/stop
a pmu counter selectively.
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Alistair Francis <alistair.francis@wdc.com>
Signed-off-by: Atish Patra <atish.patra@wdc.com>
Signed-off-by: Atish Patra <atishp@rivosinc.com>
Message-Id: <20220620231603.2547260-6-atishp@rivosinc.com>
Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
Diffstat (limited to 'target/riscv/machine.c')
-rw-r--r-- | target/riscv/machine.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/target/riscv/machine.c b/target/riscv/machine.c index 2a437b29a1..87cd55bfd3 100644 --- a/target/riscv/machine.c +++ b/target/riscv/machine.c @@ -330,6 +330,7 @@ const VMStateDescription vmstate_riscv_cpu = { VMSTATE_UINTTL(env.siselect, RISCVCPU), VMSTATE_UINTTL(env.scounteren, RISCVCPU), VMSTATE_UINTTL(env.mcounteren, RISCVCPU), + VMSTATE_UINTTL(env.mcountinhibit, RISCVCPU), VMSTATE_UINTTL(env.sscratch, RISCVCPU), VMSTATE_UINTTL(env.mscratch, RISCVCPU), VMSTATE_UINT64(env.mfromhost, RISCVCPU), |