x86/hypercall: fix gnttab hypercall args conditional build on pvshim
authorRoger Pau Monné <roger.pau@citrix.com>
Thu, 21 Jan 2021 15:19:09 +0000 (16:19 +0100)
committerJan Beulich <jbeulich@suse.com>
Thu, 21 Jan 2021 15:19:09 +0000 (16:19 +0100)
commite44321d94f984890d8dd7488a0fbab9933fb29fc
treebf3ba51e5ac937a921439e231666b58bcee5ca04
parenta3509dcd0fbb86cfe2e4b32996eed3afc363d7da
x86/hypercall: fix gnttab hypercall args conditional build on pvshim

A pvshim build doesn't require the grant table functionality built in,
but it does require knowing the number of arguments the hypercall has
so the hypercall parameter clobbering works properly.

Instead of also setting the argument count for the gnttab case if PV
shim functionality is enabled, just drop all of the conditionals from
hypercall_args_table, as a hypercall having a NULL handler won't get
to use that information anyway.

Note this hasn't been detected by osstest because the tools pvshim
build is done without debug enabled, so the hypercall parameter
clobbering doesn't happen.

Fixes: d2151152dd2 ('xen: make grant table support configurable')
Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
Reviewed-by: Jan Beulich <jbeulich@suse.com>
master commit: b468b464c89e92629bd52cec58e9f51eee2e950a
master date: 2021-01-08 16:51:52 +0100
xen/arch/x86/hypercall.c