Re: [perf] unchecked MSR access error: WRMSR to 0x689 in intel_pmu_lbr_restore

From: Liang, Kan
Date: Thu Jul 14 2022 - 13:50:28 EST




On 2022-07-14 12:12 p.m., Vince Weaver wrote:
> On Tue, 12 Jul 2022, Liang, Kan wrote:
>
>>
>> Could you please apply the below patch, reboot to the patched kernel and
>> share the dmesg log?
>
> here's the info with your patch applied:
>
> [ 0.000000] microcode: microcode updated early to revision 0x28, date = 2019-11-12
> ...
> [ 1.460296] NO HLE NO RTM. LBR has tsx 0


Thanks.

The issue should be introduced by the commit 1ac7fd8159a8
("perf/x86/intel/lbr: Support LBR format V7").
The quirk is invoked before the intel_pmu_lbr_init(), which set the
x86_pmu.lbr_has_tsx.

I will send out a patch to fix it shortly.

Thanks,
Kan

> [ 1.468217] Haswell events, 16-deep LBR, full-width counters, Intel PMU driver.
> [ 1.472292] ... version: 3
> [ 1.476275] ... bit width: 48
> [ 1.480275] ... generic registers: 4
> [ 1.484276] ... value mask: 0000ffffffffffff
> [ 1.488277] ... max period: 00007fffffffffff
> [ 1.492277] ... fixed-purpose events: 3
> [ 1.496271] ... event mask: 000000070000000f
>
> Vince