From: Bingsong Si <sibs@chinatelecom.cn>
To: kai.huang@intel.com, Thomas Gleixner <tglx@linutronix.de>,
Ingo Molnar <mingo@redhat.com>, Borislav Petkov <bp@alien8.de>,
Dave Hansen <dave.hansen@linux.intel.com>,
x86@kernel.org, "H. Peter Anvin" <hpa@zytor.com>
Cc: linux-kernel@vger.kernel.org, sibs@chinatelecom.cn
Subject: [PATCH v3] x86/cpu: Clear TME feature flag if TME is not enabled by BIOS
Date: Tue, 12 Mar 2024 18:35:34 +0800 [thread overview]
Message-ID: <20240312103534.9037-1-sibs@chinatelecom.cn> (raw)
In-Reply-To: <b909cb856eb625f00402472d3f3153db2294f259.camel@intel.com>
When TME is disabled by BIOS, dmesg output is "x86/tme: not enabled by
BIOS" but the TME feature is still shown in the output of/proc/cpuinfo.
Signed-off-by: Bingsong Si <sibs@chinatelecom.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 40dec9b56f87..119ae291573b 100644
--- a/arch/x86/kernel/cpu/intel.c
+++ b/arch/x86/kernel/cpu/intel.c
@@ -228,6 +228,7 @@ static void detect_tme_early(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
next prev parent reply other threads:[~2024-03-12 10:44 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-03-08 12:27 [PATCH] " Bingsong Si
2024-03-11 6:13 ` Huang, Kai
2024-03-12 10:35 ` Bingsong Si [this message]
2024-03-11 7:19 ` [PATCH v2] " Bingsong Si
2024-03-26 8:56 ` [tip: x86/cpu] " tip-bot2 for Bingsong Si
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20240312103534.9037-1-sibs@chinatelecom.cn \
--to=sibs@chinatelecom.cn \
--cc=bp@alien8.de \
--cc=dave.hansen@linux.intel.com \
--cc=hpa@zytor.com \
--cc=kai.huang@intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=tglx@linutronix.de \
--cc=x86@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®