From: Gleb Natapov <gleb@redhat.com>
To: Chris Lalancette <clalance@redhat.com>
Cc: kvm@vger.kernel.org, avi@redhat.com, mtosatti@redhat.com
Subject: Re: [RFC][PATCH 3/3] In DM_LOWEST, only deliver interrupts to vcpus with enabled LAPIC's
Date: Wed, 9 Jun 2010 14:01:32 +0300 [thread overview]
Message-ID: <20100609110132.GX14316@redhat.com> (raw)
In-Reply-To: <1276019703-18136-4-git-send-email-clalance@redhat.com>
On Tue, Jun 08, 2010 at 01:55:03PM -0400, Chris Lalancette wrote:
> Otherwise we might try to deliver a timer interrupt to a cpu that
> can't possibly handle it.
>
> Signed-off-by: Chris Lalancette <clalance@redhat.com>
> ---
> virt/kvm/irq_comm.c | 2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/virt/kvm/irq_comm.c b/virt/kvm/irq_comm.c
> index 52f412f..06cf61e 100644
> --- a/virt/kvm/irq_comm.c
> +++ b/virt/kvm/irq_comm.c
> @@ -100,7 +100,7 @@ int kvm_irq_delivery_to_apic(struct kvm *kvm, struct kvm_lapic *src,
> if (r < 0)
> r = 0;
> r += kvm_apic_set_irq(vcpu, irq);
> - } else {
> + } else if (kvm_lapic_enabled(vcpu)) {
> if (!lowest)
> lowest = vcpu;
> else if (kvm_apic_compare_prio(vcpu, lowest) < 0)
Shouldn't we check kvm_lapic_enabled(vcpu) at the beginning of the loop?
Something like:
if (!kvm_apic_present(vcpu) || !kvm_lapic_enabled(vcpu))
continue;
--
Gleb.
next prev parent reply other threads:[~2010-06-09 11:01 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-06-08 17:55 [RFC][PATCH 0/3]: Fixes to IRQ routing Chris Lalancette
2010-06-08 17:55 ` [RFC][PATCH 1/3] Introduce a workqueue to deliver PIT timer interrupts Chris Lalancette
2010-06-09 2:36 ` Zachary Amsden
2010-06-09 13:23 ` Marcelo Tosatti
2010-06-09 14:16 ` Avi Kivity
2010-06-09 14:40 ` Marcelo Tosatti
2010-06-09 21:17 ` Zachary Amsden
2010-06-10 9:24 ` Avi Kivity
2010-06-10 19:17 ` Zachary Amsden
2010-06-10 16:18 ` Marcelo Tosatti
2010-06-09 10:55 ` Avi Kivity
2010-06-09 13:49 ` Marcelo Tosatti
2010-06-09 14:20 ` Avi Kivity
2010-06-08 17:55 ` [RFC][PATCH 2/3] Allow any LAPIC to accept PIC interrupts Chris Lalancette
2010-06-08 17:55 ` [RFC][PATCH 3/3] In DM_LOWEST, only deliver interrupts to vcpus with enabled LAPIC's Chris Lalancette
2010-06-09 11:01 ` Gleb Natapov [this message]
2010-06-09 11:08 ` Avi Kivity
2010-06-09 11:20 ` Gleb Natapov
2010-06-09 11:22 ` Avi Kivity
2010-06-09 11:02 ` [RFC][PATCH 0/3]: Fixes to IRQ routing Avi Kivity
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=20100609110132.GX14316@redhat.com \
--to=gleb@redhat.com \
--cc=avi@redhat.com \
--cc=clalance@redhat.com \
--cc=kvm@vger.kernel.org \
--cc=mtosatti@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