lkml.org 
[lkml]   [2017]   [Jun]   [29]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH v3] KVM: LAPIC: Fix lapic timer injection delay
2017-06-29 15:55 GMT+08:00 Paolo Bonzini <pbonzini@redhat.com>:
>> +
>> + /* In case the sw timer triggered in the window */
>> + if (atomic_read(&apic->lapic_timer.pending) &&
>> + !apic_lvtt_period(apic))
>> + need_cancel = true;
>> + else if (r && (apic_lvtt_oneshot(apic) ||
>> apic_lvtt_tscdeadline(apic)))
>> + apic_timer_expired(apic);
>> + }
>> + }

[...]

>
> 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"?

>
>
> Otherwise it looks good. Thanks for your persistence. :)

Thanks for your help and patient. :)

Regards,
Wanpeng Li

\
 
 \ /
  Last update: 2017-06-29 10:19    [W:0.054 / U:22.868 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site