lkml.org 
[lkml]   [2023]   [Jul]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v3 02/12] x86/tdx: Skip saving output regs when SEAMCALL fails with VMFailInvalid
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@linux.intel.com>
> Cc: Dave Hansen <dave.hansen@linux.intel.com>
> Cc: Peter Zijlstra <peterz@infradead.org>
> Suggested-by: Peter Zijlstra <peterz@infradead.org>
> Signed-off-by: Kai Huang <kai.huang@intel.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?

--
Kiryl Shutsemau / Kirill A. Shutemov

\
 
 \ /
  Last update: 2023-07-27 14:54    [W:0.226 / U:1.256 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site