x86/sysctl: Clean up XEN_SYSCTL_cpu_hotplug
authorAndrew Cooper <andrew.cooper3@citrix.com>
Fri, 29 Mar 2019 12:14:37 +0000 (12:14 +0000)
committerAndrew Cooper <andrew.cooper3@citrix.com>
Thu, 4 Apr 2019 13:32:41 +0000 (14:32 +0100)
commitdbe55b5d6a03c72c80d9f6df502927c7dc8db03f
tree44244071f9637dd4dbbd6531f710c859d55051aa
parentab0e50c03f01c51c091f232d1a096a90085c2a24
x86/sysctl: Clean up XEN_SYSCTL_cpu_hotplug

A future change is going to introduce two more cases.  Instead of opcoding the
XSM checks and contine_hypercall logic, collect the data into local variables.

Switch the default return value to -EOPNOTSUPP to distinguish a bad op from a
bad cpu index.

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Reviewed-by: Jan Beulich <jbeulich@suse.com>
xen/arch/x86/sysctl.c