Skip to content

Commit

Permalink
x86/tdx: Annotate a noreturn function
Browse files Browse the repository at this point in the history
objdump complains:

  vmlinux.o: warning: objtool: __tdx_hypercall()+0x74: unreachable instruction

because __tdx_hypercall_failed() won't return but panic the guest.
Annotate that that is ok and desired.

Fixes: eb94f1b ("x86/tdx: Add __tdx_module_call() and __tdx_hypercall() helper functions")
Signed-off-by: Borislav Petkov <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
  • Loading branch information
suryasaimadhu committed Apr 21, 2022
1 parent 5196401 commit 5af14c2
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions arch/x86/coco/tdx/tdcall.S
Original file line number Diff line number Diff line change
Expand Up @@ -200,5 +200,6 @@ SYM_FUNC_START(__tdx_hypercall)
.Lpanic:
call __tdx_hypercall_failed
/* __tdx_hypercall_failed never returns */
REACHABLE
jmp .Lpanic
SYM_FUNC_END(__tdx_hypercall)

0 comments on commit 5af14c2

Please sign in to comment.