File tree Expand file tree Collapse file tree 2 files changed +6
-2
lines changed Expand file tree Collapse file tree 2 files changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -5069,8 +5069,11 @@ static void intel_pmu_cpu_starting(int cpu)
50695069
50705070 init_debug_store_on_cpu (cpu );
50715071 /*
5072- * Deal with CPUs that don't clear their LBRs on power-up.
5072+ * Deal with CPUs that don't clear their LBRs on power-up, and that may
5073+ * even boot with LBRs enabled.
50735074 */
5075+ if (!static_cpu_has (X86_FEATURE_ARCH_LBR ) && x86_pmu .lbr_nr )
5076+ msr_clear_bit (MSR_IA32_DEBUGCTLMSR , DEBUGCTLMSR_LBR_BIT );
50745077 intel_pmu_lbr_reset ();
50755078
50765079 cpuc -> lbr_sel = NULL ;
Original file line number Diff line number Diff line change 372372#define MSR_IA32_PASID_VALID BIT_ULL(31)
373373
374374/* DEBUGCTLMSR bits (others vary by model): */
375- #define DEBUGCTLMSR_LBR (1UL << 0) /* last branch recording */
375+ #define DEBUGCTLMSR_LBR_BIT 0 /* last branch recording */
376+ #define DEBUGCTLMSR_LBR (1UL << DEBUGCTLMSR_LBR_BIT)
376377#define DEBUGCTLMSR_BTF_SHIFT 1
377378#define DEBUGCTLMSR_BTF (1UL << 1) /* single-step on branches */
378379#define DEBUGCTLMSR_BUS_LOCK_DETECT (1UL << 2)
You can’t perform that action at this time.
0 commit comments