x86/paravirt: Use common macro for creating simple asm paravirt functions
authorJuergen Gross <jgross@suse.com>
Wed, 9 Nov 2022 13:44:18 +0000 (14:44 +0100)
committerPeter Zijlstra <peterz@infradead.org>
Thu, 24 Nov 2022 12:56:44 +0000 (13:56 +0100)
commitf1a033cc6b9eb6d80322008422df3c87aa5d47a0
tree1aba4827c74f4032696e26aa5232761b76d0ae35
parent5736b1b70170e15d66ec02e500db917ef42ade83
x86/paravirt: Use common macro for creating simple asm paravirt functions

There are some paravirt assembler functions which are sharing a common
pattern. Introduce a macro DEFINE_PARAVIRT_ASM() for creating them.

Note that this macro is including explicit alignment of the generated
functions, leading to __raw_callee_save___kvm_vcpu_is_preempted(),
_paravirt_nop() and paravirt_ret0() to be aligned at 4 byte boundaries
now.

The explicit _paravirt_nop() prototype in paravirt.c isn't needed, as
it is included in paravirt_types.h already.

Signed-off-by: Juergen Gross <jgross@suse.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Reviewed-by: Srivatsa S. Bhat (VMware) <srivatsa@csail.mit.edu>
Link: https://lkml.kernel.org/r/20221109134418.6516-1-jgross@suse.com
arch/x86/include/asm/paravirt.h
arch/x86/include/asm/qspinlock_paravirt.h
arch/x86/kernel/kvm.c
arch/x86/kernel/paravirt.c