Back to home page

OSCL-LXR

 
 

    


0001 /* SPDX-License-Identifier: GPL-2.0 */
0002 #ifndef _ASM_X86_SHARED_TDX_H
0003 #define _ASM_X86_SHARED_TDX_H
0004 
0005 #include <linux/bits.h>
0006 #include <linux/types.h>
0007 
0008 #define TDX_HYPERCALL_STANDARD  0
0009 
0010 #define TDX_HCALL_HAS_OUTPUT    BIT(0)
0011 #define TDX_HCALL_ISSUE_STI BIT(1)
0012 
0013 #define TDX_CPUID_LEAF_ID   0x21
0014 #define TDX_IDENT       "IntelTDX    "
0015 
0016 #ifndef __ASSEMBLY__
0017 
0018 /*
0019  * Used in __tdx_hypercall() to pass down and get back registers' values of
0020  * the TDCALL instruction when requesting services from the VMM.
0021  *
0022  * This is a software only structure and not part of the TDX module/VMM ABI.
0023  */
0024 struct tdx_hypercall_args {
0025     u64 r10;
0026     u64 r11;
0027     u64 r12;
0028     u64 r13;
0029     u64 r14;
0030     u64 r15;
0031 };
0032 
0033 /* Used to request services from the VMM */
0034 u64 __tdx_hypercall(struct tdx_hypercall_args *args, unsigned long flags);
0035 
0036 /* Called from __tdx_hypercall() for unrecoverable failure */
0037 void __tdx_hypercall_failed(void);
0038 
0039 #endif /* !__ASSEMBLY__ */
0040 #endif /* _ASM_X86_SHARED_TDX_H */