KVM: LAPIC: Advancing the timer expiration on guest initiated write
PATCH v2 1/1 KVM: LAPIC: Advancing the timer expiration on guest initiated write
From: Wanpeng Li <[email protected]>
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.
---
v1 -> v2:
* update patch description
arch/x86/kvm/lapic.c | 1 + 1 file changed, 1 insertion(+)
arch/x86/kvm/lapic.c +1 -0
@@ -2595,6 +2595,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);
Signature · 1 line
2.7.4
ping, :)
Quoted 31 lines · Wanpeng Li
From: Wanpeng Li <[email protected]>
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_tscdeadlineas well.Reviewed-by Sean Christopherson <[email protected]>Signed-off-by Wanpeng Li <[email protected]>---
v1 -> v2:
* update patch descriptionarch/x86/kvm/lapic.c | 1 + 1 file changed, 1 insertion(+)arch/x86/kvm/lapic.c +1
-1@@ -2595,6 +2595,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); --2.7.4
Quoted 21 lines · Wanpeng Li
From: Wanpeng Li <[email protected]>
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_tscdeadlineas well.Reviewed-by Sean Christopherson <[email protected]>Signed-off-by Wanpeng Li <[email protected]>---
v1 -> v2:
* update patch descriptionarch/x86/kvm/lapic.c | 1 + 1 file changed, 1 insertion(+)arch/x86/kvm/lapic.c +0
-0
arch/x86/kvm/lapic.c int kvm_apic_set_state(struct kvm_vcpu *vcpu, struct kvm_lapic_state *s) · line 2601
Quoted 7 lines
arch/x86/kvm/lapic.c +1
-0@@ -2595,6 +2595,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);
Queued, thanks.
Paolo