* [PATCH v3] x86/virt/tdx: Do not print error message on non-present feature
@ 2026-11-02 6:51 Jiri Slaby (SUSE)
2026-11-02 7:18 ` Xiaoyao Li
0 siblings, 1 reply; 2+ messages in thread
From: Jiri Slaby (SUSE) @ 2026-11-02 6:51 UTC (permalink / raw)
To: dave.hansen
Cc: x86, Jiri Slaby (SUSE), Kiryl Shutsemau (Meta), Nikolay Borisov,
Sean Christopherson, Rick Edgecombe, Dan Williams, Chao Gao,
Thomas Gleixner, Ingo Molnar, Borislav Petkov, H. Peter Anvin,
linux-kernel, linux-coco, kvm
Before commit 165e77353831 below, the kernel did not print anything
during boot if X86_FEATURE_TDX_HOST_PLATFORM was not present, unless TDX
enablement was explicitly requested via a module parameter.
After the commit, when attempting to load TDX automatically, this is
emitted to the log:
virt/tdx: TDX not supported by the host platform
It is emitted with the "error" level, hence it is disturbing. It is not
an error to run CPUs without the feature.
Drop this silent-boot-breaking error message for the automatic
initialization path.
Signed-off-by: Jiri Slaby (SUSE) <jirislaby@kernel.org>
Fixes: 165e77353831 ("KVM: x86/tdx: Do VMXON and TDX-Module initialization during subsys init")
Reviewed-by: Kiryl Shutsemau (Meta) <kas@kernel.org>
Reviewed-by: Nikolay Borisov <nik.borisov@suse.com>
Reviewed-by: Sean Christopherson <seanjc@google.com>
Reviewed-by: Rick Edgecombe <rick.p.edgecombe@intel.com>
Cc: Dan Williams <dan.j.williams@intel.com>
Cc: Chao Gao <chao.gao@intel.com>
Cc: Dave Hansen <dave.hansen@linux.intel.com>
---
[v3] add reviewed-by tags and resend
[v2] update the commit message.
Cc: Thomas Gleixner <tglx@kernel.org>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: Borislav Petkov <bp@alien8.de>
Cc: Dave Hansen <dave.hansen@linux.intel.com>
Cc: x86@kernel.org
Cc: "H. Peter Anvin" <hpa@zytor.com>
Cc: linux-kernel@vger.kernel.org
Cc: linux-coco@lists.linux.dev
Cc: kvm@vger.kernel.org
---
arch/x86/virt/vmx/tdx/tdx.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/arch/x86/virt/vmx/tdx/tdx.c b/arch/x86/virt/vmx/tdx/tdx.c
index 680e5178a86f..d910a290ac50 100644
--- a/arch/x86/virt/vmx/tdx/tdx.c
+++ b/arch/x86/virt/vmx/tdx/tdx.c
@@ -1276,10 +1276,8 @@ static __init int tdx_enable(void)
enum cpuhp_state state;
int ret;
- if (!cpu_feature_enabled(X86_FEATURE_TDX_HOST_PLATFORM)) {
- pr_err("TDX not supported by the host platform\n");
+ if (!cpu_feature_enabled(X86_FEATURE_TDX_HOST_PLATFORM))
return -ENODEV;
- }
if (!cpu_feature_enabled(X86_FEATURE_XSAVE)) {
pr_err("XSAVE is required for TDX\n");
--
2.56.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH v3] x86/virt/tdx: Do not print error message on non-present feature
2026-11-02 6:51 [PATCH v3] x86/virt/tdx: Do not print error message on non-present feature Jiri Slaby (SUSE)
@ 2026-11-02 7:18 ` Xiaoyao Li
0 siblings, 0 replies; 2+ messages in thread
From: Xiaoyao Li @ 2026-11-02 7:18 UTC (permalink / raw)
To: Jiri Slaby (SUSE), dave.hansen
Cc: x86, Kiryl Shutsemau (Meta), Nikolay Borisov, Sean Christopherson,
Rick Edgecombe, Dan Williams, Chao Gao, Thomas Gleixner,
Ingo Molnar, Borislav Petkov, H. Peter Anvin, linux-kernel,
linux-coco, kvm
On 11/2/2026 2:51 PM, Jiri Slaby (SUSE) wrote:
> Before commit 165e77353831 below, the kernel did not print anything
> during boot if X86_FEATURE_TDX_HOST_PLATFORM was not present, unless TDX
> enablement was explicitly requested via a module parameter.
>
> After the commit, when attempting to load TDX automatically, this is
> emitted to the log:
> virt/tdx: TDX not supported by the host platform
>
> It is emitted with the "error" level, hence it is disturbing. It is not
> an error to run CPUs without the feature.
>
> Drop this silent-boot-breaking error message for the automatic
> initialization path.
>
> Signed-off-by: Jiri Slaby (SUSE) <jirislaby@kernel.org>
> Fixes: 165e77353831 ("KVM: x86/tdx: Do VMXON and TDX-Module initialization during subsys init")
> Reviewed-by: Kiryl Shutsemau (Meta) <kas@kernel.org>
> Reviewed-by: Nikolay Borisov <nik.borisov@suse.com>
> Reviewed-by: Sean Christopherson <seanjc@google.com>
> Reviewed-by: Rick Edgecombe <rick.p.edgecombe@intel.com>
Reviewed-by: Xiaoyao Li <xiaoyao.li@intel.com>
> Cc: Dan Williams <dan.j.williams@intel.com>
> Cc: Chao Gao <chao.gao@intel.com>
> Cc: Dave Hansen <dave.hansen@linux.intel.com>
>
> ---
>
> [v3] add reviewed-by tags and resend
> [v2] update the commit message.
>
> Cc: Thomas Gleixner <tglx@kernel.org>
> Cc: Ingo Molnar <mingo@redhat.com>
> Cc: Borislav Petkov <bp@alien8.de>
> Cc: Dave Hansen <dave.hansen@linux.intel.com>
> Cc: x86@kernel.org
> Cc: "H. Peter Anvin" <hpa@zytor.com>
> Cc: linux-kernel@vger.kernel.org
> Cc: linux-coco@lists.linux.dev
> Cc: kvm@vger.kernel.org
> ---
> arch/x86/virt/vmx/tdx/tdx.c | 4 +---
> 1 file changed, 1 insertion(+), 3 deletions(-)
>
> diff --git a/arch/x86/virt/vmx/tdx/tdx.c b/arch/x86/virt/vmx/tdx/tdx.c
> index 680e5178a86f..d910a290ac50 100644
> --- a/arch/x86/virt/vmx/tdx/tdx.c
> +++ b/arch/x86/virt/vmx/tdx/tdx.c
> @@ -1276,10 +1276,8 @@ static __init int tdx_enable(void)
> enum cpuhp_state state;
> int ret;
>
> - if (!cpu_feature_enabled(X86_FEATURE_TDX_HOST_PLATFORM)) {
> - pr_err("TDX not supported by the host platform\n");
> + if (!cpu_feature_enabled(X86_FEATURE_TDX_HOST_PLATFORM))
> return -ENODEV;
> - }
>
> if (!cpu_feature_enabled(X86_FEATURE_XSAVE)) {
> pr_err("XSAVE is required for TDX\n");
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2026-11-02 7:18 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-11-02 6:51 [PATCH v3] x86/virt/tdx: Do not print error message on non-present feature Jiri Slaby (SUSE)
2026-11-02 7:18 ` Xiaoyao Li
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox