From mboxrd@z Thu Jan 1 00:00:00 1970 From: Chris Lalancette Subject: Re: [PATCH 12/12] Kick appropriate CPUs when signalling interrupts. Date: Tue, 08 Dec 2009 11:48:40 +0100 Message-ID: <4B1E2F08.3000800@redhat.com> References: <1259678201-11203-1-git-send-email-clalance@redhat.com> <1259678201-11203-13-git-send-email-clalance@redhat.com> <20091202154431.GA20102@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: kvm@vger.kernel.org To: Gleb Natapov Return-path: Received: from mx1.redhat.com ([209.132.183.28]:59113 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753573AbZLHKtF (ORCPT ); Tue, 8 Dec 2009 05:49:05 -0500 Received: from int-mx03.intmail.prod.int.phx2.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.16]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id nB8AnBFG030091 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Tue, 8 Dec 2009 05:49:11 -0500 In-Reply-To: <20091202154431.GA20102@redhat.com> Sender: kvm-owner@vger.kernel.org List-ID: 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 >> --- >> 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