x86/cpu: Clear TME feature flag if TME is not enabled by BIOS
authorBingsong Si <sibs@chinatelecom.cn>
Mon, 11 Mar 2024 07:19:37 +0000 (15:19 +0800)
committerIngo Molnar <mingo@kernel.org>
Tue, 26 Mar 2024 08:49:32 +0000 (09:49 +0100)
commitcd2236c2f49eb46443fd7573d0ddad5373577b11
tree277cfa13b6c66c5e5b1c9d9f2b13ce73421689dd
parent29ba89f1895285f06c333546882e0c5ae9a6df23
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
arch/x86/kernel/cpu/intel.c