Re: [PATCH v4 07/12] x86/tdx: Make TDX_HYPERCALL asm similar to TDX_MODULE_CALL
From: kirill.shutemov@xxxxxxxxxxxxxxx
Date: Wed Aug 30 2023 - 14:53:14 EST
On Sat, Aug 26, 2023 at 12:50:11AM +0000, Huang, Kai wrote:
> On Sat, 2023-08-26 at 02:35 +0300, kirill.shutemov@xxxxxxxxxxxxxxx wrote:
> > On Tue, Aug 15, 2023 at 11:02:01PM +1200, Kai Huang wrote:
> > > + /*
> > > + * Failure of __tdcall_hypercall() indicates a failure of the TDVMCALL
> > > + * mechanism itself and that something has gone horribly wrong with
> > > + * the TDX module. __tdx_hypercall_failed() never returns.
> > > + */
> > > + if (__tdcall_hypercall(TDG_VP_VMCALL, &margs))
> > > + __tdx_hypercall_failed();
> >
> > Do we even need __tdx_hypercall_failed() anymore? Just call panic()
> > directly, no?
> >
>
> __tdx_hypercall() is currently annotated with 'noinstr' (which is also the
> behaviour of the old code). We need it otherwise we will get build warning like
> below:
>
> https://lore.kernel.org/lkml/a23ce8fd289141cea3a1b4f3dace221dca847238.camel@xxxxxxxxx/T/#m205b29ce3e33983ec6be733c2afffbfd5cb653ff
Okay, fair enough. We can return back to it later.
Reviewed-by: Kirill A. Shutemov <kirill.shutemov@xxxxxxxxxxxxxxx>
--
Kiryl Shutsemau / Kirill A. Shutemov