1 /* SPDX-License-Identifier: GPL-2.0 */
2 #ifndef _ASM_X86_SHARED_TDX_H
3 #define _ASM_X86_SHARED_TDX_H
5 #include <linux/bits.h>
6 #include <linux/types.h>
8 #define TDX_HYPERCALL_STANDARD 0
10 #define TDX_HCALL_HAS_OUTPUT BIT(0)
12 #define TDX_CPUID_LEAF_ID 0x21
13 #define TDX_IDENT "IntelTDX "
18 * Used in __tdx_hypercall() to pass down and get back registers' values of
19 * the TDCALL instruction when requesting services from the VMM.
21 * This is a software only structure and not part of the TDX module/VMM ABI.
23 struct tdx_hypercall_args {
38 /* Used to request services from the VMM */
39 u64 __tdx_hypercall(struct tdx_hypercall_args *args, unsigned long flags);
41 /* Called from __tdx_hypercall() for unrecoverable failure */
42 void __tdx_hypercall_failed(void);
44 #endif /* !__ASSEMBLY__ */
45 #endif /* _ASM_X86_SHARED_TDX_H */