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 <[email protected]> Signed-off-by: Wanpeng Li <[email protected]> Message-Id: <[email protected]> Signed-off-by: Paolo Bonzini <[email protected]>
1 parent 8df9f1a commit 35737d2

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

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)