On 8/6/24 07:54, Ravi Bangoria wrote: > Add Bus Lock Detect (called Bus Lock Trap in AMD docs) support for AMD > platforms. Bus Lock Detect is enumerated with CPUID Fn0000_0007_ECX_x0 > bit [24 / BUSLOCKTRAP]. It can be enabled through MSR_IA32_DEBUGCTLMSR. > When enabled, hardware clears DR6[11] and raises a #DB exception on > occurrence of Bus Lock if CPL > 0. More detail about the feature can be > found in AMD APM[1]. > > [1]: AMD64 Architecture Programmer's Manual Pub. 40332, Rev. 4.07 - June > 2023, Vol 2, 13.1.3.6 Bus Lock Trap > https://bugzilla.kernel.org/attachment.cgi?id=304653 > > Signed-off-by: Ravi Bangoria <ravi.bangoria@xxxxxxx> Reviewed-by: Tom Lendacky <thomas.lendacky@xxxxxxx> > --- > arch/x86/include/asm/cpu.h | 8 +++++--- > arch/x86/kernel/cpu/bus_lock.c | 4 ++-- > arch/x86/kernel/cpu/common.c | 2 ++ > arch/x86/kernel/cpu/intel.c | 1 - > include/linux/sched.h | 2 +- > 5 files changed, 10 insertions(+), 7 deletions(-) >