From mboxrd@z Thu Jan 1 00:00:00 1970 From: Stefano Stabellini Subject: [PATCH v3 11/13] xen/arm: send IPIs to inject irqs into guest vcpus running on different pcpus Date: Wed, 24 Apr 2013 20:07:41 +0100 Message-ID: <1366830463-12153-11-git-send-email-stefano.stabellini@eu.citrix.com> References: Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: xen-devel@lists.xensource.com Cc: julien.grall@citrix.com, tim@xen.org, Ian.Campbell@citrix.com, Stefano Stabellini List-Id: xen-devel@lists.xenproject.org If we need to inject an irq into a guest that is running on a different processor, we shouldn't just enqueue the irq into the lr_pending and inflight lists and wait for something to interrupt the guest execution. Send an IPI to the target pcpu so that Xen can inject the new interrupt returning to guest. Signed-off-by: Stefano Stabellini --- xen/arch/arm/vgic.c | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/xen/arch/arm/vgic.c b/xen/arch/arm/vgic.c index 8912aab..547a2ab 100644 --- a/xen/arch/arm/vgic.c +++ b/xen/arch/arm/vgic.c @@ -664,6 +664,8 @@ out: spin_unlock_irqrestore(&v->arch.vgic.lock, flags); /* we have a new higher priority irq, inject it into the guest */ vcpu_unblock(v); + if ( v != current && v->is_running ) + smp_send_event_check_mask(cpumask_of(v->processor)); } /* -- 1.7.2.5