]> Git Repo - J-linux.git/commitdiff
KVM: LAPIC: Advancing the timer expiration on guest initiated write
authorWanpeng Li <[email protected]>
Thu, 4 Mar 2021 00:35:18 +0000 (08:35 +0800)
committerPaolo Bonzini <[email protected]>
Fri, 12 Mar 2021 18:18:52 +0000 (13:18 -0500)
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: <1614818118[email protected]>
Signed-off-by: Paolo Bonzini <[email protected]>
arch/x86/kvm/lapic.c

index cb8ebfaccfb6e8c4c4801af671f77aedf46124df..cc369b9ad8f11ccd5a725f0826dcab4f9ab507e7 100644 (file)
@@ -2604,6 +2604,7 @@ int kvm_apic_set_state(struct kvm_vcpu *vcpu, struct kvm_lapic_state *s)
 
        apic_update_ppr(apic);
        hrtimer_cancel(&apic->lapic_timer.timer);
+       apic->lapic_timer.expired_tscdeadline = 0;
        apic_update_lvtt(apic);
        apic_manage_nmi_watchdog(apic, kvm_lapic_get_reg(apic, APIC_LVT0));
        update_divide_count(apic);
This page took 0.055413 seconds and 4 git commands to generate.