]> git.proxmox.com Git - mirror_qemu.git/commit - target/riscv/machine.c
target/riscv: Add support for hpmcounters/hpmevents
authorAtish Patra <atish.patra@wdc.com>
Mon, 20 Jun 2022 23:15:56 +0000 (16:15 -0700)
committerAlistair Francis <alistair@alistair23.me>
Sun, 3 Jul 2022 00:03:20 +0000 (10:03 +1000)
commit621f35bb2fa8babb9ab2a65033fe8d47ea5cd8ba
tree235e0863ded9887e3c61584daf0b0344144f754b
parentb1675eeb3e6e38b042a23a9647559c9c548c733d
target/riscv: Add support for hpmcounters/hpmevents

With SBI PMU extension, user can use any of the available hpmcounters to
track any perf events based on the value written to mhpmevent csr.
Add read/write functionality for these csrs.

Reviewed-by: Alistair Francis <alistair.francis@wdc.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Signed-off-by: Atish Patra <atish.patra@wdc.com>
Signed-off-by: Atish Patra <atishp@rivosinc.com>
Message-Id: <20220620231603.2547260-7-atishp@rivosinc.com>
Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
target/riscv/cpu.h
target/riscv/csr.c
target/riscv/machine.c