Skip to contentSkip to conversation

x86/virt/tdx: Don't print error if CPU doesn't support TDX

PATCH In review Nikolay Borisov 3 participants 4 messages Nov 17

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 x86/virt/tdx: Don't print error if CPU doesn't support TDX

There's still plenty of Intel CPUs which do not support TDX and when a recent kernel is booted on those the user always sees the following error:

virt/tdx TDX not supported by hostplatform.

The same is also printed on all AMD CPUs. Fix by using pr_info.

---

Contrary to Pet Shop Boy's song - it's not a sin to not support TDX, yet :)

 arch/x86/virt/vmx/tdx/tdx.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/x86/virt/vmx/tdx/tdx.c +1 -1
index 96ced0494b68..b2962da24701 100644
@@ -1276,7 +1276,7 @@ static __init int tdx_enable(void)
 	int ret;
 
 	if (!cpu_feature_enabled(X86_FEATURE_TDX_HOST_PLATFORM)) {
-		pr_err("TDX not supported by the host platform\n");
+		pr_info("TDX not supported by the host platform\n");
 		return -ENODEV;
 	}
 

--
2.56.0

maintainer Acked-by on v1 1/1
#1 lore raw
Quoted 21 lines · Nikolay Borisov

There's still plenty of Intel CPUs which do not support TDX and when a recent kernel is booted on those the user always sees the following error:

virt/tdx TDX not supported by hostplatform.

The same is also printed on all AMD CPUs. Fix by using pr_info.

---

Contrary to Pet Shop Boy's song - it's not a sin to not support TDX, yet :)

 arch/x86/virt/vmx/tdx/tdx.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/x86/virt/vmx/tdx/tdx.c +0 -0
index 96ced0494b68..b2962da24701 100644

arch/x86/virt/vmx/tdx/tdx.c static __init int tdx_enable(void)

Quoted 9 lines
arch/x86/virt/vmx/tdx/tdx.c +1 -2
@@ -1276,7 +1276,7 @@ static __init int tdx_enable(void)
 	int ret;
 
 	if (!cpu_feature_enabled(X86_FEATURE_TDX_HOST_PLATFORM)) {
-		pr_err("TDX not supported by the host platform\n");
+		pr_info("TDX not supported by the host platform\n");
 		return -ENODEV;
 	}
 
--
Signature · 4 lines
Regards/Gruss,
    Boris.

https://people.kernel.org/tglx/notes-about-netiquette
#2 lore raw
Quoted 30 lines · Borislav Petkov
Quoted 29 lines · Nikolay Borisov

There's still plenty of Intel CPUs which do not support TDX and when a recent kernel is booted on those the user always sees the following error:

virt/tdx TDX not supported by hostplatform.

The same is also printed on all AMD CPUs. Fix by using pr_info.

---

Contrary to Pet Shop Boy's song - it's not a sin to not support TDX, yet :)

 arch/x86/virt/vmx/tdx/tdx.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/x86/virt/vmx/tdx/tdx.c +1 -1
index 96ced0494b68..b2962da24701 100644
@@ -1276,7 +1276,7 @@ static __init int tdx_enable(void)
 	int ret;
 
 	if (!cpu_feature_enabled(X86_FEATURE_TDX_HOST_PLATFORM)) {
-		pr_err("TDX not supported by the host platform\n");
+		pr_info("TDX not supported by the host platform\n");
 		return -ENODEV;
 	}
 
Quoted 3 lines
Quoted 1 line

--

FWIW, I prefer Jiri's version which just drops the printk entirely:

https://lore.kernel.org/all/27b6d824f7aee7078167944ce96d95676eee25cb.1793602266.git.jirislaby@kernel.org