Skip to content

Commit 6645d85

Browse files
broonieMarc Zyngier
authored andcommitted
arm64: KVM: Annotate guest entry/exit as a single function
In an effort to clarify and simplify the annotations of assembly functions in the kernel new macros have been introduced replacing ENTRY and ENDPROC. There are separate annotations SYM_FUNC_ for normal C functions and SYM_CODE_ for other code. Currently __guest_enter and __guest_exit are annotated as standard functions but this is not entirely correct as the former doesn't do a normal return and the latter is not entered in a normal fashion. From the point of view of the hypervisor the guest entry/exit may be viewed as a single function which happens to have an eret in the middle of it so let's annotate it as such. Suggested-by: Mark Rutland <[email protected]> Signed-off-by: Mark Brown <[email protected]> Signed-off-by: Marc Zyngier <[email protected]> Acked-by: Will Deacon <[email protected]> Link: https://lore.kernel.org/r/[email protected]
1 parent 290a6bb commit 6645d85

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

arch/arm64/kvm/hyp/entry.S

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@
4444
* u64 __guest_enter(struct kvm_vcpu *vcpu,
4545
* struct kvm_cpu_context *host_ctxt);
4646
*/
47-
ENTRY(__guest_enter)
47+
SYM_FUNC_START(__guest_enter)
4848
// x0: vcpu
4949
// x1: host context
5050
// x2-x17: clobbered by macros
@@ -96,9 +96,8 @@ alternative_else_nop_endif
9696
// Do not touch any register after this!
9797
eret
9898
sb
99-
ENDPROC(__guest_enter)
10099

101-
ENTRY(__guest_exit)
100+
SYM_INNER_LABEL(__guest_exit, SYM_L_GLOBAL)
102101
// x0: return code
103102
// x1: vcpu
104103
// x2-x29,lr: vcpu regs
@@ -192,4 +191,4 @@ abort_guest_exit_end:
192191
msr spsr_el2, x4
193192
orr x0, x0, x5
194193
1: ret
195-
ENDPROC(__guest_exit)
194+
SYM_FUNC_END(__guest_enter)

0 commit comments

Comments
 (0)