]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commit - arch/x86/kernel/cpu/tsx.c
x86/cpu: Update cached HLE state on write to TSX_CTRL_CPUID_CLEAR
authorPawan Gupta <pawan.kumar.gupta@linux.intel.com>
Fri, 10 Jan 2020 22:50:54 +0000 (14:50 -0800)
committerKhalid Elmously <khalid.elmously@canonical.com>
Fri, 13 Mar 2020 04:31:00 +0000 (00:31 -0400)
commit68ef497e17d3025c07c201becdbad294cd78aa6b
treeff5ec6799d4d64c54a8d030b59cb7f215558e1d2
parent6efc58a248a2886548885fbecea0ef8fdf4b31a4
x86/cpu: Update cached HLE state on write to TSX_CTRL_CPUID_CLEAR

BugLink: https://bugs.launchpad.net/bugs/1866678
[ Upstream commit 5efc6fa9044c3356d6046c6e1da6d02572dbed6b ]

/proc/cpuinfo currently reports Hardware Lock Elision (HLE) feature to
be present on boot cpu even if it was disabled during the bootup. This
is because cpuinfo_x86->x86_capability HLE bit is not updated after TSX
state is changed via the new MSR IA32_TSX_CTRL.

Update the cached HLE bit also since it is expected to change after an
update to CPUID_CLEAR bit in MSR IA32_TSX_CTRL.

Fixes: 95c5824f75f3 ("x86/cpu: Add a "tsx=" cmdline option with TSX disabled by default")
Signed-off-by: Pawan Gupta <pawan.kumar.gupta@linux.intel.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Tested-by: Neelima Krishnan <neelima.krishnan@intel.com>
Reviewed-by: Dave Hansen <dave.hansen@linux.intel.com>
Reviewed-by: Josh Poimboeuf <jpoimboe@redhat.com>
Cc: stable@vger.kernel.org
Link: https://lore.kernel.org/r/2529b99546294c893dfa1c89e2b3e46da3369a59.1578685425.git.pawan.kumar.gupta@linux.intel.com
Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Khalid Elmously <khalid.elmously@canonical.com>
arch/x86/kernel/cpu/tsx.c