Skip to content

Commit 35737d2

Browse files
Wanpeng Libonzini
authored andcommitted
KVM: LAPIC: Advancing the timer expiration on guest initiated write
Advancing the timer expiration should only be necessary on guest initiated writes. When we cancel the timer and clear .pending during state restore, clear expired_tscdeadline as well. Reviewed-by: Sean Christopherson <seanjc@google.com> Signed-off-by: Wanpeng Li <wanpengli@tencent.com> Message-Id: <1614818118-965-1-git-send-email-wanpengli@tencent.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
1 parent 8df9f1a commit 35737d2

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

arch/x86/kvm/lapic.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2604,6 +2604,7 @@ int kvm_apic_set_state(struct kvm_vcpu *vcpu, struct kvm_lapic_state *s)
26042604

26052605
apic_update_ppr(apic);
26062606
hrtimer_cancel(&apic->lapic_timer.timer);
2607+
apic->lapic_timer.expired_tscdeadline = 0;
26072608
apic_update_lvtt(apic);
26082609
apic_manage_nmi_watchdog(apic, kvm_lapic_get_reg(apic, APIC_LVT0));
26092610
update_divide_count(apic);

0 commit comments

Comments
 (0)