summaryrefslogtreecommitdiff
path: root/tools/perf/util/cs-etm.h
diff options
context:
space:
mode:
authorAtish Patra <atishp@rivosinc.com>2024-04-20 08:17:30 -0700
committerAnup Patel <anup@brainfault.org>2024-04-26 13:13:50 +0530
commit16b0bde9a37c0af404318ca3cf64a11edccb8777 (patch)
tree15b25401fd17b13b7f3087854c055d6de782bcd1 /tools/perf/util/cs-etm.h
parentc2f41ddbcdd75689d9f512638a40263e3127be93 (diff)
RISC-V: KVM: Add perf sampling support for guests
KVM enables perf for guest via counter virtualization. However, the sampling can not be supported as there is no mechanism to enabled trap/emulate scountovf in ISA yet. Rely on the SBI PMU snapshot to provide the counter overflow data via the shared memory. In case of sampling event, the host first sets the guest's LCOFI interrupt and injects to the guest via irq filtering mechanism defined in AIA specification. Thus, ssaia must be enabled in the host in order to use perf sampling in the guest. No other AIA dependency w.r.t kernel is required. 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-15-atishp@rivosinc.com Signed-off-by: Anup Patel <anup@brainfault.org>
Diffstat (limited to 'tools/perf/util/cs-etm.h')
0 files changed, 0 insertions, 0 deletions