From: "Edgecombe, Rick P" <rick.p.edgecombe@intel.com>
To: "jirislaby@kernel.org" <jirislaby@kernel.org>,
"seanjc@google.com" <seanjc@google.com>
Cc: "Gao, Chao" <chao.gao@intel.com>,
"x86@kernel.org" <x86@kernel.org>, "bp@alien8.de" <bp@alien8.de>,
"kas@kernel.org" <kas@kernel.org>,
"dave.hansen@linux.intel.com" <dave.hansen@linux.intel.com>,
"mingo@redhat.com" <mingo@redhat.com>,
"dan.j.williams@intel.com" <dan.j.williams@intel.com>,
"hpa@zytor.com" <hpa@zytor.com>,
"tglx@kernel.org" <tglx@kernel.org>,
"linux-coco@lists.linux.dev" <linux-coco@lists.linux.dev>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"kvm@vger.kernel.org" <kvm@vger.kernel.org>
Subject: Re: [PATCH] KVM: x86/tdx: Do not print error message on non-present feature
Date: Mon, 6 Jul 2026 16:54:37 +0000 [thread overview]
Message-ID: <f35e07de78a2e189f585f9cac4ec292331d84bdc.camel@intel.com> (raw)
In-Reply-To: <20260702043204.81741-1-jirislaby@kernel.org>
On Thu, 2026-07-02 at 06:32 +0200, Jiri Slaby (SUSE) wrote:
> Before commit 165e77353831 below, the kernel did not print anything when
> X86_FEATURE_TDX_HOST_PLATFORM was not present in a cpu.
This isn't quite correct. It would print something if KVM tried to enable it,
which is controlled by a module param.
>
> After the commit, this is emitted to the log, with the error level:
> virt/tdx: TDX not supported by the host platform
>
> This is disturbing as it is not an error running CPUs without the
> feature.
Agree. If the kernel is now trying to enabling TDX automatically, it is not
error print worthy if it fails because TDX is not supported.
But after the below change, something is still printed if the kernel param is
used. Can we be a little more specific?
>
> Drop the error message completely to revert to the state before
> 165e77353831.
'state' is a little ambiguous here. Sounds like a full revert.
>
> Signed-off-by: Jiri Slaby (SUSE) <jirislaby@kernel.org>
> Fixes: 165e77353831 ("KVM: x86/tdx: Do VMXON and TDX-Module initialization during subsys init")
> Cc: Dan Williams <dan.j.williams@intel.com>
> Cc: Chao Gao <chao.gao@intel.com>
> Cc: Dave Hansen <dave.hansen@linux.intel.com>
> Cc: Sean Christopherson <seanjc@google.com>
>
> --
>
> 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: Kiryl Shutsemau <kas@kernel.org>
> Cc: Rick Edgecombe <rick.p.edgecombe@intel.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 42df8ea464c4..bdfc3bf12a9c 100644
> --- a/arch/x86/virt/vmx/tdx/tdx.c
> +++ b/arch/x86/virt/vmx/tdx/tdx.c
> @@ -1228,10 +1228,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;
> - }
Seems like a reasonable change to me, but the log is a bit misleading.
>
> if (!cpu_feature_enabled(X86_FEATURE_XSAVE)) {
> pr_err("XSAVE is required for TDX\n");
prev parent reply other threads:[~2026-07-06 16:54 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-02 4:32 [PATCH] KVM: x86/tdx: Do not print error message on non-present feature Jiri Slaby (SUSE)
2026-07-02 14:07 ` Kiryl Shutsemau
2026-07-06 16:54 ` Edgecombe, Rick P [this message]
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=f35e07de78a2e189f585f9cac4ec292331d84bdc.camel@intel.com \
--to=rick.p.edgecombe@intel.com \
--cc=bp@alien8.de \
--cc=chao.gao@intel.com \
--cc=dan.j.williams@intel.com \
--cc=dave.hansen@linux.intel.com \
--cc=hpa@zytor.com \
--cc=jirislaby@kernel.org \
--cc=kas@kernel.org \
--cc=kvm@vger.kernel.org \
--cc=linux-coco@lists.linux.dev \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=seanjc@google.com \
--cc=tglx@kernel.org \
--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