@@ -66,10 +66,10 @@ EXPORT_SYMBOL_GPL(tdx_kvm_hypercall);
66
66
* should only be used for calls that have no legitimate reason to fail
67
67
* or where the kernel can not survive the call failing.
68
68
*/
69
- static inline void tdx_module_call (u64 fn , u64 rcx , u64 rdx , u64 r8 , u64 r9 ,
70
- struct tdx_module_output * out )
69
+ static inline void tdcall (u64 fn , u64 rcx , u64 rdx , u64 r8 , u64 r9 ,
70
+ struct tdx_module_output * out )
71
71
{
72
- if (__tdx_module_call (fn , rcx , rdx , r8 , r9 , out ))
72
+ if (__tdcall (fn , rcx , rdx , r8 , r9 , out ))
73
73
panic ("TDCALL %lld failed (Buggy TDX module!)\n" , fn );
74
74
}
75
75
@@ -91,9 +91,9 @@ int tdx_mcall_get_report0(u8 *reportdata, u8 *tdreport)
91
91
{
92
92
u64 ret ;
93
93
94
- ret = __tdx_module_call (TDG_MR_REPORT , virt_to_phys (tdreport ),
95
- virt_to_phys (reportdata ), TDREPORT_SUBTYPE_0 ,
96
- 0 , NULL );
94
+ ret = __tdcall (TDG_MR_REPORT , virt_to_phys (tdreport ),
95
+ virt_to_phys (reportdata ), TDREPORT_SUBTYPE_0 ,
96
+ 0 , NULL );
97
97
if (ret ) {
98
98
if (TDCALL_RETURN_CODE (ret ) == TDCALL_INVALID_OPERAND )
99
99
return - EINVAL ;
@@ -152,7 +152,7 @@ static void tdx_parse_tdinfo(u64 *cc_mask)
152
152
* Guest-Host-Communication Interface (GHCI), section 2.4.2 TDCALL
153
153
* [TDG.VP.INFO].
154
154
*/
155
- tdx_module_call (TDG_VP_INFO , 0 , 0 , 0 , 0 , & out );
155
+ tdcall (TDG_VP_INFO , 0 , 0 , 0 , 0 , & out );
156
156
157
157
/*
158
158
* The highest bit of a guest physical address is the "sharing" bit.
@@ -594,7 +594,7 @@ void tdx_get_ve_info(struct ve_info *ve)
594
594
* Note, the TDX module treats virtual NMIs as inhibited if the #VE
595
595
* valid flag is set. It means that NMI=>#VE will not result in a #DF.
596
596
*/
597
- tdx_module_call (TDG_VP_VEINFO_GET , 0 , 0 , 0 , 0 , & out );
597
+ tdcall (TDG_VP_VEINFO_GET , 0 , 0 , 0 , 0 , & out );
598
598
599
599
/* Transfer the output parameters */
600
600
ve -> exit_reason = out .rcx ;
@@ -814,7 +814,7 @@ void __init tdx_early_init(void)
814
814
cc_set_mask (cc_mask );
815
815
816
816
/* Kernel does not use NOTIFY_ENABLES and does not need random #VEs */
817
- tdx_module_call (TDG_VM_WR , 0 , TDCS_NOTIFY_ENABLES , 0 , -1ULL , NULL );
817
+ tdcall (TDG_VM_WR , 0 , TDCS_NOTIFY_ENABLES , 0 , -1ULL , NULL );
818
818
819
819
/*
820
820
* All bits above GPA width are reserved and kernel treats shared bit
0 commit comments