public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
From: Chris Lalancette <clalance@redhat.com>
To: Gleb Natapov <gleb@redhat.com>
Cc: kvm@vger.kernel.org
Subject: Re: [PATCH 12/12] Kick appropriate CPUs when signalling interrupts.
Date: Tue, 08 Dec 2009 11:48:40 +0100	[thread overview]
Message-ID: <4B1E2F08.3000800@redhat.com> (raw)
In-Reply-To: <20091202154431.GA20102@redhat.com>

On 12/02/2009 04:44 PM, Gleb Natapov wrote:
> On Tue, Dec 01, 2009 at 03:36:41PM +0100, Chris Lalancette wrote:
>> Make sure that we kick the appropriate vcpu when delivering
>> an interrupt.  This makes sure that we wake any idle cpus
>> to cause a "vcpu_run" and an interrupt injection to occur.
>>
>> Signed-off-by: Chris Lalancette <clalance@redhat.com>
>> ---
>>  virt/kvm/irq_comm.c |    5 ++++-
>>  1 files changed, 4 insertions(+), 1 deletions(-)
>>
>> diff --git a/virt/kvm/irq_comm.c b/virt/kvm/irq_comm.c
>> index 9b07734..96df854 100644
>> --- a/virt/kvm/irq_comm.c
>> +++ b/virt/kvm/irq_comm.c
>> @@ -98,6 +98,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);
>> +			kvm_vcpu_kick(vcpu);
>>  		} else {
>>  			if (!lowest)
>>  				lowest = vcpu;
>> @@ -106,8 +107,10 @@ int kvm_irq_delivery_to_apic(struct kvm *kvm, struct kvm_lapic *src,
>>  		}
>>  	}
>>  
>> -	if (lowest)
>> +	if (lowest) {
>>  		r = kvm_apic_set_irq(lowest, irq);
>> +		kvm_vcpu_kick(lowest);
>> +	}
>>  
>>  	return r;
>>  }
> kvm_vcpu_kick() is done inside kvm_apic_set_irq(), so why is this
> needed?

Yeah, you are absolutely right.  I mis-read it before.  I'll remove this bit.

-- 
Chris Lalancette

      reply	other threads:[~2009-12-08 10:49 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-12-01 14:36 [PATCH 0/12]: Fix kdump under KVM Chris Lalancette
2009-12-01 14:36 ` [PATCH 01/12] Fix up some comments around the source tree Chris Lalancette
2009-12-01 14:36 ` [PATCH 02/12] Make kvm_pic_reset static Chris Lalancette
2009-12-01 14:36 ` [PATCH 03/12] Remove KVM_REQ_PENDING_TIMER Chris Lalancette
2009-12-01 19:04   ` Jan Kiszka
2009-12-02  4:59     ` Marcelo Tosatti
2009-12-02 12:59     ` Chris Lalancette
2009-12-02 14:16       ` Avi Kivity
2009-12-02 14:22         ` Avi Kivity
2009-12-01 14:36 ` [PATCH 04/12] IOAPIC timer interrupt redirect Chris Lalancette
2009-12-02  5:03   ` Marcelo Tosatti
2009-12-01 14:36 ` [PATCH 05/12] Make the IOAPIC lock a spinlock Chris Lalancette
2009-12-02 14:27   ` Avi Kivity
2009-12-01 14:36 ` [PATCH 06/12] Make the PIC use interrupt safe locking Chris Lalancette
2009-12-01 14:36 ` [PATCH 07/12] Rename kvm_apic_accept_pic_intr Chris Lalancette
2009-12-02 14:24   ` Avi Kivity
2009-12-02 16:12   ` Gleb Natapov
2009-12-01 14:36 ` [PATCH 08/12] Remove timer.c Chris Lalancette
2009-12-02  5:11   ` Marcelo Tosatti
2009-12-01 14:36 ` [PATCH 09/12] Fix missing spin_lock in PIT timer Chris Lalancette
2009-12-01 14:36 ` [PATCH 10/12] Inject i8254 interrupts directly from hrtimer callback Chris Lalancette
2009-12-01 14:36 ` [PATCH 11/12] Allow the PIC to signal CPUs other than BSP Chris Lalancette
2009-12-01 14:36 ` [PATCH 12/12] Kick appropriate CPUs when signalling interrupts Chris Lalancette
2009-12-02 15:44   ` Gleb Natapov
2009-12-08 10:48     ` Chris Lalancette [this message]

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=4B1E2F08.3000800@redhat.com \
    --to=clalance@redhat.com \
    --cc=gleb@redhat.com \
    --cc=kvm@vger.kernel.org \
    /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