viridian: move IPI hypercall implementation into separate function
authorPaul Durrant <pdurrant@amazon.com>
Fri, 4 Dec 2020 12:13:41 +0000 (13:13 +0100)
committerJan Beulich <jbeulich@suse.com>
Fri, 4 Dec 2020 12:13:41 +0000 (13:13 +0100)
commit905d931bcafa7be77dfe21ee5a839286bb52cfaa
tree783a7fefc90d8a9571d9372ab75191509ea1a820
parentc8117063f31370d4029cfb6abf15851e5394d12f
viridian: move IPI hypercall implementation into separate function

This patch moves the implementation of HVCALL_SEND_IPI that is currently
inline in viridian_hypercall() into a new hvcall_ipi() function.

The new function returns Xen errno values similarly to hvcall_flush(). Hence
the errno translation code in viridial_hypercall() is generalized, removing
the need for the local 'status' variable.

NOTE: The formatting of the switch statement at the top of
      viridial_hypercall() is also adjusted as per CODING_STYLE.

Signed-off-by: Paul Durrant <pdurrant@amazon.com>
Acked-by: Wei Liu <wl@xen.org>
xen/arch/x86/hvm/viridian/viridian.c