x86: Introduce struct cpu_policy to refer to a group of individual policies
authorAndrew Cooper <andrew.cooper3@citrix.com>
Mon, 2 Jul 2018 16:05:33 +0000 (16:05 +0000)
committerAndrew Cooper <andrew.cooper3@citrix.com>
Tue, 6 Nov 2018 17:51:18 +0000 (17:51 +0000)
commit9b2d12455b1eb06acb9e28049fc0786f10420482
tree69f9d9536f536ba437a68cff7cfcaaa5966d84f4
parent4874a4db383645ce9f90f56212d679ee0522e5c1
x86: Introduce struct cpu_policy to refer to a group of individual policies

This is prep work for the following patch - please refer to it as well.

When auditing and manipulating policies, it is necessary to do so with a
complete set of policies, due to the interdependences of the contents.  A
containing structure like this will allow for clearer APIs and code.

As a first user, this structure is convenient for the mapping used by
XEN_SYSCTL_get_cpu_policy (implemented in the next patch), and for auditing
(later when XEN_DOMCTL_set_cpu_policy is implemented).

At this point, the distinction between *_max and *_default is introduced into
the ABI.  For now, *_default is mapped to *_max, but future development work
will result in *_default being a logical subset of *_max.

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Reviewed-by: Roger Pau Monné <roger.pau@citrix.com>
Reviewed-by: Wei Liu <wei.liu2@citrix.com>
Acked-by: Jan Beulich <jbeulich@suse.com>
xen/arch/x86/sysctl.c
xen/include/asm-x86/cpuid.h
xen/include/public/sysctl.h
xen/include/xen/lib/x86/cpu-policy.h [new file with mode: 0644]