x86: init_hypercall_page() cleanup
authorAndrew Cooper <andrew.cooper3@citrix.com>
Thu, 28 Mar 2019 14:23:13 +0000 (14:23 +0000)
committerAndrew Cooper <andrew.cooper3@citrix.com>
Wed, 29 May 2019 13:39:28 +0000 (14:39 +0100)
commite99203f4d2a15ddb1b34a867ca301f7efd0e97f9
tree34d8b3884b76935a2fc6581cdecfd095c3a955f5
parentdf4e4cafd28d63be64db06493e310ac0217d2c5b
x86: init_hypercall_page() cleanup

The various pieces of the hypercall page infrastructure have grown
organically over time and ended up in a bit of a mess.

 * Rename all functions to be of the form *_init_hypercall_page().  This
   makes them somewhat shorter, and means they can actually be grepped
   for in one go.
 * Move init_hypercall_page() to domain.c.  The 64-bit traps.c isn't a
   terribly appropriate place for it to live.
 * Drop an obsolete comment from hvm_init_hypercall_page() and drop the
   domain parameter from hvm_funcs.init_hypercall_page() as it isn't
   necessary.
 * Rearrange the logic in the each function to avoid needing extra local
   variables, and to write the page in one single pass.

No functional change.

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Reviewed-by: Wei Liu <wei.liu2@citrix.com>
Acked-by: Jan Beulich <jbeulich@suse.com>
Reviewed-by: Kevin Tian <kevin.tian@intel.com>
12 files changed:
xen/arch/x86/domain.c
xen/arch/x86/domctl.c
xen/arch/x86/hvm/hvm.c
xen/arch/x86/hvm/svm/svm.c
xen/arch/x86/hvm/vmx/vmx.c
xen/arch/x86/pv/dom0_build.c
xen/arch/x86/pv/hypercall.c
xen/arch/x86/traps.c
xen/arch/x86/x86_64/traps.c
xen/include/asm-x86/domain.h
xen/include/asm-x86/hvm/hvm.h
xen/include/asm-x86/hypercall.h