KVM: riscv: selftests: Add a test for PMU snapshot functionality
authorAtish Patra <atishp@rivosinc.com>
Sat, 20 Apr 2024 15:17:38 +0000 (08:17 -0700)
committerAnup Patel <anup@brainfault.org>
Fri, 26 Apr 2024 07:44:10 +0000 (13:14 +0530)
commit13cb706e28d9d4d3259954eb08c57b990e4429ea
tree305c6abff236d36f96ba23586fc47d6958c99879
parent158cb9e61cb7f9ed07384584fe34fb9c39590293
KVM: riscv: selftests: Add a test for PMU snapshot functionality

Verify PMU snapshot functionality by setting up the shared memory
correctly and reading the counter values from the shared memory
instead of the CSR.

Reviewed-by: Andrew Jones <ajones@ventanamicro.com>
Reviewed-by: Anup Patel <anup@brainfault.org>
Signed-off-by: Atish Patra <atishp@rivosinc.com>
Link: https://lore.kernel.org/r/20240420151741.962500-23-atishp@rivosinc.com
Signed-off-by: Anup Patel <anup@brainfault.org>
tools/testing/selftests/kvm/include/riscv/sbi.h
tools/testing/selftests/kvm/lib/riscv/processor.c
tools/testing/selftests/kvm/riscv/sbi_pmu_test.c