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:43 +0100
committerGravatar Ingo Molnar <mingo@kernel.org> 2023-01-13 11:48:16 +0100
commitc3982c1a36f70bd4521a9852246ea50105912084 (patch)
tree80e089f619f18d67c4f9585bd5ea934640074799 /arch/x86/coco/tdx/tdcall.S
parentcpuidle, mwait: Make the mwait code noinstr clean (diff)
downloadlinux-c3982c1a36f70bd4521a9852246ea50105912084.tar.gz
linux-c3982c1a36f70bd4521a9852246ea50105912084.tar.bz2
linux-c3982c1a36f70bd4521a9852246ea50105912084.zip
cpuidle, tdx: Make TDX code noinstr clean
objtool found a few cases where this code called out into instrumented code: vmlinux.o: warning: objtool: __halt+0x2c: call to hcall_func.constprop.0() leaves .noinstr.text section vmlinux.o: warning: objtool: __halt+0x3f: call to __tdx_hypercall() leaves .noinstr.text section vmlinux.o: warning: objtool: __tdx_hypercall+0x66: call to __tdx_hypercall_failed() leaves .noinstr.text section Fix it by: - moving TDX tdcall assembly methods into .noinstr.text (they are already noistr-clean) - marking __tdx_hypercall_failed() as 'noinstr' - annotating hcall_func() as __always_inline 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/20230112195541.111485720@infradead.org
Diffstat (limited to 'arch/x86/coco/tdx/tdcall.S')
-rw-r--r--arch/x86/coco/tdx/tdcall.S2
1 files changed, 2 insertions, 0 deletions
diff --git a/arch/x86/coco/tdx/tdcall.S b/arch/x86/coco/tdx/tdcall.S
index 508c17332e2e..ad0d51f03cb4 100644
--- a/arch/x86/coco/tdx/tdcall.S
+++ b/arch/x86/coco/tdx/tdcall.S
@@ -31,6 +31,8 @@
TDX_R12 | TDX_R13 | \
TDX_R14 | TDX_R15 )
+.section .noinstr.text, "ax"
+
/*
* __tdx_module_call() - Used by TDX guests to request services from
* the TDX module (does not include VMM services) using TDCALL instruction.