Kernel KVM virtualization development
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Vishal Verma" <vishal.l.verma@intel.com>
Cc: kvm@vger.kernel.org
Subject: Re: [PATCH v6 2/2] x86/early_printk: Add earlyprintk=tdx to drive the UART with TDVMCALLs
Date: Wed, 02 Dec 2026 20:08:18 +0000	[thread overview]
Message-ID: <sashiko-outbox-246577@kernel.org> (raw)
In-Reply-To: <20261202-b4-tdx_earlyprintk_tdcalls-v6-2-779b5ae3a85d@intel.com>

Thank you for your contribution! Sashiko AI review found 1 potential
issue to consider:
- [Medium] x86/boot: missing earlyprintk=tdx support in
  parse_earlyprintk()
--

commit 6e993a158e40bdf99a8c420abebe730e1cbee0b0
Author: Vishal Verma <vishal.l.verma@intel.com>

x86/early_printk: Add earlyprintk=tdx to drive the UART with TDVMCALLs

This commit adds an earlyprintk=tdx option along with tdx_serial_in() and
tdx_serial_out() accessors to drive COM1 directly via TDVMCALLs in a TDX
guest instead of taking #VE exceptions on port I/O instructions.

> diff --git a/arch/x86/kernel/early_printk.c b/arch/x86/kernel/early_printk.c
> index cba75306e5b62..04dadcd73b857 100644
> --- a/arch/x86/kernel/early_printk.c
> +++ b/arch/x86/kernel/early_printk.c
[ ... ]
> @@ -414,6 +429,11 @@ static int __init setup_early_printk(char *buf)
>  			early_serial_init(buf + 4);
>  			early_console_register(&early_serial_console, keep);
>  		}
> +		if (!strncmp(buf, "tdx", 3)) {
> +			early_serial_tdx_init();
> +			early_console_register(&early_serial_console, keep);
> +			break;
> +		}
>  #ifdef CONFIG_PCI
>  		if (!strncmp(buf, "pciserial", 9)) {
>  			buf += 9; /* Keep from match the above "pciserial" */

[Severity: Medium]
Should parse_earlyprintk() in arch/x86/boot/early_serial_console.c also
handle "tdx"?

In the decompressor, extract_kernel() calls early_tdx_detect() to wire
pio_ops to TDVMCALLs before calling console_init() -> parse_earlyprintk().
Because parse_earlyprintk() only recognizes "serial" and "ttyS", booting
with earlyprintk=tdx leaves port = 0 and skips early_serial_init(),
losing early serial console output in the boot stub and decompressor
compared to earlyprintk=serial.

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20261202-b4-tdx_earlyprintk_tdcalls-v6-0-779b5ae3a85d@intel.com?part=2

  reply	other threads:[~2026-12-02 20:08 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-12-02 19:59 [PATCH v6 0/2] x86/tdx: Use TDVMCALLs directly for earlyprintk Vishal Verma
2026-12-02 19:59 ` [PATCH v6 1/2] x86/tdx: Move port I/O definitions to a shared header Vishal Verma
2026-12-02 19:59 ` [PATCH v6 2/2] x86/early_printk: Add earlyprintk=tdx to drive the UART with TDVMCALLs Vishal Verma
2026-12-02 20:08   ` sashiko-bot [this message]
2026-12-02 20:13     ` Verma, Vishal L

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=sashiko-outbox-246577@kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=kvm@vger.kernel.org \
    --cc=sashiko-reviews@lists.linux.dev \
    --cc=vishal.l.verma@intel.com \
    /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