lkml.org 
[lkml]   [2021]   [Oct]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH] x86/bus_lock: Don't assume the init value of DEBUGCTLMSR.BUS_LOCK_DETECT to be zero
From


On 10/20/2021 1:05 AM, Sean Christopherson wrote:
> On Wed, Sep 01, 2021, Chenyi Qiang wrote:
>> It's possible that BIOS/firmware has set DEBUGCTLMSR_BUS_LOCK_DETECT, or
>> this kernel has been kexec'd from a kernel that enabled bus lock
>> detection.
>
> This feels like the kernel should explicitly zero out the entire MSR somewhere
> in the generic boot flow. E.g. something like this somewhere.
>

Yes. Meanwhile, I think kernel code prefers to explicitly set/clear the
control bit according to the parameter. Maybe both changes should be
applied.

> #ifndef CONFIG_X86_DEBUGCTLMSR
> if (boot_cpu_data.x86 < 6)
> return;
> #endifa
>
> wrmsrl(MSR_IA32_DEBUGCTLMSR, 0);
>

\
 
 \ /
  Last update: 2021-10-25 08:15    [W:0.107 / U:0.260 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site