]> git.baikalelectronics.ru Git - kernel.git/commit
KVM: LAPIC: Trace LAPIC timer expiration on every vmentry
authorWanpeng Li <wanpengli@tencent.com>
Tue, 26 Apr 2022 08:25:51 +0000 (01:25 -0700)
committerPaolo Bonzini <pbonzini@redhat.com>
Wed, 25 May 2022 09:07:09 +0000 (05:07 -0400)
commitdc0f3dbcd71ccb70563fbf37bcf0946ae0e53a59
tree6099689e24e37fab4612ef2e949b26424ca71ffa
parent60349e356e472cd4e7fae36254f8cf4c7debdab3
KVM: LAPIC: Trace LAPIC timer expiration on every vmentry

In commit e70379ec3311 ("KVM: LAPIC: Delay trace_kvm_wait_lapic_expire
tracepoint to after vmexit", 2019-06-04), trace_kvm_wait_lapic_expire
was moved after guest_exit_irqoff() because invoking tracepoints within
kvm_guest_enter/kvm_guest_exit caused a lockdep splat.

These days this is not necessary, because commit 6d1228391499 ("x86/kvm:
Move context tracking where it belongs", 2020-07-09) restricted
the RCU extended quiescent state to be closer to vmentry/vmexit.
Moving the tracepoint back to __kvm_wait_lapic_expire is more accurate,
because it will be reported even if vcpu_enter_guest causes multiple
vmentries via the IPI/Timer fast paths, and it allows the removal of
advance_expire_delta.

Signed-off-by: Wanpeng Li <wanpengli@tencent.com>
Message-Id: <1650961551-38390-1-git-send-email-wanpengli@tencent.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
arch/x86/kvm/lapic.c
arch/x86/kvm/lapic.h
arch/x86/kvm/x86.c