[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20240311071938.13247-1-sibs@chinatelecom.cn>
Date: Mon, 11 Mar 2024 15:19:37 +0800
From: Bingsong Si <sibs@...natelecom.cn>
To: Thomas Gleixner <tglx@...utronix.de>,
Ingo Molnar <mingo@...hat.com>,
Borislav Petkov <bp@...en8.de>,
Dave Hansen <dave.hansen@...ux.intel.com>,
x86@...nel.org,
"H. Peter Anvin" <hpa@...or.com>
Cc: Bingsong Si <sibs@...natelecom.cn>,
linux-kernel@...r.kernel.org
Subject: [PATCH v2] x86/cpu: Clear TME feature flag if TME is not enabled by BIOS
When TME is disabled by BIOS, dmesg output is "x86/mktme: enabled by
BIOS" but the TME feature is still shown in the output of/proc/cpuinfo.
Signed-off-by: Bingsong Si <sibs@...natelecom.cn>
---
arch/x86/kernel/cpu/intel.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/arch/x86/kernel/cpu/intel.c b/arch/x86/kernel/cpu/intel.c
index a927a8fc9624..22f0c829784d 100644
--- a/arch/x86/kernel/cpu/intel.c
+++ b/arch/x86/kernel/cpu/intel.c
@@ -526,6 +526,7 @@ static void detect_tme(struct cpuinfo_x86 *c)
if (!TME_ACTIVATE_LOCKED(tme_activate) || !TME_ACTIVATE_ENABLED(tme_activate)) {
pr_info_once("x86/tme: not enabled by BIOS\n");
mktme_status = MKTME_DISABLED;
+ clear_cpu_cap(c, X86_FEATURE_TME);
return;
}
--
2.34.1
Powered by blists - more mailing lists