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)
11 #define TDX_HCALL_ISSUE_STI BIT(1)
13 #define TDX_CPUID_LEAF_ID 0x21
14 #define TDX_IDENT "IntelTDX "
19 * Used in __tdx_hypercall() to pass down and get back registers' values of
20 * the TDCALL instruction when requesting services from the VMM.
22 * This is a software only structure and not part of the TDX module/VMM ABI.
24 struct tdx_hypercall_args {
33 /* Used to request services from the VMM */
34 u64 __tdx_hypercall(struct tdx_hypercall_args *args, unsigned long flags);
36 /* Called from __tdx_hypercall() for unrecoverable failure */
37 void __tdx_hypercall_failed(void);
39 #endif /* !__ASSEMBLY__ */
40 #endif /* _ASM_X86_SHARED_TDX_H */