summaryrefslogtreecommitdiffstats
path: root/arch/x86/kvm/x86.c
diff options
context:
space:
mode:
authorWanpeng Li <wanpengli@tencent.com>2022-04-26 01:25:51 -0700
committerPaolo Bonzini <pbonzini@redhat.com>2022-05-25 05:07:09 -0400
commite0ac535178ad32c2a4898e2309dcc49ad546e96e (patch)
tree6099689e24e37fab4612ef2e949b26424ca71ffa /arch/x86/kvm/x86.c
parent6ba1e04fa60787ced4c9049cf7bd6cd0f1b80764 (diff)
downloadlinux-e0ac535178ad32c2a4898e2309dcc49ad546e96e.tar.gz
linux-e0ac535178ad32c2a4898e2309dcc49ad546e96e.tar.bz2
linux-e0ac535178ad32c2a4898e2309dcc49ad546e96e.zip
KVM: LAPIC: Trace LAPIC timer expiration on every vmentry
In commit ec0671d5684a ("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 87fa7f3e98a1 ("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>
Diffstat (limited to 'arch/x86/kvm/x86.c')
-rw-r--r--arch/x86/kvm/x86.c8
1 files changed, 0 insertions, 8 deletions
diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c
index 476ea099ebf0..8b62c9b7795e 100644
--- a/arch/x86/kvm/x86.c
+++ b/arch/x86/kvm/x86.c
@@ -10310,14 +10310,6 @@ static int vcpu_enter_guest(struct kvm_vcpu *vcpu)
*/
guest_timing_exit_irqoff();
- if (lapic_in_kernel(vcpu)) {
- s64 delta = vcpu->arch.apic->lapic_timer.advance_expire_delta;
- if (delta != S64_MIN) {
- trace_kvm_wait_lapic_expire(vcpu->vcpu_id, delta);
- vcpu->arch.apic->lapic_timer.advance_expire_delta = S64_MIN;
- }
- }
-
local_irq_enable();
preempt_enable();