mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] x86/cpuinfo: Clear X86_FEATURE_TME if TME/MKTME is disabled by BIOS
@ 2022-06-14 21:02 Martin Fernandez
  2022-06-14 21:05 ` Richard Hughes
                   ` (2 more replies)
  0 siblings, 3 replies; 12+ messages in thread
From: Martin Fernandez @ 2022-06-14 21:02 UTC (permalink / raw)
  To: linux-kernel
  Cc: bp, dave.hansen, x86, mingo, tglx, daniel.gutson, hughsient,
	alex.bazhaniuk, Martin Fernandez

Right now the only way to check this is by greping the kernel logs,
which is inconvinient. This is currently checked for fwupd for
example.

I understand that cpuinfo is supposed to report every feature in the
cpu but since AMD is doing the same for sme/sev I think is good to
have this for Intel too.

Signed-off-by: Martin Fernandez <martin.fernandez@eclypsium.com>
---
 arch/x86/kernel/cpu/intel.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/arch/x86/kernel/cpu/intel.c b/arch/x86/kernel/cpu/intel.c
index fd5dead8371c..7311172aceaf 100644
--- a/arch/x86/kernel/cpu/intel.c
+++ b/arch/x86/kernel/cpu/intel.c
@@ -570,6 +570,8 @@ 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");
+		if (mktme_status == MKTME_UNINITIALIZED)
+			clear_cpu_cap(c, X86_FEATURE_TME);
 		mktme_status = MKTME_DISABLED;
 		return;
 	}
--
2.30.2


^ permalink raw reply	[flat|nested] 12+ messages in thread
* [PATCH] x86/cpuinfo: Clear X86_FEATURE_TME if TME/MKTME is disabled by BIOS
@ 2022-07-04 14:20 Martin Fernandez
  2022-07-04 14:22 ` Martin Fernandez
  0 siblings, 1 reply; 12+ messages in thread
From: Martin Fernandez @ 2022-07-04 14:20 UTC (permalink / raw)
  To: linux-kernel
  Cc: bp, dave.hansen, x86, mingo, tglx, kirill.shutemov,
	daniel.gutson, hughsient, alex.bazhaniuk, Martin Fernandez

Right now the only way to check this is by greping the kernel logs,
which is inconvinient. This is currently checked for fwupd for
example.

I understand that cpuinfo is supposed to report every feature in the
cpu but since AMD is doing the same for sme/sev I think is good to
have this for Intel too.

Signed-off-by: Martin Fernandez <martin.fernandez@eclypsium.com>
---
 arch/x86/kernel/cpu/intel.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/arch/x86/kernel/cpu/intel.c b/arch/x86/kernel/cpu/intel.c
index fd5dead8371c..7311172aceaf 100644
--- a/arch/x86/kernel/cpu/intel.c
+++ b/arch/x86/kernel/cpu/intel.c
@@ -570,6 +570,8 @@ 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");
+		if (mktme_status == MKTME_UNINITIALIZED)
+			clear_cpu_cap(c, X86_FEATURE_TME);
 		mktme_status = MKTME_DISABLED;
 		return;
 	}
--
2.30.2


^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2022-07-04 14:22 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-06-14 21:02 [PATCH] x86/cpuinfo: Clear X86_FEATURE_TME if TME/MKTME is disabled by BIOS Martin Fernandez
2022-06-14 21:05 ` Richard Hughes
2022-06-15 19:05 ` Alison Schofield
2022-06-15 19:34   ` Richard Hughes
2022-06-15 19:54     ` Alison Schofield
2022-06-15 20:26       ` Daniel Gutson
2022-06-15 20:48         ` Martin Fernandez
2022-06-15 20:59           ` Alison Schofield
2022-06-16  2:10 ` Kai Huang
2022-06-16 14:23   ` Martin Fernandez
2022-07-04 14:20 Martin Fernandez
2022-07-04 14:22 ` Martin Fernandez

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®