x86/pv-shim: Don't modify the hypercall table
authorJuergen Gross <jgross@suse.com>
Mon, 1 Nov 2021 15:20:09 +0000 (16:20 +0100)
committerAndrew Cooper <andrew.cooper3@citrix.com>
Wed, 23 Feb 2022 15:33:42 +0000 (15:33 +0000)
commite7db635f4428cabbb72ba33a6ec6e1465f2169cb
tree73789fbef38d2fa39c1beb80a8f3d8906144e9b7
parent44d6b0758469cafff12be16d75b51f6d9217d22c
x86/pv-shim: Don't modify the hypercall table

When running as pv-shim the hypercall is modified today in order to
replace the functions for __HYPERVISOR_event_channel_op and
__HYPERVISOR_grant_table_op hypercalls.

Change this to call the related functions from the normal handlers
instead when running as shim. The performance implications are not
really relevant, as a normal production hypervisor will not be
configured to support shim mode, so the related calls will be dropped
due to optimisation of the compiler.

Note that for the CONFIG_PV_SHIM_EXCLUSIVE case there is a dummy
wrapper do_grant_table_op() needed, as in this case grant_table.c
isn't being built.

Signed-off-by: Juergen Gross <jgross@suse.com>
Split out of series.  To compile in isolation, the compat_platform_op()
prototype needs correcting, and header files need rearranging to avoid the
compat_platform_op_t/multicall_entry_compat_t guest handles being declared
multiple times.

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Reviewed-by: Jan Beulich <jbeulich@suse.com>
xen/arch/x86/include/asm/hypercall.h
xen/arch/x86/include/asm/pv/shim.h
xen/arch/x86/pv/hypercall.c
xen/arch/x86/pv/shim.c
xen/arch/x86/x86_64/platform_hypercall.c
xen/common/compat/multicall.c
xen/common/event_channel.c
xen/common/grant_table.c