tdcall.S (5efb96289e581c187af1bc288ce5d26ed6181749) | tdcall.S (57a420bb8186d1d0178b857e5dd5026093641654) |
---|---|
1/* SPDX-License-Identifier: GPL-2.0 */ 2#include <asm/asm-offsets.h> 3#include <asm/asm.h> 4#include <asm/frame.h> 5#include <asm/unwind_hints.h> 6 7#include <linux/linkage.h> 8#include <linux/bits.h> --- 29 unchanged lines hidden (view full) --- 38 TDX_R10 | TDX_R11 | TDX_R12 | TDX_R13 | TDX_R14 | TDX_R15 ) 39 40.section .noinstr.text, "ax" 41 42/* 43 * __tdcall() - Used by TDX guests to request services from the TDX 44 * module (does not include VMM services) using TDCALL instruction. 45 * | 1/* SPDX-License-Identifier: GPL-2.0 */ 2#include <asm/asm-offsets.h> 3#include <asm/asm.h> 4#include <asm/frame.h> 5#include <asm/unwind_hints.h> 6 7#include <linux/linkage.h> 8#include <linux/bits.h> --- 29 unchanged lines hidden (view full) --- 38 TDX_R10 | TDX_R11 | TDX_R12 | TDX_R13 | TDX_R14 | TDX_R15 ) 39 40.section .noinstr.text, "ax" 41 42/* 43 * __tdcall() - Used by TDX guests to request services from the TDX 44 * module (does not include VMM services) using TDCALL instruction. 45 * |
46 * Transforms function call register arguments into the TDCALL register ABI. 47 * After TDCALL operation, TDX module output is saved in @out (if it is 48 * provided by the user). 49 * 50 *------------------------------------------------------------------------- 51 * TDCALL ABI: 52 *------------------------------------------------------------------------- 53 * Input Registers: 54 * 55 * RAX - TDCALL Leaf number. 56 * RCX,RDX,R8-R9 - TDCALL Leaf specific input registers. 57 * 58 * Output Registers: 59 * 60 * RAX - TDCALL instruction error code. 61 * RCX,RDX,R8-R11 - TDCALL Leaf specific output registers. 62 * 63 *------------------------------------------------------------------------- 64 * | |
65 * __tdcall() function ABI: 66 * | 46 * __tdcall() function ABI: 47 * |
67 * @fn (RDI) - TDCALL Leaf ID, moved to RAX 68 * @rcx (RSI) - Input parameter 1, moved to RCX 69 * @rdx (RDX) - Input parameter 2, moved to RDX 70 * @r8 (RCX) - Input parameter 3, moved to R8 71 * @r9 (R8) - Input parameter 4, moved to R9 | 48 * @fn (RDI) - TDCALL Leaf ID, moved to RAX 49 * @args (RSI) - struct tdx_module_args for input |
72 * | 50 * |
73 * @out (R9) - struct tdx_module_output pointer 74 * stored temporarily in R12 (not 75 * shared with the TDX module). It 76 * can be NULL. 77 * | |
78 * Return status of TDCALL via RAX. 79 */ 80SYM_FUNC_START(__tdcall) 81 TDX_MODULE_CALL host=0 82SYM_FUNC_END(__tdcall) 83 84/* | 51 * Return status of TDCALL via RAX. 52 */ 53SYM_FUNC_START(__tdcall) 54 TDX_MODULE_CALL host=0 55SYM_FUNC_END(__tdcall) 56 57/* |
58 * __tdcall_ret() - Used by TDX guests to request services from the TDX 59 * module (does not include VMM services) using TDCALL instruction, with 60 * saving output registers to the 'struct tdx_module_args' used as input. 61 * 62 * __tdcall_ret() function ABI: 63 * 64 * @fn (RDI) - TDCALL Leaf ID, moved to RAX 65 * @args (RSI) - struct tdx_module_args for input and output 66 * 67 * Return status of TDCALL via RAX. 68 */ 69SYM_FUNC_START(__tdcall_ret) 70 TDX_MODULE_CALL host=0 ret=1 71SYM_FUNC_END(__tdcall_ret) 72 73/* |
|
85 * TDX_HYPERCALL - Make hypercalls to a TDX VMM using TDVMCALL leaf of TDCALL 86 * instruction 87 * 88 * Transforms values in function call argument struct tdx_hypercall_args @args 89 * into the TDCALL register ABI. After TDCALL operation, VMM output is saved 90 * back in @args, if \ret is 1. 91 * 92 *------------------------------------------------------------------------- --- 145 unchanged lines hidden --- | 74 * TDX_HYPERCALL - Make hypercalls to a TDX VMM using TDVMCALL leaf of TDCALL 75 * instruction 76 * 77 * Transforms values in function call argument struct tdx_hypercall_args @args 78 * into the TDCALL register ABI. After TDCALL operation, VMM output is saved 79 * back in @args, if \ret is 1. 80 * 81 *------------------------------------------------------------------------- --- 145 unchanged lines hidden --- |