Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1677530

Re: [PATCH v3] KVM: LAPIC: Fix lapic timer injection delay

From Wanpeng Li <kernellwp@gmail.com>
Newsgroups linux.kernel
Subject Re: [PATCH v3] KVM: LAPIC: Fix lapic timer injection delay
Date 2017-06-29 10:50 +0200
Message-ID <tXDjb-5jp-11@gated-at.bofh.it> (permalink)
References (2 earlier) <tXm8F-7TU-1@gated-at.bofh.it> <tXmim-7Xs-19@gated-at.bofh.it> <tXyCR-2nE-3@gated-at.bofh.it> <tXCwP-4ON-29@gated-at.bofh.it> <tXCQa-5a5-9@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


2017-06-29 16:17 GMT+08:00 Wanpeng Li <kernellwp@gmail.com>:
> 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"?

I guess you mean start_hv_timer() should return true, right?

Regards,
Wanpeng Li

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH v3] KVM: LAPIC: Fix lapic timer injection delay Wanpeng Li <kernellwp@gmail.com> - 2017-06-28 03:30 +0200
  Re: [PATCH v3] KVM: LAPIC: Fix lapic timer injection delay Paolo Bonzini <pbonzini@redhat.com> - 2017-06-28 14:20 +0200
    Re: [PATCH v3] KVM: LAPIC: Fix lapic timer injection delay Wanpeng Li <kernellwp@gmail.com> - 2017-06-28 16:00 +0200
      Re: [PATCH v3] KVM: LAPIC: Fix lapic timer injection delay Paolo Bonzini <pbonzini@redhat.com> - 2017-06-28 16:10 +0200
        Re: [PATCH v3] KVM: LAPIC: Fix lapic timer injection delay Wanpeng Li <kernellwp@gmail.com> - 2017-06-28 16:10 +0200
    Re: [PATCH v3] KVM: LAPIC: Fix lapic timer injection delay Wanpeng Li <kernellwp@gmail.com> - 2017-06-28 16:30 +0200
      Re: [PATCH v3] KVM: LAPIC: Fix lapic timer injection delay Paolo Bonzini <pbonzini@redhat.com> - 2017-06-28 16:40 +0200
        Re: [PATCH v3] KVM: LAPIC: Fix lapic timer injection delay Wanpeng Li <kernellwp@gmail.com> - 2017-06-29 05:50 +0200
          Re: [PATCH v3] KVM: LAPIC: Fix lapic timer injection delay Paolo Bonzini <pbonzini@redhat.com> - 2017-06-29 10:00 +0200
            Re: [PATCH v3] KVM: LAPIC: Fix lapic timer injection delay Wanpeng Li <kernellwp@gmail.com> - 2017-06-29 10:20 +0200
              Re: [PATCH v3] KVM: LAPIC: Fix lapic timer injection delay Wanpeng Li <kernellwp@gmail.com> - 2017-06-29 10:50 +0200
                Re: [PATCH v3] KVM: LAPIC: Fix lapic timer injection delay Paolo Bonzini <pbonzini@redhat.com> - 2017-06-29 13:50 +0200
                Re: [PATCH v3] KVM: LAPIC: Fix lapic timer injection delay Wanpeng Li <kernellwp@gmail.com> - 2017-06-29 14:00 +0200
            Re: [PATCH v3] KVM: LAPIC: Fix lapic timer injection delay Wanpeng Li <kernellwp@gmail.com> - 2017-06-29 14:10 +0200
              Re: [PATCH v3] KVM: LAPIC: Fix lapic timer injection delay Paolo Bonzini <pbonzini@redhat.com> - 2017-06-29 14:20 +0200

csiph-web