]> git.baikalelectronics.ru Git - kernel.git/commit
KVM: LAPIC: Narrow down the kick target vCPU
authorWanpeng Li <wanpengli@tencent.com>
Thu, 10 Sep 2020 09:50:40 +0000 (17:50 +0800)
committerPaolo Bonzini <pbonzini@redhat.com>
Mon, 28 Sep 2020 11:57:09 +0000 (07:57 -0400)
commitc1579ba61acec9d2fdb93d661fa86b39a6068cca
treeebc0821cfc5dd0438fc83e7c2803c1e487d8c0b8
parent136ee2fbc0df6e37d8c7e1ef401f86f65acea60e
KVM: LAPIC: Narrow down the kick target vCPU

The kick after setting KVM_REQ_PENDING_TIMER is used to handle the timer
fires on a different pCPU which vCPU is running on.  This kick costs about
1000 clock cycles and we don't need this when injecting already-expired
timer or when using the VMX preemption timer because
kvm_lapic_expired_hv_timer() is called from the target vCPU.

Reviewed-by: Sean Christopherson <sean.j.christopherson@intel.com>
Signed-off-by: Wanpeng Li <wanpengli@tencent.com>
Message-Id: <1599731444-3525-6-git-send-email-wanpengli@tencent.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
arch/x86/kvm/lapic.c
arch/x86/kvm/x86.c
arch/x86/kvm/x86.h