arch/x86/coco/tdx/tdcall.S
Source file repositories/reference/linux-study-clean/arch/x86/coco/tdx/tdcall.S
File Facts
- System
- Linux kernel
- Corpus path
arch/x86/coco/tdx/tdcall.S- Extension
.S- Size
- 1822 bytes
- Lines
- 64
- Domain
- Architecture Layer
- Bucket
- arch/x86
- Inferred role
- Architecture Layer: arch/x86
- Status
- atlas-only
Why This File Exists
CPU and platform-specific kernel glue: boot entry, traps, syscall entry, interrupts, page tables, context switch, and low-level barriers.
- CPU and platform-specific kernel glue: boot entry, traps, syscall entry, interrupts, page tables, context switch, and low-level barriers.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
asm/asm-offsets.hasm/asm.hlinux/linkage.hlinux/errno.h../../virt/vmx/tdx/tdxcall.S
Detected Declarations
- No top-level syscall, struct, function, initcall, or export declaration detected by the generator.
Annotated Snippet
#include <asm/asm-offsets.h>
#include <asm/asm.h>
#include <linux/linkage.h>
#include <linux/errno.h>
#include "../../virt/vmx/tdx/tdxcall.S"
.section .noinstr.text, "ax"
/*
* __tdcall() - Used by TDX guests to request services from the TDX
* module (does not include VMM services) using TDCALL instruction.
*
* __tdcall() function ABI:
*
* @fn (RDI) - TDCALL Leaf ID, moved to RAX
* @args (RSI) - struct tdx_module_args for input
*
* Only RCX/RDX/R8-R11 are used as input registers.
*
* Return status of TDCALL via RAX.
*/
SYM_FUNC_START(__tdcall)
TDX_MODULE_CALL host=0
SYM_FUNC_END(__tdcall)
/*
* __tdcall_ret() - Used by TDX guests to request services from the TDX
* module (does not include VMM services) using TDCALL instruction, with
* saving output registers to the 'struct tdx_module_args' used as input.
*
* __tdcall_ret() function ABI:
*
* @fn (RDI) - TDCALL Leaf ID, moved to RAX
* @args (RSI) - struct tdx_module_args for input and output
*
* Only RCX/RDX/R8-R11 are used as input/output registers.
*
* Return status of TDCALL via RAX.
*/
SYM_FUNC_START(__tdcall_ret)
TDX_MODULE_CALL host=0 ret=1
SYM_FUNC_END(__tdcall_ret)
/*
* __tdcall_saved_ret() - Used by TDX guests to request services from the
* TDX module (including VMM services) using TDCALL instruction, with
* saving output registers to the 'struct tdx_module_args' used as input.
*
* __tdcall_saved_ret() function ABI:
*
* @fn (RDI) - TDCALL leaf ID, moved to RAX
* @args (RSI) - struct tdx_module_args for input/output
*
* All registers in @args are used as input/output registers.
*
* On successful completion, return the hypercall error code.
*/
SYM_FUNC_START(__tdcall_saved_ret)
TDX_MODULE_CALL host=0 ret=1 saved=1
SYM_FUNC_END(__tdcall_saved_ret)
Annotation
- Immediate include surface: `asm/asm-offsets.h`, `asm/asm.h`, `linux/linkage.h`, `linux/errno.h`, `../../virt/vmx/tdx/tdxcall.S`.
- Atlas domain: Architecture Layer / arch/x86.
- Implementation status: atlas-only.
Implementation Notes
- This generated page is the file-by-file coverage layer; curated subsystem chapters should link here when they synthesize a multi-file control flow.
- Core OS pages should be promoted from atlas-only to deep-reviewed when they explain data structures, invariants, locking, lifecycle, and C implementation snippets.
- Driver-family pages are intentionally pattern-oriented unless they are part of the selected PCIe/NVMe representative device path.