]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
RISC-V: KVM: Implement get event info function
authorAtish Patra <atishp@rivosinc.com>
Tue, 9 Sep 2025 07:03:26 +0000 (00:03 -0700)
committerAnup Patel <anup@brainfault.org>
Tue, 16 Sep 2025 06:19:31 +0000 (11:49 +0530)
commite309fd113b9f6c34672a487be08fecb7e12e7e29
treec311026eccd65086480a86a83dc2246b263a7b38
parent41f4d0cc331a1e9dc247ce22ae45f983f0ed9054
RISC-V: KVM: Implement get event info function

The new get_event_info funciton allows the guest to query the presence
of multiple events with single SBI call. Currently, the perf driver
in linux guest invokes it for all the standard SBI PMU events. Support
the SBI function implementation in KVM as well.

Reviewed-by: Anup Patel <anup@brainfault.org>
Signed-off-by: Atish Patra <atishp@rivosinc.com>
Acked-by: Paul Walmsley <pjw@kernel.org>
Link: https://lore.kernel.org/r/20250909-pmu_event_info-v6-7-d8f80cacb884@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