From: Nikolay Borisov <nik.borisov@suse.com>
To: Vishal Verma <vishal.l.verma@intel.com>,
x86@kernel.org, Dave Hansen <dave.hansen@linux.intel.com>,
Rick Edgecombe <rick.p.edgecombe@intel.com>,
Kiryl Shutsemau <kas@kernel.org>
Cc: linux-kernel@vger.kernel.org, linux-coco@lists.linux.dev,
kvm@vger.kernel.org, Andi Kleen <ak@linux.intel.com>
Subject: Re: [PATCH] x86/tdx: Remove the early #VE handler
Date: Tue, 29 Sep 2026 14:15:14 +0300 [thread overview]
Message-ID: <3e7a8725-9e31-4f88-926d-f7bf9c15b45f@suse.com> (raw)
In-Reply-To: <20260910-b4-tdx_remove_early_ve_handler-v1-1-bf47a4d360c5@intel.com>
On 10.09.26 г. 21:28 ч., Vishal Verma wrote:
> tdx_early_handle_ve() emulates port I/O for #VEs taken before
> idt_setup_early_traps() installs the real #VE gate. Per commit
> 32e72854fa5f ("x86/tdx: Port I/O: Add early boot support"), it exists to
> support earlyprintk's serial driver.
>
> "earlyprintk=" and "earlycon=" are both early_param() handlers, so no
> console can be registered before parse_early_param(), which runs from
> setup_arch(), after idt_setup_early_traps() has replaced the early IDT.
> Nothing in the window between idt_setup_early_handler() and
> idt_setup_early_traps() does port I/O, so this emulation doesn't ever
> get called.
>
> Remove the handler. Any #VE in the early window now falls through to
> early_fixup_exception(), as it previously did for #VEs that were not I/O
> instructions.
>
> Found with the help of an LLM observing that the real IDT is installed
> before parse_early_param(). LLMs were also used to verify this. On a TDX
> guest booted with earlyprintk, a counter added to tdx_early_handle_ve()
> for testing remained 0 after boot.
>
> Signed-off-by: Vishal Verma <vishal.l.verma@intel.com>
> Cc: Andi Kleen <ak@linux.intel.com>
> Cc: Rick Edgecombe <rick.p.edgecombe@intel.com>
Reviewed-by: Nikolay Borisov <nik.borisov@suse.com>
prev parent reply other threads:[~2026-09-29 11:15 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-10 18:28 [PATCH] x86/tdx: Remove the early #VE handler Vishal Verma
2026-09-10 20:39 ` Edgecombe, Rick P
2026-09-11 0:15 ` Verma, Vishal L
2026-09-11 10:37 ` Kiryl Shutsemau
2026-09-11 15:24 ` Edgecombe, Rick P
2026-09-11 16:07 ` Kiryl Shutsemau
2026-09-11 17:51 ` Edgecombe, Rick P
2026-09-21 21:20 ` Verma, Vishal L
2026-09-22 10:19 ` Kiryl Shutsemau
2026-09-22 17:45 ` Verma, Vishal L
2026-09-24 10:48 ` Kiryl Shutsemau
2026-09-29 11:15 ` Nikolay Borisov [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=3e7a8725-9e31-4f88-926d-f7bf9c15b45f@suse.com \
--to=nik.borisov@suse.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=rick.p.edgecombe@intel.com \
--cc=vishal.l.verma@intel.com \
--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