]> git.baikalelectronics.ru Git - kernel.git/commit
x86/bus_lock: Don't assume the init value of DEBUGCTLMSR.BUS_LOCK_DETECT to be zero
authorChenyi Qiang <chenyi.qiang@intel.com>
Tue, 2 Aug 2022 03:32:06 +0000 (11:32 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 17 Aug 2022 12:24:14 +0000 (14:24 +0200)
commit22bf53205ed3f13fa8a9e3c0d8557f0f8a522ef1
tree48ee9e243f7282f6b7c413f7d8ad478e801a1a38
parent41325dbd0bad5c9eccf6008ca8924fb28e2f8c57
x86/bus_lock: Don't assume the init value of DEBUGCTLMSR.BUS_LOCK_DETECT to be zero

[ Upstream commit ea37b5e7ec50de581ba2c6df2becc80c6d697a26 ]

It's possible that this kernel has been kexec'd from a kernel that
enabled bus lock detection, or (hypothetically) BIOS/firmware has set
DEBUGCTLMSR_BUS_LOCK_DETECT.

Disable bus lock detection explicitly if not wanted.

Fixes: b817401736f3 ("x86/traps: Handle #DB for bus lock")
Signed-off-by: Chenyi Qiang <chenyi.qiang@intel.com>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Reviewed-by: Tony Luck <tony.luck@intel.com>
Link: https://lore.kernel.org/r/20220802033206.21333-1-chenyi.qiang@intel.com
Signed-off-by: Sasha Levin <sashal@kernel.org>
arch/x86/kernel/cpu/intel.c