x86/tdx: Skip saving output regs when SEAMCALL fails with VMFailInvalid
authorKai Huang <kai.huang@intel.com>
Tue, 15 Aug 2023 11:01:56 +0000 (23:01 +1200)
committerDave Hansen <dave.hansen@linux.intel.com>
Mon, 11 Sep 2023 23:32:23 +0000 (16:32 -0700)
commit03a423d40cb30e0e1cb77a801acb56ddb0bf6f5e
tree32b488fa8be8093f770682286cbfce7a44b0eedd
parent5d092b66119d774853cc9308522620299048a662
x86/tdx: Skip saving output regs when SEAMCALL fails with VMFailInvalid

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.

Suggested-by: Peter Zijlstra <peterz@infradead.org>
Signed-off-by: Kai Huang <kai.huang@intel.com>
Signed-off-by: Dave Hansen <dave.hansen@linux.intel.com>
Reviewed-by: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>
Acked-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Link: https://lore.kernel.org/all/704088f5b4d72c7e24084f7f15bd1ac5005b7213.1692096753.git.kai.huang%40intel.com
arch/x86/coco/tdx/tdcall.S
arch/x86/virt/vmx/tdx/tdxcall.S