[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CANRm+CyjQk377z32+jusQ7k7H7+a3-QN4jThHBPnT4RFEpzjSA@mail.gmail.com>
Date: Thu, 29 Jun 2017 19:54:24 +0800
From: Wanpeng Li <kernellwp@...il.com>
To: Paolo Bonzini <pbonzini@...hat.com>
Cc: "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
kvm <kvm@...r.kernel.org>,
Radim Krčmář <rkrcmar@...hat.com>,
Wanpeng Li <wanpeng.li@...mail.com>
Subject: Re: [PATCH v3] KVM: LAPIC: Fix lapic timer injection delay
2017-06-29 19:43 GMT+08:00 Paolo Bonzini <pbonzini@...hat.com>:
>
>
> On 29/06/2017 10:44, Wanpeng Li wrote:
>>>> You still need to enable the preemption timer even if you return 1, so
>>>> in lapic.c it becomes
>>>>
>>>> if (!apic_lvtt_period(apic)) {
>>>> if (r)
>>>> apic_timer_expired(apic);
>>>> if (atomic_read(&apic->lapic_timer.pending))
>>>> need_cancel = true;
>>>> }
>>> I think the codes are more clear but the same as above. We didn't
>>> program preemption timer vmcs field if delta == 0, so how to
>>> understand "need to enable the preemption timer even if return 1"?
>> I guess you mean start_hv_timer() should return true, right?
>
> vmx.c's set_hv_timer callback should set the preemption timer execution
> control. Otherwise, kvm_lapic_hv_timer_expired is again not called.
I see, this should be set for apic timer periodic mode.
Regards,
Wanpeng Li
Powered by blists - more mailing lists