Skip to content

Commit cd2236c

Browse files
Bingsong SiIngo Molnar
authored andcommitted
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 <[email protected]> Signed-off-by: Ingo Molnar <[email protected]> Cc: "Huang, Kai" <[email protected]> Link: https://lore.kernel.org/r/[email protected]
1 parent 29ba89f commit cd2236c

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
@@ -228,6 +228,7 @@ static void detect_tme_early(struct cpuinfo_x86 *c)
228228
if (!TME_ACTIVATE_LOCKED(tme_activate) || !TME_ACTIVATE_ENABLED(tme_activate)) {
229229
pr_info_once("x86/tme: not enabled by BIOS\n");
230230
mktme_status = MKTME_DISABLED;
231+
clear_cpu_cap(c, X86_FEATURE_TME);
231232
return;
232233
}
233234

0 commit comments

Comments
 (0)