]> www.infradead.org Git - users/jedix/linux-maple.git/commit
RISC-V: KVM: No need to exit to the user space if perf event failed
authorAtish Patra <atishp@rivosinc.com>
Sat, 20 Apr 2024 15:17:28 +0000 (08:17 -0700)
committerAnup Patel <anup@brainfault.org>
Fri, 26 Apr 2024 07:43:46 +0000 (13:13 +0530)
commit2196c066f13861919a83b3b3ffda08a79cf87bdd
tree463ecb64c49689f627f682c2b4a7db2a16855dcf
parent98ce906bd0a64b59da894263b1ce0d2c19c70893
RISC-V: KVM: No need to exit to the user space if perf event failed

Currently, we return a linux error code if creating a perf event failed
in kvm. That shouldn't be necessary as guest can continue to operate
without perf profiling or profiling with firmware counters.

Return appropriate SBI error code to indicate that PMU configuration
failed. An error message in kvm already describes the reason for failure.

Fixes: 0cb74b65d2e5 ("RISC-V: KVM: Implement perf support without sampling")
Reviewed-by: Anup Patel <anup@brainfault.org>
Signed-off-by: Atish Patra <atishp@rivosinc.com>
Link: https://lore.kernel.org/r/20240420151741.962500-13-atishp@rivosinc.com
Signed-off-by: Anup Patel <anup@brainfault.org>
arch/riscv/kvm/vcpu_pmu.c
arch/riscv/kvm/vcpu_sbi_pmu.c