This is a tangle, but it's a small step in the right direction.
In the following change, xstate_init() is going to start using the Raw policy.
calculate_raw_cpu_policy() is sufficiently separate from the other policies to
safely move like this.
No functional change.
Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Reviewed-by: Jan Beulich <jbeulich@suse.com>
Release-Acked-by: Oleksii Kurochko <oleksii.kurochko@gmail.com>
void __init init_guest_cpu_policies(void)
{
- calculate_raw_cpu_policy();
calculate_host_policy();
if ( IS_ENABLED(CONFIG_PV) )
tsx_init(); /* Needs microcode. May change HLE/RTM feature bits. */
- identify_cpu(&boot_cpu_data);
+ calculate_raw_cpu_policy(); /* Needs microcode. No other dependenices. */
+
+ identify_cpu(&boot_cpu_data); /* Needs microcode and raw policy. */
set_in_cr4(X86_CR4_OSFXSR | X86_CR4_OSXMMEXCPT);