/* SPDX-License-Identifier: GPL-2.0 */1#include <asm/asm-offsets.h>2#include <asm/asm.h>34#include <linux/linkage.h>5#include <linux/errno.h>67#include "../../virt/vmx/tdx/tdxcall.S"89.section .noinstr.text, "ax"1011/*12* __tdcall() - Used by TDX guests to request services from the TDX13* module (does not include VMM services) using TDCALL instruction.14*15* __tdcall() function ABI:16*17* @fn (RDI) - TDCALL Leaf ID, moved to RAX18* @args (RSI) - struct tdx_module_args for input19*20* Only RCX/RDX/R8-R11 are used as input registers.21*22* Return status of TDCALL via RAX.23*/24SYM_FUNC_START(__tdcall)25TDX_MODULE_CALL host=026SYM_FUNC_END(__tdcall)2728/*29* __tdcall_ret() - Used by TDX guests to request services from the TDX30* module (does not include VMM services) using TDCALL instruction, with31* saving output registers to the 'struct tdx_module_args' used as input.32*33* __tdcall_ret() function ABI:34*35* @fn (RDI) - TDCALL Leaf ID, moved to RAX36* @args (RSI) - struct tdx_module_args for input and output37*38* Only RCX/RDX/R8-R11 are used as input/output registers.39*40* Return status of TDCALL via RAX.41*/42SYM_FUNC_START(__tdcall_ret)43TDX_MODULE_CALL host=0 ret=144SYM_FUNC_END(__tdcall_ret)4546/*47* __tdcall_saved_ret() - Used by TDX guests to request services from the48* TDX module (including VMM services) using TDCALL instruction, with49* saving output registers to the 'struct tdx_module_args' used as input.50*51* __tdcall_saved_ret() function ABI:52*53* @fn (RDI) - TDCALL leaf ID, moved to RAX54* @args (RSI) - struct tdx_module_args for input/output55*56* All registers in @args are used as input/output registers.57*58* On successful completion, return the hypercall error code.59*/60SYM_FUNC_START(__tdcall_saved_ret)61TDX_MODULE_CALL host=0 ret=1 saved=162SYM_FUNC_END(__tdcall_saved_ret)636465