linux/arch/x86/events/intel
Imre Palik f92b760414 perf/x86/intel: Honour the CPUID for number of fixed counters in hypervisors
perf doesn't seem to honour the number of fixed counters specified by CPUID
leaf 0xa. It always assumes that Intel CPUs have at least 3 fixed counters.

So if some of the fixed counters are masked out by the hypervisor, it still
tries to check/set them.

This patch makes perf behave nicer when the kernel is running under a
hypervisor that doesn't expose all the counters.

This patch contains some ideas from Matt Wilson.

Signed-off-by: Imre Palik <imrep@amazon.de>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Reviewed-by: Andi Kleen <ak@linux.intel.com>
Cc: Alexander Kozyrev <alexander.kozyrev@intel.com>
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: Artyom Kuanbekov <artyom.kuanbekov@intel.com>
Cc: David Carrillo-Cisneros <davidcc@google.com>
Cc: David Woodhouse <dwmw@amazon.co.uk>
Cc: H. Peter Anvin <hpa@zytor.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Kan Liang <kan.liang@intel.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Matt Wilson <msw@amazon.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Stephane Eranian <eranian@google.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Link: http://lkml.kernel.org/r/1477037939-15605-1-git-send-email-imrep.amz@gmail.com
Signed-off-by: Ingo Molnar <mingo@kernel.org>
2016-10-28 11:06:25 +02:00
..
bts.c perf/x86/intel/bts: Make it an exclusive PMU 2016-09-22 14:56:08 +02:00
core.c perf/x86/intel: Honour the CPUID for number of fixed counters in hypervisors 2016-10-28 11:06:25 +02:00
cqm.c perf/x86/intel/cqm: Check cqm/mbm enabled state in event init 2016-09-06 10:42:12 +02:00
cstate.c perf/x86/intel/cstate: Add C-state residency events for Knights Landing 2016-10-19 15:52:16 +02:00
ds.c Merge branch 'perf/urgent' into perf/core, to pick up fixes 2016-09-10 11:17:54 +02:00
knc.c perf/x86/intel: Fix PEBS warning by only restoring active PMU in pmi 2016-03-08 12:18:32 +01:00
lbr.c perf/x86/intel: Remove an inconsistent NULL check 2016-10-16 11:34:14 +02:00
Makefile x86/perf/intel/rapl: Fix module name collision with powercap intel-rapl 2016-07-06 12:51:59 +02:00
p4.c perf/x86/intel/p4: Trival indentation fix, remove space 2016-05-20 09:18:22 +02:00
p6.c perf/x86: Move perf_event.h to its new home 2016-02-17 10:11:36 +01:00
pt.c Merge branch 'perf/urgent' into perf/core, to pick up fixes 2016-09-23 07:20:33 +02:00
pt.h perf/x86/intel/pt: Add support for PTWRITE and power event tracing 2016-09-20 01:18:28 +02:00
rapl.c perf/x86/intel/rapl: Add Knights Mill CPUID 2016-10-17 10:45:09 +02:00
uncore_nhmex.c perf/x86/intel/uncore: Clean up hardware on exit 2016-02-29 09:35:15 +01:00
uncore_snb.c perf/x86: Use PMUEF_READ_CPU_PKG in uncore events 2016-08-18 10:54:34 +02:00
uncore_snbep.c perf/x86/intel/uncore: Add Skylake server uncore support 2016-09-10 11:18:52 +02:00
uncore.c perf/x86/intel/uncore: Add Knights Mill CPUID 2016-10-17 10:45:09 +02:00
uncore.h perf/x86/intel/uncore: Add Skylake server uncore support 2016-09-10 11:18:52 +02:00