Re: [PATCH V2 1/1] x86/tdx: Route safe halt execution via tdx_safe_halt()
From: Vishal Annapurve
Date: Mon Feb 03 2025 - 17:09:05 EST
On Mon, Feb 3, 2025 at 1:19 PM Dave Hansen <dave.hansen@xxxxxxxxx> wrote:
>
> On 2/3/25 12:09, Kirill A. Shutemov wrote:
> ...
> > But Sean's proposal with HLT check before enabling interrupts looks better
> > to me.
>
> "Sean's proposal" being this:
>
> https://lore.kernel.org/all/Z5l6L3Hen9_Y3SGC@xxxxxxxxxx/
>
> ?
Yes.
>
> Is that just intended to quietly fix up a hlt-induced #VE? I'm not sure
> that's a good idea. The TDVMCALL is slow, but the #VE is also presumably
> quite slow. This is (presumably) getting called in an idle path which is
> actually one of the most performance-sensitive things we have in the kernel.
>
> Or am I missing the point of Sean's proposal?
I think you have captured the intent correctly.
>
> I don't mind having the #VE handler warn about the situation if we end
> up there accidentally.
>
> I'd much rather have a kernel configured in a way that we are pretty
> sure there's no path to even call hlt.
+1.