KVM: VMX: Check guest support for RDTSCP before processing MSR_TSC_AUX
authorSean Christopherson <sean.j.christopherson@intel.com>
Wed, 23 Sep 2020 18:04:03 +0000 (11:04 -0700)
committerPaolo Bonzini <pbonzini@redhat.com>
Mon, 28 Sep 2020 11:57:59 +0000 (07:57 -0400)
commitef1d2ee12e6cd5abbf9986f35238f2fb2cd21a6d
tree58e0428b362e0ed624061a0b660c535389ca0e17
parent1e7a483037e8fa884c688f2213c8af10f2e8e96a
KVM: VMX: Check guest support for RDTSCP before processing MSR_TSC_AUX

Check for RDTSCP support prior to checking if MSR_TSC_AUX is in the uret
MSRs array so that the array lookup and manipulation are back-to-back.
This paves the way toward adding a helper to wrap the lookup and
manipulation.

No functional change intended.

Signed-off-by: Sean Christopherson <sean.j.christopherson@intel.com>
Message-Id: <20200923180409.32255-10-sean.j.christopherson@intel.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
arch/x86/kvm/vmx/vmx.c