/* SPDX-License-Identifier: GPL-2.0 */1#include <linux/linkage.h>2#include <asm/frame.h>34#include "tdxcall.S"56/*7* __seamcall() - Host-side interface functions to SEAM software8* (the P-SEAMLDR or the TDX module).9*10* __seamcall() function ABI:11*12* @fn (RDI) - SEAMCALL Leaf number, moved to RAX13* @args (RSI) - struct tdx_module_args for input14*15* Only RCX/RDX/R8-R11 are used as input registers.16*17* Return (via RAX) TDX_SEAMCALL_VMFAILINVALID if the SEAMCALL itself18* fails, or the completion status of the SEAMCALL leaf function.19*/20SYM_FUNC_START(__seamcall)21TDX_MODULE_CALL host=122SYM_FUNC_END(__seamcall)2324/*25* __seamcall_ret() - Host-side interface functions to SEAM software26* (the P-SEAMLDR or the TDX module), with saving output registers to27* the 'struct tdx_module_args' used as input.28*29* __seamcall_ret() function ABI:30*31* @fn (RDI) - SEAMCALL Leaf number, moved to RAX32* @args (RSI) - struct tdx_module_args for input and output33*34* Only RCX/RDX/R8-R11 are used as input/output registers.35*36* Return (via RAX) TDX_SEAMCALL_VMFAILINVALID if the SEAMCALL itself37* fails, or the completion status of the SEAMCALL leaf function.38*/39SYM_FUNC_START(__seamcall_ret)40TDX_MODULE_CALL host=1 ret=141SYM_FUNC_END(__seamcall_ret)4243/* KVM requires non-instrumentable __seamcall_saved_ret() for TDH.VP.ENTER */44.section .noinstr.text, "ax"4546/*47* __seamcall_saved_ret() - Host-side interface functions to SEAM software48* (the P-SEAMLDR or the TDX module), with saving output registers to the49* 'struct tdx_module_args' used as input.50*51* __seamcall_saved_ret() function ABI:52*53* @fn (RDI) - SEAMCALL Leaf number, moved to RAX54* @args (RSI) - struct tdx_module_args for input and output55*56* All registers in @args are used as input/output registers.57*58* Return (via RAX) TDX_SEAMCALL_VMFAILINVALID if the SEAMCALL itself59* fails, or the completion status of the SEAMCALL leaf function.60*/61SYM_FUNC_START(__seamcall_saved_ret)62TDX_MODULE_CALL host=1 ret=1 saved=163SYM_FUNC_END(__seamcall_saved_ret)646566