KVM: VMX: Use wrmsr for switching between guest and host IA32_XSS on Intel
authorAaron Lewis <aaronlewis@google.com>
Mon, 21 Oct 2019 23:30:24 +0000 (16:30 -0700)
committerPaolo Bonzini <pbonzini@redhat.com>
Tue, 22 Oct 2019 13:46:34 +0000 (15:46 +0200)
commit9753d68865c5662eee94eb8808b5ad5eb766f5ea
treeb6f91ac011ed64a9467f541a085527d3dc61a1f6
parent312a1c87798e6b43ff533393167b3cba33645ead
KVM: VMX: Use wrmsr for switching between guest and host IA32_XSS on Intel

When the guest can execute the XSAVES/XRSTORS instructions, use wrmsr to
set the hardware IA32_XSS MSR to guest/host values on VM-entry/VM-exit,
rather than the MSR-load areas. By using the same approach as AMD, we
will be able to use a common implementation for both (in the next
patch).

Reviewed-by: Jim Mattson <jmattson@google.com>
Signed-off-by: Aaron Lewis <aaronlewis@google.com>
Change-Id: I9447d104b2615c04e39e4af0c911e1e7309bf464
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
arch/x86/kvm/vmx/vmx.c