x86/vmx: Remove vmx_save_host_msrs() and host_msr_state
authorAndrew Cooper <andrew.cooper3@citrix.com>
Sun, 18 Dec 2016 14:56:28 +0000 (14:56 +0000)
committerAndrew Cooper <andrew.cooper3@citrix.com>
Tue, 21 Feb 2017 11:06:39 +0000 (11:06 +0000)
commit394e66b0d04f0281b9c6231dad1377c4b9fea7d0
treebea39a86fb9345848cb14f9a53573e91ed7bf092
parent36b35babdf381b8e2843d37e29da2ddc01ec3282
x86/vmx: Remove vmx_save_host_msrs() and host_msr_state

A pcpu's LSTAR, STAR and SYSCALL_MASK MSRs are unconditionally switched when
moving in and out of HVM vcpu context.  Two of these values are compile time
constants, and the third is directly available in an existing per-cpu
variable.

There is no need to save host state in vmx_cpu_up() into a different per-cpu
structure, so drop all the infrastructure.  vmx_restore_host_msrs() is
simplified to 3 plain WRMSR instructions.

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Reviewed-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
xen/arch/x86/x86_64/traps.c
xen/include/asm-x86/hvm/vmx/vmcs.h