Commit 2765142c authored by Kai Huang's avatar Kai Huang Committed by Greg Kroah-Hartman
Browse files

x86/tdx: Skip saving output regs when SEAMCALL fails with VMFailInvalid



[ Upstream commit 03a423d4 ]

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: default avatarPeter Zijlstra <peterz@infradead.org>
Signed-off-by: default avatarKai Huang <kai.huang@intel.com>
Signed-off-by: default avatarDave Hansen <dave.hansen@linux.intel.com>
Reviewed-by: default avatarKirill A. Shutemov <kirill.shutemov@linux.intel.com>
Acked-by: default avatarPeter Zijlstra (Intel) <peterz@infradead.org>
Link: https://lore.kernel.org/all/704088f5b4d72c7e24084f7f15bd1ac5005b7213.1692096753.git.kai.huang%40intel.com


Stable-dep-of: f65aa0ad ("x86/tdx: Dynamically disable SEPT violations from causing #VEs")
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
parent c72a9456
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment