Re: [PATCH v12 05/22] x86/virt/tdx: Add SEAMCALL infrastructure

From: Huang, Kai
Date: Wed Jun 28 2023 - 19:26:05 EST


On Wed, 2023-06-28 at 15:54 +0200, Peter Zijlstra wrote:
> On Wed, Jun 28, 2023 at 02:58:13PM +0200, Peter Zijlstra wrote:
>
> > Can someone explain to me why __tdx_hypercall() is sane (per the above)
> > but then we grew __tdx_module_call() as an absolute abomination and are
> > apparently using that for seam too?
>
> That is, why do we have two different TDCALL wrappers? Makes no sense.
>
I think the reason should be TDCALL/SEAMCALL can be used in performance critical
path, but TDVMCALL isn't.

For example, SEAMCALLs are used in KVM's MMU code to handle page fault for TDX
private pages.

Kirill, could you help to clarify? Thanks.