x86/VMX: don't risk corrupting host CR4
authorJan Beulich <jbeulich@suse.com>
Thu, 15 Mar 2018 11:45:30 +0000 (12:45 +0100)
committerJan Beulich <jbeulich@suse.com>
Thu, 15 Mar 2018 11:45:30 +0000 (12:45 +0100)
commitc0e34ba78aaec2e2b1aa2a810bc7b3ee1fdfcf3f
treee6b27502aa1508b543d3e04f1bdb4e9a16632f6f
parent59c0983e10d70ea2368085271b75fb007811fe52
x86/VMX: don't risk corrupting host CR4

Instead of "syncing" the live value to what mmu_cr4_features has, make
sure vCPU-s run with the value most recently loaded into %cr4, such that
after the next VM exit we continue to run with the intended value rather
than a possibly stale one.

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Acked-by: Kevin Tian <kevin.tian@intel.com>
xen/arch/x86/hvm/vmx/vmcs.c
xen/arch/x86/hvm/vmx/vmx.c