KVM: nVMX: Preserve last USE_MSR_BITMAPS when preparing vmcs02
authorSean Christopherson <sean.j.christopherson@intel.com>
Tue, 7 May 2019 19:18:01 +0000 (12:18 -0700)
committerPaolo Bonzini <pbonzini@redhat.com>
Tue, 18 Jun 2019 09:47:45 +0000 (11:47 +0200)
commitde0286b7884a6a3309e299dda876810faa281547
tree70eae85fc3d7d53416ca9b9aa62c899de8c68d79
parent3af80fec6e7fe2e89aa131a0ebdb90be780668f8
KVM: nVMX: Preserve last USE_MSR_BITMAPS when preparing vmcs02

KVM dynamically toggles the CPU_BASED_USE_MSR_BITMAPS execution control
for nested guests based on whether or not both L0 and L1 want to pass
through the same MSRs to L2.  Preserve the last used value from vmcs02
so as to avoid multiple VMWRITEs to (re)set/(re)clear the bit on nested
VM-Entry.

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