x86/HVM: convert remaining hvm_funcs hook invocations to alt-call
authorJan Beulich <jbeulich@suse.com>
Mon, 17 Jan 2022 08:45:04 +0000 (09:45 +0100)
committerJan Beulich <jbeulich@suse.com>
Mon, 17 Jan 2022 08:45:04 +0000 (09:45 +0100)
commit27a63cdac3880c918848430eb25181437d5795e9
treef2a2a62e51ec2d1969348e48276387e6f1c23fb2
parent299deb9dd93e5aae2f3b24ec001214458077a185
x86/HVM: convert remaining hvm_funcs hook invocations to alt-call

The aim being to have as few indirect calls as possible (see [1]),
whereas during initial conversion performance was the main aspect and
hence rarely used hooks didn't get converted. Apparently one use of
get_interrupt_shadow() was missed at the time.

While doing this, drop NULL checks ahead of CPU management and .nhvm_*()
calls when the hook is always present. Also convert the
.nhvm_vcpu_reset() call to alternative_vcall(), as the return value is
unused and the caller has currently no way of propagating it.

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
Reviewed-by: Tamas K Lengyel <tamas@tklengyel.com>
[1] https://lists.xen.org/archives/html/xen-devel/2021-11/msg01822.html
xen/arch/x86/hvm/emulate.c
xen/arch/x86/hvm/hvm.c
xen/arch/x86/hvm/nestedhvm.c
xen/arch/x86/include/asm/hvm/hvm.h
xen/arch/x86/monitor.c
xen/arch/x86/vm_event.c