x86/vmx: Don't leak host syscall MSR state into HVM guests
authorAndrew Cooper <andrew.cooper3@citrix.com>
Sun, 18 Dec 2016 14:20:49 +0000 (14:20 +0000)
committerAndrew Cooper <andrew.cooper3@citrix.com>
Tue, 21 Feb 2017 11:06:39 +0000 (11:06 +0000)
commit2f1add6e1c8789d979daaafa3d80ddc1bc375783
tree3fb5d309560d0cf355b868907bb3a9b3404c1cb3
parent5dbd60e16a1f29b9f1f84088c5cab1be2dac7a7a
x86/vmx: Don't leak host syscall MSR state into HVM guests

hvm_hw_cpu->msr_flags is in fact the VMX dirty bitmap of MSRs needing to be
restored when switching into guest context.  It should never have been part of
the migration state to start with, and Xen must not make any decisions based
on the value seen during restore.

Identify it as obsolete in the header files, consistently save it as zero and
ignore it on restore.

The MSRs must be considered dirty during VMCS creation to cause the proper
defaults of 0 to be visible to the guest.

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Reviewed-by: Jan Beulich <jbeulich@suse.com>
Reviewed-by: Kevin Tian <kevin.tian@intel.com>
xen/arch/x86/hvm/svm/svm.c
xen/arch/x86/hvm/vmx/vmcs.c
xen/arch/x86/hvm/vmx/vmx.c
xen/include/public/arch-x86/hvm/save.h