diff options
| author | SeungJu Cheon <suunj1331@gmail.com> | 2026-08-25 17:37:17 +0900 |
|---|---|---|
| committer | Anup Patel <anup@brainfault.org> | 2026-09-15 18:55:51 +0530 |
| commit | 8b3fd1a8b305321171602bfa7c41212441cf69e4 (patch) | |
| tree | 27db5d9825314bcedfc1003b963dccf7bd388466 /tools/perf/scripts/python | |
| parent | b7749531a9b195f4fd7db92ca3cc49bda1a4dc8d (diff) | |
| download | linux-next-8b3fd1a8b305321171602bfa7c41212441cf69e4.tar.gz linux-next-8b3fd1a8b305321171602bfa7c41212441cf69e4.zip | |
RISC-V: KVM: Preserve firmware counter value across stop/start
Firmware events accumulate in kvpmu->fw_event[].value while running,
but counter stop only clears fw_event[].started without saving the
value back to pmc->counter_val. A subsequent counter start without
SBI_PMU_START_FLAG_SET_INIT_VALUE reloads the stale counter_val into
fw_event[].value, losing all events counted so far.
Save fw_event[].value into counter_val when actually stopping a
running counter, and remove the now redundant synchronization from
the snapshot path.
Fixes: badc386869e2c ("RISC-V: KVM: Support firmware events")
Signed-off-by: SeungJu Cheon <suunj1331@gmail.com>
Reviewed-by: Anup Patel <anup@brainfault.org>
Link: https://lore.kernel.org/r/20260825083719.643970-2-suunj1331@gmail.com
Signed-off-by: Anup Patel <anup@brainfault.org>
Diffstat (limited to 'tools/perf/scripts/python')
0 files changed, 0 insertions, 0 deletions
