x86/cpuid: Introduce and use default CPUID policies
authorAndrew Cooper <andrew.cooper3@citrix.com>
Fri, 21 Feb 2020 15:23:31 +0000 (15:23 +0000)
committerAndrew Cooper <andrew.cooper3@citrix.com>
Thu, 27 Feb 2020 18:54:58 +0000 (18:54 +0000)
commit83b3873822a5f27c45bfdaa5a7d03f4c495e4234
tree984696c1cd57d1fc30dc5c195d02f70cfe994168
parent885d2d20425df9c35926c0462d53ab97074aa97d
x86/cpuid: Introduce and use default CPUID policies

For now, the default and max policies remain identical, but this will change
in the future.

Introduce calculate_{pv,hvm}_def_policy().  As *_def derives from *_max, quite
a bit of the derivation logic can be avoided the second time around - this
will cope with simple feature differences for now.

Update XEN_SYSCTL_get_cpu_* and init_domain_cpuid_policy() to use the default
policies as appropriate.

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