]> git.baikalelectronics.ru Git - kernel.git/commit
KVM: VMX: Retrieve APIC access page HPA only when necessary
authorSean Christopherson <sean.j.christopherson@intel.com>
Fri, 20 Mar 2020 21:28:24 +0000 (14:28 -0700)
committerPaolo Bonzini <pbonzini@redhat.com>
Tue, 21 Apr 2020 13:12:55 +0000 (09:12 -0400)
commit1f3ba23befd5ea71e89de84edffb0da1bbde6c3a
tree8cce6a166a8e85ecf0a0e46416f11a22abac54e2
parent6e5462fa4026a8225c248a893c1d3f6750388728
KVM: VMX: Retrieve APIC access page HPA only when necessary

Move the retrieval of the HPA associated with L1's APIC access page into
VMX code to avoid unnecessarily calling gfn_to_page(), e.g. when the
vCPU is in guest mode (L2).  Alternatively, the optimization logic in
VMX could be mirrored into the common x86 code, but that will get ugly
fast when further optimizations are introduced.

Signed-off-by: Sean Christopherson <sean.j.christopherson@intel.com>
Message-Id: <20200320212833.3507-29-sean.j.christopherson@intel.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
arch/x86/include/asm/kvm_host.h
arch/x86/kvm/vmx/vmx.c
arch/x86/kvm/x86.c