RISC-V: KVM: No need to update the counter value during reset
authorAtish Patra <atishp@rivosinc.com>
Sat, 20 Apr 2024 15:17:27 +0000 (08:17 -0700)
committerAnup Patel <anup@brainfault.org>
Fri, 26 Apr 2024 07:43:44 +0000 (13:13 +0530)
commit98ce906bd0a64b59da894263b1ce0d2c19c70893
treeea741460599f3c237bd48689dc010d04eb9e6c5d
parent57990ab90ce31aadac0d5a6293f5582e24ff7521
RISC-V: KVM: No need to update the counter value during reset

The virtual counter value is updated during pmu_ctr_read. There is no need
to update it in reset case. Otherwise, it will be counted twice which is
incorrect.

Fixes: 0cb74b65d2e5 ("RISC-V: KVM: Implement perf support without sampling")
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/20240420151741.962500-12-atishp@rivosinc.com
Signed-off-by: Anup Patel <anup@brainfault.org>
arch/riscv/kvm/vcpu_pmu.c