Skip to content

Commit 9c7435b

Browse files
committed
x86/cpu: Clear TME feature flag if TME is not enabled by BIOS
JIRA: https://issues.redhat.com/browse/RHEL-111095 commit cd2236c Author: Bingsong Si <sibs@chinatelecom.cn> Date: Mon Mar 11 15:19:37 2024 +0800 x86/cpu: Clear TME feature flag if TME is not enabled by BIOS When TME is disabled by BIOS, the dmesg output is: x86/tme: not enabled by BIOS ... and TME functionality is not enabled by the kernel, but the TME feature is still shown in /proc/cpuinfo. Clear it. [ mingo: Clarified changelog ] Signed-off-by: Bingsong Si <sibs@chinatelecom.cn> Signed-off-by: Ingo Molnar <mingo@kernel.org> Cc: "Huang, Kai" <kai.huang@intel.com> Link: https://lore.kernel.org/r/20240311071938.13247-1-sibs@chinatelecom.cn Signed-off-by: Frank Liang <xiliang@redhat.com>
1 parent 253fc23 commit 9c7435b

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

arch/x86/kernel/cpu/intel.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -225,6 +225,7 @@ static void detect_tme_early(struct cpuinfo_x86 *c)
225225
if (!TME_ACTIVATE_LOCKED(tme_activate) || !TME_ACTIVATE_ENABLED(tme_activate)) {
226226
pr_info_once("x86/tme: not enabled by BIOS\n");
227227
mktme_status = MKTME_DISABLED;
228+
clear_cpu_cap(c, X86_FEATURE_TME);
228229
return;
229230
}
230231

0 commit comments

Comments
 (0)