#ifndef _ASM_X86_SHARED_TDX_H
#define _ASM_X86_SHARED_TDX_H
#include <linux/bits.h>
#include <linux/types.h>
#define TDX_HYPERCALL_STANDARD …
#define TDX_CPUID_LEAF_ID …
#define TDX_IDENT …
#define TDG_VP_VMCALL …
#define TDG_VP_INFO …
#define TDG_VP_VEINFO_GET …
#define TDG_MR_REPORT …
#define TDG_MEM_PAGE_ACCEPT …
#define TDG_VM_WR …
#define TDCS_NOTIFY_ENABLES …
#define TDVMCALL_MAP_GPA …
#define TDVMCALL_GET_QUOTE …
#define TDVMCALL_REPORT_FATAL_ERROR …
#define TDVMCALL_STATUS_RETRY …
#define TDX_RDX …
#define TDX_RBX …
#define TDX_RSI …
#define TDX_RDI …
#define TDX_R8 …
#define TDX_R9 …
#define TDX_R10 …
#define TDX_R11 …
#define TDX_R12 …
#define TDX_R13 …
#define TDX_R14 …
#define TDX_R15 …
#define TDVMCALL_EXPOSE_REGS_MASK …
#define TDX_PS_4K …
#define TDX_PS_2M …
#define TDX_PS_1G …
#define TDX_PS_NR …
#ifndef __ASSEMBLY__
#include <linux/compiler_attributes.h>
struct tdx_module_args {
u64 rcx;
u64 rdx;
u64 r8;
u64 r9;
u64 r10;
u64 r11;
u64 r12;
u64 r13;
u64 r14;
u64 r15;
u64 rbx;
u64 rdi;
u64 rsi;
};
u64 __tdcall(u64 fn, struct tdx_module_args *args);
u64 __tdcall_ret(u64 fn, struct tdx_module_args *args);
u64 __tdcall_saved_ret(u64 fn, struct tdx_module_args *args);
u64 __tdx_hypercall(struct tdx_module_args *args);
static inline u64 _tdx_hypercall(u64 fn, u64 r12, u64 r13, u64 r14, u64 r15)
{
struct tdx_module_args args = {
.r10 = TDX_HYPERCALL_STANDARD,
.r11 = fn,
.r12 = r12,
.r13 = r13,
.r14 = r14,
.r15 = r15,
};
return __tdx_hypercall(&args);
}
void __noreturn __tdx_hypercall_failed(void);
bool tdx_accept_memory(phys_addr_t start, phys_addr_t end);
static __always_inline u64 hcall_func(u64 exit_reason)
{
return exit_reason;
}
#endif
#endif