From: "Verma, Vishal L" <vishal.l.verma@intel.com>
To: "sashiko-reviews@lists.linux.dev" <sashiko-reviews@lists.linux.dev>
Cc: "ak@linux.intel.com" <ak@linux.intel.com>,
"dave.hansen@linux.intel.com" <dave.hansen@linux.intel.com>,
"x86@kernel.org" <x86@kernel.org>,
"kas@kernel.org" <kas@kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"Verma, Vishal L" <vishal.l.verma@intel.com>,
"kvm@vger.kernel.org" <kvm@vger.kernel.org>,
"linux-coco@lists.linux.dev" <linux-coco@lists.linux.dev>
Subject: Re: [PATCH 2/2] x86/early_printk: Avoid #VE emulation for TDX guest serial output
Date: Thu, 10 Sep 2026 23:44:38 +0000 [thread overview]
Message-ID: <4977deebbf32eda411d3344d184b2914ebc5403d.camel@intel.com> (raw)
In-Reply-To: <20260910224829.C1F191F000FF@smtp.kernel.org>
On Thu, 2026-09-10 at 22:48 +0000, sashiko-bot@kernel.org wrote:
>
> > +/* Substitute the hypercall accessors, but only in an actual TDX guest */
> > +static __init void early_serial_tdx_init(void)
> > +{
> > + if (!cpu_feature_enabled(X86_FEATURE_TDX_GUEST))
> > + return;
> > +
> > + static_call_update(serial_in, tdx_serial_in);
> > + static_call_update(serial_out, tdx_serial_out);
>
> [Severity: Medium]
> Will calling static_call_update() here trigger a WARN_ON_ONCE during early boot?
>
> Booting a TDX guest with earlyprintk invokes parse_early_param(), which ends
> up calling early_serial_tdx_init() before the static call infrastructure is
> fully set up. Because static_call_init() is an early_initcall that runs much
> later in the boot sequence, static_call_initialized is still 0 at this point.
>
> This unconditionally triggers the WARN_ON_ONCE(!static_call_initialized)
> safety check in __static_call_update(), which dumps a stack trace to the
> boot log and will crash the boot process if panic_on_warn is set.
>
> Should this use the x86-specific static_call_update_early() macro instead,
> which checks the initialization state and safely patches the trampoline
> directly during early boot?
>
>
This Sashiko report is a false positive - for x86's setup_arch(),
static_call_init() happens before parse_early_param().
next prev parent reply other threads:[~2026-09-10 23:44 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-10 22:34 [PATCH 0/2] x86/tdx: Use TDVMCALLs directly for earlyprintk Vishal Verma
2026-09-10 22:34 ` [PATCH 1/2] x86/tdx: Move port I/O definitions to a shared header Vishal Verma
2026-09-11 10:40 ` Kiryl Shutsemau
2026-09-10 22:34 ` [PATCH 2/2] x86/early_printk: Avoid #VE emulation for TDX guest serial output Vishal Verma
[not found] ` <20260910224829.C1F191F000FF@smtp.kernel.org>
2026-09-10 23:44 ` Verma, Vishal L [this message]
2026-09-11 10:49 ` Kiryl Shutsemau
2026-09-11 20:25 ` Dave Hansen
2026-09-11 1:17 ` [PATCH 0/2] x86/tdx: Use TDVMCALLs directly for earlyprintk Edgecombe, Rick P
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=4977deebbf32eda411d3344d184b2914ebc5403d.camel@intel.com \
--to=vishal.l.verma@intel.com \
--cc=ak@linux.intel.com \
--cc=dave.hansen@linux.intel.com \
--cc=kas@kernel.org \
--cc=kvm@vger.kernel.org \
--cc=linux-coco@lists.linux.dev \
--cc=linux-kernel@vger.kernel.org \
--cc=sashiko-reviews@lists.linux.dev \
--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®