[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <5065c767eecb1c02101f031cd346892e09d79433.camel@intel.com>
Date: Thu, 27 Jul 2023 22:55:32 +0000
From: "Huang, Kai" <kai.huang@...el.com>
To: "kirill.shutemov@...ux.intel.com" <kirill.shutemov@...ux.intel.com>
CC: "Hansen, Dave" <dave.hansen@...el.com>,
"Christopherson,, Sean" <seanjc@...gle.com>,
"x86@...nel.org" <x86@...nel.org>, "bp@...en8.de" <bp@...en8.de>,
"peterz@...radead.org" <peterz@...radead.org>,
"hpa@...or.com" <hpa@...or.com>,
"mingo@...hat.com" <mingo@...hat.com>,
"tglx@...utronix.de" <tglx@...utronix.de>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"pbonzini@...hat.com" <pbonzini@...hat.com>,
"Yamahata, Isaku" <isaku.yamahata@...el.com>,
"sathyanarayanan.kuppuswamy@...ux.intel.com"
<sathyanarayanan.kuppuswamy@...ux.intel.com>,
"n.borisov.lkml@...il.com" <n.borisov.lkml@...il.com>
Subject: Re: [PATCH v3 02/12] x86/tdx: Skip saving output regs when SEAMCALL
fails with VMFailInvalid
On Thu, 2023-07-27 at 15:52 +0300, kirill.shutemov@...ux.intel.com wrote:
> On Wed, Jul 26, 2023 at 11:25:04PM +1200, Kai Huang wrote:
> > If SEAMCALL fails with VMFailInvalid, the SEAM software (e.g., the TDX
> > module) won't have chance to set any output register. Skip saving the
> > output registers to the structure in this case.
> >
> > Also, as '.Lno_output_struct' is the very last symbol before RET, rename
> > it to '.Lout' to make it short.
> >
> > Opportunistically make the asm directives unindented.
> >
> > Cc: Kirill A. Shutemov <kirill.shutemov@...ux.intel.com>
> > Cc: Dave Hansen <dave.hansen@...ux.intel.com>
> > Cc: Peter Zijlstra <peterz@...radead.org>
> > Suggested-by: Peter Zijlstra <peterz@...radead.org>
> > Signed-off-by: Kai Huang <kai.huang@...el.com>
> > ---
> >
> > v2 -> v3:
> > - No change.
> >
> > v1 -> v2:
> > - A new patch to improve SEAMCALL VMFailInvalid failure, with v1 patch
> > "x86/tdx: Move FRAME_BEGIN/END to TDX_MODULE_CALL asm macro" merged.
> >
> > ---
> > arch/x86/coco/tdx/tdcall.S | 3 ---
> > arch/x86/virt/vmx/tdx/tdxcall.S | 29 ++++++++++++++++++++---------
> > 2 files changed, 20 insertions(+), 12 deletions(-)
> >
> > diff --git a/arch/x86/coco/tdx/tdcall.S b/arch/x86/coco/tdx/tdcall.S
> > index 2eca5f43734f..e5d4b7d8ecd4 100644
> > --- a/arch/x86/coco/tdx/tdcall.S
> > +++ b/arch/x86/coco/tdx/tdcall.S
> > @@ -78,10 +78,7 @@
> > * Return status of TDCALL via RAX.
> > */
> > SYM_FUNC_START(__tdx_module_call)
> > - FRAME_BEGIN
> > TDX_MODULE_CALL host=0
> > - FRAME_END
> > - RET
> > SYM_FUNC_END(__tdx_module_call)
> >
>
> Do we still need to include asm/frame.h after the change?
>
For this patch yes because we still have TDX_HYPERCALL macro here.
We probably can remove it in the patch where TDX_HYPERCALL gets removed.
Powered by blists - more mailing lists