diff options
author | Atish Patra <atishp@rivosinc.com> | 2023-02-05 04:15:03 +0300 |
---|---|---|
committer | Anup Patel <anup@brainfault.org> | 2023-02-07 18:05:33 +0300 |
commit | 8929283a687bb4b71ec9d3f1e827aecf829c6b1a (patch) | |
tree | ebca3a7bad3979818bd451fcfe3d71bf3c3bb6fe /include/linux/perf | |
parent | 585e351ff359c032ea7ab48d999b252ba09f8051 (diff) | |
download | linux-8929283a687bb4b71ec9d3f1e827aecf829c6b1a.tar.xz |
perf: RISC-V: Improve privilege mode filtering for perf
Currently, the host driver doesn't have any method to identify if the
requested perf event is from kvm or bare metal. As KVM runs in HS
mode, there are no separate hypervisor privilege mode to distinguish
between the attributes for guest/host.
Improve the privilege mode filtering by using the event specific
config1 field.
Reviewed-by: Andrew Jones <ajones@ventanamicro.com>
Reviewed-by: Anup Patel <anup@brainfault.org>
Signed-off-by: Atish Patra <atishp@rivosinc.com>
Signed-off-by: Anup Patel <anup@brainfault.org>
Diffstat (limited to 'include/linux/perf')
-rw-r--r-- | include/linux/perf/riscv_pmu.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/include/linux/perf/riscv_pmu.h b/include/linux/perf/riscv_pmu.h index a1c3f7771481..43fc892aa7d9 100644 --- a/include/linux/perf/riscv_pmu.h +++ b/include/linux/perf/riscv_pmu.h @@ -26,6 +26,8 @@ #define RISCV_PMU_STOP_FLAG_RESET 1 +#define RISCV_PMU_CONFIG1_GUEST_EVENTS 0x1 + struct cpu_hw_events { /* currently enabled events */ int n_events; |