]> git.baikalelectronics.ru Git - kernel.git/commit
perf/x86/intel: Make anythread filter support conditional
authorStephane Eranian <eranian@google.com>
Wed, 28 Oct 2020 19:42:47 +0000 (12:42 -0700)
committerPeter Zijlstra <peterz@infradead.org>
Mon, 9 Nov 2020 17:12:36 +0000 (18:12 +0100)
commited83c4fbeae1c10701adb0de3ca2542d6bd308c3
tree0ecaffd56922acbfc32c955c47e120adcab22b5f
parent109f7b93274fe315fd4a36beb6673279c6bdb50e
perf/x86/intel: Make anythread filter support conditional

Starting with Arch Perfmon v5, the anythread filter on generic counters may be
deprecated. The current kernel was exporting the any filter without checking.
On Icelake, it means you could do cpu/event=0x3c,any/ even though the filter
does not exist. This patch corrects the problem by relying on the CPUID 0xa leaf
function to determine if anythread is supported or not as described in the
Intel SDM Vol3b 18.2.5.1 AnyThread Deprecation section.

Signed-off-by: Stephane Eranian <eranian@google.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Link: https://lkml.kernel.org/r/20201028194247.3160610-1-eranian@google.com
arch/x86/events/intel/core.c
arch/x86/events/perf_event.h
arch/x86/include/asm/perf_event.h
arch/x86/kvm/cpuid.c