x86/cpuid: Calculate appropriate max_leaf values for the global policies
authorAndrew Cooper <andrew.cooper3@citrix.com>
Wed, 11 Jan 2017 11:59:02 +0000 (11:59 +0000)
committerAndrew Cooper <andrew.cooper3@citrix.com>
Wed, 11 Jan 2017 11:59:02 +0000 (11:59 +0000)
commit9e9e2101cfea47b0392e2034038cbd2284528ab4
tree4c37392d5ca89d71e32ee6b8d56821689d58a5cd
parentc38869e711712866e7671c314f09527c732b2ead
x86/cpuid: Calculate appropriate max_leaf values for the global policies

Derive host_policy from raw_policy, and {pv,hvm}_max_policy from host_policy.
Clamp the raw values to the maximum we will offer to guests.

This simplifies the PV and HVM policy calculations, removing the need for an
intermediate linear host_featureset bitmap.

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