KVM: vmx: skip VMWRITE of HOST_{FS,GS}_BASE when possible
authorSean Christopherson <sean.j.christopherson@intel.com>
Mon, 23 Jul 2018 19:32:50 +0000 (12:32 -0700)
committerPaolo Bonzini <pbonzini@redhat.com>
Mon, 6 Aug 2018 15:59:17 +0000 (17:59 +0200)
commit5e079c7ece1060491ef4a45414823162cce91b3d
tree31374e01961924f1ff4d32535f4677812623b975
parent8f21a0bbf36f58334695ae6e46c0cf906a217154
KVM: vmx: skip VMWRITE of HOST_{FS,GS}_BASE when possible

The host's FS.base and GS.base rarely change, e.g. ~0.1% of host/guest
swaps on my system.  Cache the last value written to the VMCS and skip
the VMWRITE to the associated VMCS fields when loading host state if
the value hasn't changed since the last VMWRITE.

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