linux/tools/testing/selftests/kvm/include/riscv
Atish Patra 3608b174ec KVM: riscv: selftests: Decode stval to identify exact exception type
Currently, the sbi_pmu_test continues if the exception type is illegal
instruction because access to hpmcounter will generate that. However
illegal instruction exception may occur due to the other reasons
which should result in test assertion.

Use the stval to decode the exact type of instructions and which csrs are
being accessed if it is csr access instructions. Assert in all cases
except if it is a csr access instructions that access valid PMU related
registers.

Take this opportunity to remove the CSR_CYCLEH reference as the test is
compiled for RV64 only.

Reviewed-by: Anup Patel <anup@brainfault.org>
Reviewed-by: Andrew Jones <ajones@ventanamicro.com>
Signed-off-by: Atish Patra <atishp@rivosinc.com>
Link: https://lore.kernel.org/r/20250430-kvm_selftest_improve-v3-2-eea270ff080b@rivosinc.com
Signed-off-by: Anup Patel <anup@brainfault.org>
2025-05-21 09:34:37 +05:30
..
arch_timer.h KVM: riscv: selftests: Add sstc timer test 2024-03-06 20:53:29 +05:30
kvm_util_arch.h KVM: selftests: Allow tagging protected memory in guest page tables 2024-02-28 16:39:49 -08:00
processor.h KVM: riscv: selftests: Decode stval to identify exact exception type 2025-05-21 09:34:37 +05:30
sbi.h KVM: riscv: selftests: Add a test for PMU snapshot functionality 2024-04-26 13:14:10 +05:30
ucall.h KVM: riscv: selftests: Move sbi definitions to its own header file 2024-04-26 13:13:57 +05:30