Lines Matching +full:spare +full:- +full:regs
1 /* SPDX-License-Identifier: GPL-2.0 */
2 #include <asm/asm-offsets.h>
14 * TDX_MODULE_CALL - common helper macro for both
17 * TDCALL - used by TDX guests to make requests to the
19 * SEAMCALL - used by TDX hosts to make requests to the
22 *-------------------------------------------------------------------------
24 *-------------------------------------------------------------------------
27 * RAX - TDCALL/SEAMCALL Leaf number.
28 * RCX,RDX,RDI,RSI,RBX,R8-R15 - TDCALL/SEAMCALL Leaf specific input registers.
32 * RAX - TDCALL/SEAMCALL instruction error code.
33 * RCX,RDX,RDI,RSI,RBX,R8-R15 - TDCALL/SEAMCALL Leaf specific output registers.
35 *-------------------------------------------------------------------------
37 * So while the common core (RAX,RCX,RDX,R8-R11) fits nicely in the
38 * callee-clobbered registers and even leaves RDI,RSI free to act as a
41 * For simplicity, assume that anything that needs the callee-saved regs
51 /* Move other input regs from 'struct tdx_module_args' */
61 * Move additional input regs from the structure. For simplicity
62 * assume that anything needs the callee-saved regs also tramples
65 /* Save those callee-saved GPRs as mandated by the x86_64 ABI */
95 * or P-SEAMLDR is busy with another SEAMCALL. %rax is not
113 * valid thus no register can be used as spare to restore the
116 * For this case, need to make one register as spare by saving it
118 * the spare register.
120 * Note for other TDCALLs/SEAMCALLs there are spare registers
129 /* Copy additional output regs to the structure */
182 /* Restore callee-saved GPRs as mandated by the x86_64 ABI */
202 * code by setting TDX_SW_ERROR to the high 32-bits of RAX.
205 * only accepts 32-bit immediate at most.