x86/cpuid: Compile out unused logic/objects
authorAndrew Cooper <andrew.cooper3@citrix.com>
Tue, 25 Feb 2020 17:36:12 +0000 (17:36 +0000)
committerAndrew Cooper <andrew.cooper3@citrix.com>
Thu, 27 Feb 2020 18:54:58 +0000 (18:54 +0000)
commit885d2d20425df9c35926c0462d53ab97074aa97d
tree68d0b90e415ccea1a693eba00b3531dd14e14afe
parent1df81d8caf1edab42b7e0e8d5fbf2e232b31b051
x86/cpuid: Compile out unused logic/objects

CPUID Policy objects are large (1860 bytes at the time of writing), so
compiling them out based on CONFIG_{PV,HVM} makes a lot of sense.

This involves a bit of complexity in init_domain_cpuid_policy() and
recalculate_cpuid_policy() as is_pv_domain() can't be evaulated at compile
time.

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