x86/vmx: Drop vmx_msr_state infrastructure
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)
commit38b48605f3693e950bb4155ea8dac6614d796c2b
tree858b211f9b27b65e2583dbb9d4d38f736707aee8
parent394e66b0d04f0281b9c6231dad1377c4b9fea7d0
x86/vmx: Drop vmx_msr_state infrastructure

To avoid leaking host MSR state into guests, guest LSTAR, STAR and
SYSCALL_MASK state is unconditionally loaded when switching into guest
context.

Attempting to dirty-track the state is pointless; host state is always
restoring upon exit from guest context, meaning that guest state is always
considered dirty.

Drop struct vmx_msr_state, enum VMX_INDEX_MSR_* and msr_index[].  The guests
MSR values are stored plainly in arch_vmx_struct, in the same way as shadow_gs
and cstar are.  vmx_restore_guest_msrs() and long_mode_do_msr_write() ensure
that the hardware MSR values are always up-to-date.

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/include/asm-x86/hvm/vmx/vmcs.h