2023-09-14 05:39:20

by Isaku Yamahata

[permalink] [raw]
Subject: Re: [PATCH v4 00/12] Unify TDCALL/SEAMCALL and TDVMCALL assembly

On Tue, Sep 05, 2023 at 11:01:28PM +0000,
"Huang, Kai" <[email protected]> wrote:

> On Tue, 2023-08-15 at 23:01 +1200, Kai Huang wrote:
> > Hi Peter, Kirill,
> >
> > This series unifies the assembly code for TDCALL/SEAMCALL and TDVMCALL.
> > Now all of them use one singe TDX_MODULE_CALL asm macro. More
> > information please see cover letter of v2 (see link below).
> >
> > Tested by booting TDX guest, initializing TDX module, and running TDX
> > guest successfully, all with this series applied.
> >
> >
>
> Hi Peter,
>
> Sorry to ping, but could you take a look whether you are OK with this series?
>
> Basically Kirill has provided his Reviewed-by for all the patches except the
> last one (Add unused registers to 'struct tdx_module_args' to optimize VP.ENTER
> for KVM), which he didn't like. But it is pretty much a standalone optimization
> patch we either can have or drop when applying, so I'll leave to you.
>
> Also feel free to let me know if I can help you on anything to offload part of
> your load? :-)

Because the optimization patch was dropped in tip x86/tdx tree, TDX KVM can't
use __seamcall_saved_ret() because the argument doesn't match. There is no
user of __seamcall_saved_ret().
--
Isaku Yamahata <[email protected]>


2023-09-14 21:47:22

by Huang, Kai

[permalink] [raw]
Subject: Re: [PATCH v4 00/12] Unify TDCALL/SEAMCALL and TDVMCALL assembly

On Wed, 2023-09-13 at 17:22 -0700, Isaku Yamahata wrote:
> On Tue, Sep 05, 2023 at 11:01:28PM +0000,
> "Huang, Kai" <[email protected]> wrote:
>
> > On Tue, 2023-08-15 at 23:01 +1200, Kai Huang wrote:
> > > Hi Peter, Kirill,
> > >
> > > This series unifies the assembly code for TDCALL/SEAMCALL and TDVMCALL.
> > > Now all of them use one singe TDX_MODULE_CALL asm macro. More
> > > information please see cover letter of v2 (see link below).
> > >
> > > Tested by booting TDX guest, initializing TDX module, and running TDX
> > > guest successfully, all with this series applied.
> > >
> > >
> >
> > Hi Peter,
> >
> > Sorry to ping, but could you take a look whether you are OK with this series?
> >
> > Basically Kirill has provided his Reviewed-by for all the patches except the
> > last one (Add unused registers to 'struct tdx_module_args' to optimize VP.ENTER
> > for KVM), which he didn't like. But it is pretty much a standalone optimization
> > patch we either can have or drop when applying, so I'll leave to you.
> >
> > Also feel free to let me know if I can help you on anything to offload part of
> > your load? :-)
>
> Because the optimization patch was dropped in tip x86/tdx tree, TDX KVM can't
> use __seamcall_saved_ret() because the argument doesn't match. There is no
> user of __seamcall_saved_ret().
>

I agree sometimes "optimization" is better to have, but functionally we
certainly don't depend on "optimization" to work, so sure KVM TDX can use it (of
course I will leave to maintainers though).