]> xenbits.xensource.com Git - people/dariof/xen.git/commit
x86/sysctl: Don't return cpu policy data for compiled-out support
authorAndrew Cooper <andrew.cooper3@citrix.com>
Tue, 25 Feb 2020 16:57:03 +0000 (16:57 +0000)
committerAndrew Cooper <andrew.cooper3@citrix.com>
Wed, 26 Feb 2020 12:13:10 +0000 (12:13 +0000)
commit96dc77b4b1828f59791cf2225acbc92405ad7875
tree463831042e1304805586b5e349cd2ec9c1695692
parent6094a3c4fee1976110c93341b9ef3f09d37606ab
x86/sysctl: Don't return cpu policy data for compiled-out support

Policy objects aren't tiny, and the derivation logic isn't trivial.  We are
about to increase the number of policy objects, so will have the opportunity
to drop logic and storage space based on CONFIG_{PV,HVM}.

Start by causing XEN_SYSCTL_get_cpu_policy to fail with -EOPNOTSUPP when
requesting data for a compiled-out subsystem.  Update xen-cpuid to cope and
continue to further system policies, seeing as the indicies are interleaved.

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