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)
5069
5069
5070
5070
init_debug_store_on_cpu (cpu );
5071
5071
/*
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.
5073
5074
*/
5075
+ if (!static_cpu_has (X86_FEATURE_ARCH_LBR ) && x86_pmu .lbr_nr )
5076
+ msr_clear_bit (MSR_IA32_DEBUGCTLMSR , DEBUGCTLMSR_LBR_BIT );
5074
5077
intel_pmu_lbr_reset ();
5075
5078
5076
5079
cpuc -> lbr_sel = NULL ;
Original file line number Diff line number Diff line change 372
372
#define MSR_IA32_PASID_VALID BIT_ULL(31)
373
373
374
374
/* 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)
376
377
#define DEBUGCTLMSR_BTF_SHIFT 1
377
378
#define DEBUGCTLMSR_BTF (1UL << 1) /* single-step on branches */
378
379
#define DEBUGCTLMSR_BUS_LOCK_DETECT (1UL << 2)
You can’t perform that action at this time.
0 commit comments