x86/hvm: Improve grant_table_op hypercall dispatching
authorAndrew Cooper <andrew.cooper3@citrix.com>
Mon, 13 Feb 2017 11:49:29 +0000 (11:49 +0000)
committerAndrew Cooper <andrew.cooper3@citrix.com>
Tue, 14 Feb 2017 14:34:26 +0000 (14:34 +0000)
commita130a4128968b00d025b5d691b9a919498092d77
tree7a9eb809d3d1d635d9822785362c9f5c77094704
parent7797a2af946115496c9306f8fc142477352fdf81
x86/hvm: Improve grant_table_op hypercall dispatching

hvm_grant_table_op() and hvm_grant_table_op_compat32() are almost identical,
but there is no need to have two functions instantiated at the end of
different function pointers.

Combine the two into a single hvm_grant_table_op() (folding
grant_table_op_is_allowed() into is now-single caller) and dispatch to
{do,compat}_grant_table_op() based on the hcall_64bit setting.

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Reviewed-by: Wei Liu <wei.liu2@citrix.com>
Reviewed-by: Jan Beulich <jbeulich@suse.com>
xen/arch/x86/hvm/hypercall.c