From: Paolo Bonzini <pbonzini@redhat.com>
To: Wanpeng Li <kernellwp@gmail.com>,
linux-kernel@vger.kernel.org, kvm@vger.kernel.org
Cc: "Radim Krčmář" <rkrcmar@redhat.com>
Subject: Re: [PATCH 2/3] KVM: LAPIC: lapic timer is injected by posted interrupt
Date: Wed, 5 Jun 2019 14:30:51 +0200 [thread overview]
Message-ID: <16c54182-7198-f476-080b-5876cd871e42@redhat.com> (raw)
In-Reply-To: <1559729351-20244-3-git-send-email-wanpengli@tencent.com>
On 05/06/19 12:09, Wanpeng Li wrote:
> +static void apic_timer_expired_pi(struct kvm_lapic *apic)
> +{
> + struct kvm_timer *ktimer = &apic->lapic_timer;
> +
> + kvm_apic_local_deliver(apic, APIC_LVTT);
> + if (apic_lvtt_tscdeadline(apic))
> + ktimer->tscdeadline = 0;
> + if (apic_lvtt_oneshot(apic)) {
> + ktimer->tscdeadline = 0;
> + ktimer->target_expiration = 0;
> + }
> +}
Please rename this function to kvm_apic_inject_pending_timer_irqs and
call it from kvm_inject_apic_timer_irqs.
Then apic_timer_expired can just do
if (atomic_read(&apic->lapic_timer.pending))
return;
+ if (unlikely(posted_interrupt_inject_timer(apic->vcpu))) {
+ kvm_apic_inject_pending_timer_irqs(apic);
+ return;
+ }
etc.
Paolo
next prev parent reply other threads:[~2019-06-05 12:30 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-06-05 10:09 [PATCH 0/3] KVM: LAPIC: Implement Exitless Timer Wanpeng Li
2019-06-05 10:09 ` [PATCH 1/3] KVM: LAPIC: Make lapic timer unpinned when timer is injected by posted-interrupt Wanpeng Li
2019-06-05 13:04 ` Paolo Bonzini
2019-06-06 5:44 ` Wanpeng Li
2019-06-05 10:09 ` [PATCH 2/3] KVM: LAPIC: lapic timer is injected by posted interrupt Wanpeng Li
2019-06-05 12:30 ` Paolo Bonzini [this message]
2019-06-06 5:33 ` Wanpeng Li
2019-06-05 10:09 ` [PATCH 3/3] KVM: LAPIC: Ignore timer migration when lapic timer is injected by posted-interrupt Wanpeng Li
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=16c54182-7198-f476-080b-5876cd871e42@redhat.com \
--to=pbonzini@redhat.com \
--cc=kernellwp@gmail.com \
--cc=kvm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=rkrcmar@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®