]> xenbits.xensource.com Git - xen.git/commit
xen: harmonize return types of hypercall handlers
authorJuergen Gross <jgross@suse.com>
Mon, 11 Jul 2022 09:58:21 +0000 (11:58 +0200)
committerJan Beulich <jbeulich@suse.com>
Mon, 11 Jul 2022 09:58:21 +0000 (11:58 +0200)
commit7e21b25059ed7e8f70dcc4626403fc9986c98932
tree88a3a137f6d8183c02f1c6d48e5250eadc590d3d
parent980bfb1ac9247e95790e283dbc03e231e02cced9
xen: harmonize return types of hypercall handlers

Today most hypercall handlers have a return type of long, while the
compat ones return an int. There are a few exceptions from that rule,
however.

Get rid of the exceptions by letting compat handlers always return int
and others always return long, with the exception of the Arm specific
physdev_op handler.

For the compat hvm case use eax instead of rax for the stored result as
it should have been from the beginning.

Additionally move some prototypes to include/asm-x86/hypercall.h
as they are x86 specific. Move the compat_platform_op() prototype to
the common header.

Rename paging_domctl_continuation() to do_paging_domctl_cont() and add
a matching define for the associated hypercall.

Make do_callback_op() and compat_callback_op() more similar by adding
the const attribute to compat_callback_op()'s 2nd parameter.

Change the type of the cmd parameter for [do|compat]_kexec_op() to
unsigned int, as this is more appropriate for the compat case.

Signed-off-by: Juergen Gross <jgross@suse.com>
Reviewed-by: Jan Beulich <jbeulich@suse.com>
Reviewed-by: Christopher Clark <christopher.w.clark@gmail.com> # argo
13 files changed:
xen/arch/x86/domctl.c
xen/arch/x86/hvm/hypercall.c
xen/arch/x86/hypercall.c
xen/arch/x86/include/asm/hypercall.h
xen/arch/x86/include/asm/paging.h
xen/arch/x86/mm/paging.c
xen/arch/x86/pv/callback.c
xen/arch/x86/pv/hypercall.c
xen/arch/x86/pv/iret.c
xen/arch/x86/pv/misc-hypercalls.c
xen/common/argo.c
xen/common/kexec.c
xen/include/xen/hypercall.h