RISC-V: KVM: Support 64 bit firmware counters on RV32
authorAtish Patra <atishp@rivosinc.com>
Sat, 20 Apr 2024 15:17:31 +0000 (08:17 -0700)
committerAnup Patel <anup@brainfault.org>
Fri, 26 Apr 2024 07:43:52 +0000 (13:13 +0530)
commit08fb07d6dcf7101c1c98782f2b4e27aca7f855c3
tree9e48103acdc86786274b75f310064d5c2d7f8acd
parent16b0bde9a37c0af404318ca3cf64a11edccb8777
RISC-V: KVM: Support 64 bit firmware counters on RV32

The SBI v2.0 introduced a fw_read_hi function to read 64 bit firmware
counters for RV32 based systems.

Add infrastructure to support that.

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-16-atishp@rivosinc.com
Signed-off-by: Anup Patel <anup@brainfault.org>
arch/riscv/include/asm/kvm_vcpu_pmu.h
arch/riscv/kvm/vcpu_pmu.c
arch/riscv/kvm/vcpu_sbi_pmu.c