x86/hvm: Improve physdev_op hypercall dispatching
authorAndrew Cooper <andrew.cooper3@citrix.com>
Mon, 13 Feb 2017 11:49:30 +0000 (11:49 +0000)
committerAndrew Cooper <andrew.cooper3@citrix.com>
Tue, 14 Feb 2017 14:34:27 +0000 (14:34 +0000)
commit909c219944e944f086ec0a89938a7397e2aa4cb0
tree03a5dafd47c3d804e04d06a43de32e9c83a947c8
parenta130a4128968b00d025b5d691b9a919498092d77
x86/hvm: Improve physdev_op hypercall dispatching

hvm_physdev_op() and hvm_physdev_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_physdev_op() and dispatch to
{do,compat}_physdev_op() based on the hcall_64bit setting.

This also fixes an inconsistency where 64bit PVH hardware domains were
permitted access to extra physdev ops, but 32bit domains weren't.

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