lkml.org 
[lkml]   [2021]   [Mar]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH] KVM: LAPIC: Advancing the timer expiration on guest initiated write
    Date
    From: Wanpeng Li <wanpengli@tencent.com>

    Advancing the timer expiration should only be necessary on guest initiated
    writes. Now, we cancel the timer, clear .pending and clear expired_tscdeadline
    at the same time during state restore.

    Signed-off-by: Wanpeng Li <wanpengli@tencent.com>
    ---
    arch/x86/kvm/lapic.c | 1 +
    1 file changed, 1 insertion(+)

    diff --git a/arch/x86/kvm/lapic.c b/arch/x86/kvm/lapic.c
    index 45d40bf..f2b6e79 100644
    --- a/arch/x86/kvm/lapic.c
    +++ b/arch/x86/kvm/lapic.c
    @@ -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
    \
     
     \ /
      Last update: 2021-03-02 16:40    [W:2.425 / U:1.008 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site