aboutsummaryrefslogtreecommitdiff
path: root/arch/x86/coco/tdx/tdcall.S
diff options
context:
space:
mode:
authorGravatar Peter Zijlstra <peterz@infradead.org> 2023-01-12 20:43:36 +0100
committerGravatar Ingo Molnar <mingo@kernel.org> 2023-01-13 11:48:15 +0100
commite80a48bade619ec5a92230b3d4ae84bfc2746822 (patch)
treec0781002ed2ea989994d430ab180546c8ac3c653 /arch/x86/coco/tdx/tdcall.S
parentarch/idle: Change arch_cpu_idle() behavior: always exit with IRQs disabled (diff)
downloadlinux-e80a48bade619ec5a92230b3d4ae84bfc2746822.tar.gz
linux-e80a48bade619ec5a92230b3d4ae84bfc2746822.tar.bz2
linux-e80a48bade619ec5a92230b3d4ae84bfc2746822.zip
x86/tdx: Remove TDX_HCALL_ISSUE_STI
Now that arch_cpu_idle() is expected to return with IRQs disabled, avoid the useless STI/CLI dance. Per the specs this is supposed to work, but nobody has yet relied up this behaviour so broken implementations are possible. Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org> Signed-off-by: Ingo Molnar <mingo@kernel.org> Tested-by: Tony Lindgren <tony@atomide.com> Tested-by: Ulf Hansson <ulf.hansson@linaro.org> Acked-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com> Acked-by: Frederic Weisbecker <frederic@kernel.org> Link: https://lore.kernel.org/r/20230112195540.682137572@infradead.org
Diffstat (limited to 'arch/x86/coco/tdx/tdcall.S')
-rw-r--r--arch/x86/coco/tdx/tdcall.S13
1 files changed, 0 insertions, 13 deletions
diff --git a/arch/x86/coco/tdx/tdcall.S b/arch/x86/coco/tdx/tdcall.S
index f9eb1134f22d..508c17332e2e 100644
--- a/arch/x86/coco/tdx/tdcall.S
+++ b/arch/x86/coco/tdx/tdcall.S
@@ -139,19 +139,6 @@ SYM_FUNC_START(__tdx_hypercall)
movl $TDVMCALL_EXPOSE_REGS_MASK, %ecx
- /*
- * For the idle loop STI needs to be called directly before the TDCALL
- * that enters idle (EXIT_REASON_HLT case). STI instruction enables
- * interrupts only one instruction later. If there is a window between
- * STI and the instruction that emulates the HALT state, there is a
- * chance for interrupts to happen in this window, which can delay the
- * HLT operation indefinitely. Since this is the not the desired
- * result, conditionally call STI before TDCALL.
- */
- testq $TDX_HCALL_ISSUE_STI, %rsi
- jz .Lskip_sti
- sti
-.Lskip_sti:
tdcall
/*