File tree Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -131,11 +131,10 @@ SYM_FUNC_START(__tdx_hypercall)
131
131
push %r13
132
132
push %r12
133
133
push %rbx
134
- push %rbp
135
134
136
135
/* Free RDI and RSI to be used as TDVMCALL arguments */
137
136
movq %rdi , %rax
138
- movq %rsi , %rbp
137
+ push %rsi
139
138
140
139
/* Copy hypercall registers from arg struct: */
141
140
movq TDX_HYPERCALL_r8(%rax ), %r8
@@ -168,7 +167,7 @@ SYM_FUNC_START(__tdx_hypercall)
168
167
* HLT operation indefinitely. Since this is the not the desired
169
168
* result, conditionally call STI before TDCALL.
170
169
*/
171
- testq $TDX_HCALL_ISSUE_STI, %rbp
170
+ testq $TDX_HCALL_ISSUE_STI, 8 ( %rsp )
172
171
jz .Lskip_sti
173
172
sti
174
173
.Lskip_sti:
@@ -188,7 +187,7 @@ SYM_FUNC_START(__tdx_hypercall)
188
187
pop %rax
189
188
190
189
/* Copy hypercall result registers to arg struct if needed */
191
- testq $TDX_HCALL_HAS_OUTPUT, %rbp
190
+ testq $TDX_HCALL_HAS_OUTPUT, ( %rsp )
192
191
jz .Lout
193
192
194
193
movq %r8 , TDX_HYPERCALL_r8(%rax )
@@ -218,11 +217,12 @@ SYM_FUNC_START(__tdx_hypercall)
218
217
xor %r10d , %r10d
219
218
xor %r11d , %r11d
220
219
xor %rdi , %rdi
221
- xor %rsi , %rsi
222
220
xor %rdx , %rdx
223
221
222
+ /* Remove TDX_HCALL_* flags from the stack */
223
+ pop %rsi
224
+
224
225
/* Restore callee-saved GPRs as mandated by the x86_64 ABI */
225
- pop %rbp
226
226
pop %rbx
227
227
pop %r12
228
228
pop %r13
You can’t perform that action at this time.
0 commit comments