]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commit
KVM: nVMX: Don't reread VMCS-agnostic state when switching VMCS
authorSean Christopherson <sean.j.christopherson@intel.com>
Tue, 7 May 2019 16:06:32 +0000 (09:06 -0700)
committerPaolo Bonzini <pbonzini@redhat.com>
Tue, 18 Jun 2019 09:47:06 +0000 (11:47 +0200)
commit8ef863e67a89c72b5af893a1214f6c35a5f456f8
tree4a280f4804ad2433afa19eb55e227db1f2cb9872
parent13b964a29d66333c1957dbd51f2c9e138c546f7a
KVM: nVMX: Don't reread VMCS-agnostic state when switching VMCS

When switching between vmcs01 and vmcs02, there is no need to update
state tracking for values that aren't tied to any particular VMCS as
the per-vCPU values are already up-to-date (vmx_switch_vmcs() can only
be called when the vCPU is loaded).

Avoiding the update eliminates a RDMSR, and potentially a RDPKRU and
posted-interrupt update (cmpxchg64() and more).

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