x86/hypercall: fix gnttab hypercall args conditional build on pvshim
authorRoger Pau Monné <roger.pau@citrix.com>
Fri, 8 Jan 2021 15:51:52 +0000 (16:51 +0100)
committerJan Beulich <jbeulich@suse.com>
Fri, 8 Jan 2021 15:51:52 +0000 (16:51 +0100)
commitb468b464c89e92629bd52cec58e9f51eee2e950a
treebe0893fc3ddeee8fcc30499fe03bd48d40cce0e3
parent5b772457e8e549908d6a3fae6412e55c0f7258fb
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>
xen/arch/x86/hypercall.c