Re: [PATCH v3] x86/virt/tdx: Formalize SEAMCALL version encoding support
From: Edgecombe, Rick P
Date: Fri Jul 24 2026 - 13:06:12 EST
On Fri, 2026-07-24 at 11:14 +0800, Xu Yilun wrote:
> > I guess this works because the __always_inline is enough for the compiler to
> > trace fn to a compile time constant up the callchain. It seems somewhat
> > compiler
> > sensitive though. Did you convince yourself somehow that some compiler will
> > not
> > complain?
>
> I see the previous talk [1][2], that existing __seamcall*() rely on the
> direct call, though there is no guarantee. We accept the assumption
> until there is compiler issue. So I think this doesn't add more problem.
>
> [1]
> https://lore.kernel.org/lkml/20250605145914.GW39944@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx/
> [2] 0b3bc018e86a ("x86/virt/tdx: Avoid indirect calls to TDX assembly
> function")
Oh, right. It is one more layer of function it has to track it through compared
to that case, but LGTM.