All of lore.kernel.org
 help / color / mirror / Atom feed
From: Kiryl Shutsemau <kas@kernel.org>
To: "Verma, Vishal L" <vishal.l.verma@intel.com>
Cc: "Edgecombe, Rick P" <rick.p.edgecombe@intel.com>,
	 "kvm@vger.kernel.org" <kvm@vger.kernel.org>,
	"linux-coco@lists.linux.dev" <linux-coco@lists.linux.dev>,
	 "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"ak@linux.intel.com" <ak@linux.intel.com>,
	 "x86@kernel.org" <x86@kernel.org>,
	"dave.hansen@linux.intel.com" <dave.hansen@linux.intel.com>
Subject: Re: [PATCH] x86/tdx: Remove the early #VE handler
Date: Tue, 22 Sep 2026 11:19:37 +0100	[thread overview]
Message-ID: <arJVpaAi9TqEfV7E@thinkstation> (raw)
In-Reply-To: <4238bd74efaeea1a6158b79f9475a5f8d1aa7e0a.camel@intel.com>

On Mon, Sep 21, 2026 at 09:20:18PM +0000, Verma, Vishal L wrote:
> On Fri, 2026-09-11 at 11:37 +0100, Kiryl Shutsemau wrote:
> > 
> > Rick, could you actually test it?
> > 
> > Are we sure there's no other port I/O in before idt_setup_early_traps()?
> > 
> > I don't see anything direct, but exception path is different story.
> > 
> > native_machine_emergency_restart() does port I/O for BOOT_KBD which
> > seems to be reachable and leads to #VE with the patch:
> > 
> > machine_emergency_restart()
> >   __machine_emergency_restart(1)
> >     machine_ops.emergency_restart()
> >       native_machine_emergency_restart()
> >         reboot_type == BOOT_ACPI (default)
> > 	acpi_reboot()
> > 	reboot_type = BOOT_KBD
> >   	  kb_wait()
> >             inb(0x64) --> #VE
> > 
> > Could you check if the patch changes panic() behaviour in the window
> > before idt_setup_early_traps()?
> 
> Hi Kiryl - not sure how I would test this - but looking at it a bit
> more - 
> 
> vpanic() only goes to the machine_emergency_restart() path if
> CONFIG_PANIC_TIMEOUT is something other than 0. Distros and Kconfig
> both default it to 0. This could be overridden by panic=N on the
> command line, but that is parsed after idt_setup_early_traps(), so that
> would behave normally.
> 
> So at least this path should, in practice, never cause a problem.

Could you just check what happens you panic early (like in
tdx_early_init()) with and without the patch?

-- 
  Kiryl Shutsemau / Kirill A. Shutemov

  reply	other threads:[~2026-09-22 10:19 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 [this message]
2026-09-22 17:45         ` Verma, Vishal L
2026-09-24 10:48           ` Kiryl Shutsemau
2026-09-29 11:15 ` Nikolay Borisov

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=arJVpaAi9TqEfV7E@thinkstation \
    --to=kas@kernel.org \
    --cc=ak@linux.intel.com \
    --cc=dave.hansen@linux.intel.com \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.