Skip to content

Commit 756706e

Browse files
Andi KleenDinh Nguyen
authored andcommitted
x86: Add new MSRs and MSR bits used for Intel Skylake PMU support
[ Upstream commit b83ff1c ] Add new MSRs (LBR_INFO) and some new MSR bits used by the Intel Skylake PMU driver. Signed-off-by: Andi Kleen <[email protected]> Signed-off-by: Peter Zijlstra (Intel) <[email protected]> Cc: Linus Torvalds <[email protected]> Cc: Peter Zijlstra <[email protected]> Cc: Thomas Gleixner <[email protected]> Cc: [email protected] Link: http://lkml.kernel.org/r/[email protected] Signed-off-by: Ingo Molnar <[email protected]> Signed-off-by: Sasha Levin <[email protected]>
1 parent 10a4498 commit 756706e

File tree

2 files changed

+13
-0
lines changed

2 files changed

+13
-0
lines changed

arch/x86/include/asm/perf_event.h

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -159,6 +159,13 @@ struct x86_pmu_capability {
159159
*/
160160
#define INTEL_PMC_IDX_FIXED_BTS (INTEL_PMC_IDX_FIXED + 16)
161161

162+
#define GLOBAL_STATUS_COND_CHG BIT_ULL(63)
163+
#define GLOBAL_STATUS_BUFFER_OVF BIT_ULL(62)
164+
#define GLOBAL_STATUS_UNC_OVF BIT_ULL(61)
165+
#define GLOBAL_STATUS_ASIF BIT_ULL(60)
166+
#define GLOBAL_STATUS_COUNTERS_FROZEN BIT_ULL(59)
167+
#define GLOBAL_STATUS_LBRS_FROZEN BIT_ULL(58)
168+
162169
/*
163170
* IBS cpuid feature detection
164171
*/

arch/x86/include/uapi/asm/msr-index.h

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,12 @@
7272
#define MSR_LBR_CORE_FROM 0x00000040
7373
#define MSR_LBR_CORE_TO 0x00000060
7474

75+
#define MSR_LBR_INFO_0 0x00000dc0 /* ... 0xddf for _31 */
76+
#define LBR_INFO_MISPRED BIT_ULL(63)
77+
#define LBR_INFO_IN_TX BIT_ULL(62)
78+
#define LBR_INFO_ABORT BIT_ULL(61)
79+
#define LBR_INFO_CYCLES 0xffff
80+
7581
#define MSR_IA32_PEBS_ENABLE 0x000003f1
7682
#define MSR_IA32_DS_AREA 0x00000600
7783
#define MSR_IA32_PERF_CAPABILITIES 0x00000345

0 commit comments

Comments
 (0)