diff options
author | Sean Christopherson <seanjc@google.com> | 2024-03-07 04:13:43 +0300 |
---|---|---|
committer | Sean Christopherson <seanjc@google.com> | 2024-04-11 22:58:47 +0300 |
commit | 0d0b60865071115f6da76090f0dbc1f0e8b9c647 (patch) | |
tree | de2bb1f05c9d7ee602117c754c119ee72cec8077 /arch/x86/include/asm | |
parent | 447112d7edd77fa468938377418434233bcb3709 (diff) | |
download | linux-0d0b60865071115f6da76090f0dbc1f0e8b9c647.tar.xz |
perf/x86/intel: Expose existence of callback support to KVM
Add a "has_callstack" field to the x86_pmu_lbr structure used to pass
information to KVM, and set it accordingly in x86_perf_get_lbr(). KVM
will use has_callstack to avoid trying to create perf LBR events with
PERF_SAMPLE_BRANCH_CALL_STACK on CPUs that don't support callstacks.
Reviewed-by: Mingwei Zhang <mizhang@google.com>
Link: https://lore.kernel.org/r/20240307011344.835640-3-seanjc@google.com
Signed-off-by: Sean Christopherson <seanjc@google.com>
Diffstat (limited to 'arch/x86/include/asm')
-rw-r--r-- | arch/x86/include/asm/perf_event.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/arch/x86/include/asm/perf_event.h b/arch/x86/include/asm/perf_event.h index 3736b8a46c04..7f1e17250546 100644 --- a/arch/x86/include/asm/perf_event.h +++ b/arch/x86/include/asm/perf_event.h @@ -555,6 +555,7 @@ struct x86_pmu_lbr { unsigned int from; unsigned int to; unsigned int info; + bool has_callstack; }; extern void perf_get_x86_pmu_capability(struct x86_pmu_capability *cap); |