]> asedeno.scripts.mit.edu Git - linux.git/commit
KVM: nVMX: Don't speculatively write virtual-APIC page address
authorSean Christopherson <sean.j.christopherson@intel.com>
Tue, 7 May 2019 16:06:33 +0000 (09:06 -0700)
committerPaolo Bonzini <pbonzini@redhat.com>
Tue, 18 Jun 2019 09:47:35 +0000 (11:47 +0200)
commitca2f5466f854184f1753ecb526f0e21a353a25e7
tree01dbe85c2b1cb63f5f40392916f42823401482ad
parent73cb85568433feadb79e963bf2efba9b3e9ae3df
KVM: nVMX: Don't speculatively write virtual-APIC page address

The VIRTUAL_APIC_PAGE_ADDR in vmcs02 is guaranteed to be updated before
it is consumed by hardware, either in nested_vmx_enter_non_root_mode()
or via the KVM_REQ_GET_VMCS12_PAGES callback.  Avoid an extra VMWRITE
and only stuff a bad value into vmcs02 when mapping vmcs12's address
fails.  This also eliminates the need for extra comments to connect the
dots between prepare_vmcs02_early() and nested_get_vmcs12_pages().

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