]> git.baikalelectronics.ru Git - kernel.git/commit
perf/x86: Correctly use FEATURE_PDCM
authorPeter Zijlstra <peterz@infradead.org>
Mon, 3 Feb 2014 13:29:03 +0000 (14:29 +0100)
committerThomas Gleixner <tglx@linutronix.de>
Fri, 21 Feb 2014 21:09:01 +0000 (22:09 +0100)
commit094335ae0f5c21aa47d12b550c7b646f00ad4c85
treed7e9cd28d499baa17f6f33d9493a91d62e1f217d
parenta7b244986a03b3d707b64e329648e013b72d4ae9
perf/x86: Correctly use FEATURE_PDCM

The current code simply assumes Intel Arch PerfMon v2+ to have
the IA32_PERF_CAPABILITIES MSR; the SDM specifies that we should check
CPUID[1].ECX[15] (aka, FEATURE_PDCM) instead.

This was found by KVM which implements v2+ but didn't provide the
capabilities MSR. Change the code to DTRT; KVM will also implement the
MSR and return 0.

Cc: pbonzini@redhat.com
Reported-by: "Michael S. Tsirkin" <mst@redhat.com>
Suggested-by: Eduardo Habkost <ehabkost@redhat.com>
Signed-off-by: Peter Zijlstra <peterz@infradead.org>
Link: http://lkml.kernel.org/r/20140203132903.GI8874@twins.programming.kicks-ass.net
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
arch/x86/kernel/cpu/perf_event_intel.c