From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:45092) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XLqm4-0006Nv-Kd for qemu-devel@nongnu.org; Mon, 25 Aug 2014 05:41:25 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XLqlv-0001mH-Ku for qemu-devel@nongnu.org; Mon, 25 Aug 2014 05:41:16 -0400 Received: from mail-lb0-x235.google.com ([2a00:1450:4010:c04::235]:32797) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XLqlv-0001m6-Ck for qemu-devel@nongnu.org; Mon, 25 Aug 2014 05:41:07 -0400 Received: by mail-lb0-f181.google.com with SMTP id 10so11718620lbg.40 for ; Mon, 25 Aug 2014 02:41:04 -0700 (PDT) Message-ID: <53FB04AE.9050004@gmail.com> Date: Mon, 25 Aug 2014 13:41:02 +0400 From: Sergey Fedorov MIME-Version: 1.0 References: <1407947471-26981-1-git-send-email-serge.fdrv@gmail.com> In-Reply-To: <1407947471-26981-1-git-send-email-serge.fdrv@gmail.com> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH] hw/intc/arm_gic: honor target mask in gic_update() List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Peter Maydell , Marcel Apfelbaum , Markus Armbruster , Christoffer Dall , =?windows-1252?Q?Andreas_F=E4rb?= =?windows-1252?Q?er?= Ping. On 13.08.2014 20:31, Sergey Fedorov wrote: > Take IRQ target mask into account when determining the highest priority > pending interrupt. > > Signed-off-by: Sergey Fedorov > --- > hw/intc/arm_gic.c | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > > diff --git a/hw/intc/arm_gic.c b/hw/intc/arm_gic.c > index 1532ef9..a5ad7b9 100644 > --- a/hw/intc/arm_gic.c > +++ b/hw/intc/arm_gic.c > @@ -66,7 +66,8 @@ void gic_update(GICState *s) > best_prio = 0x100; > best_irq = 1023; > for (irq = 0; irq < s->num_irq; irq++) { > - if (GIC_TEST_ENABLED(irq, cm) && gic_test_pending(s, irq, cm)) { > + if (GIC_TEST_ENABLED(irq, cm) && gic_test_pending(s, irq, cm) && > + (irq < GIC_INTERNAL || GIC_TARGET(irq) & cm)) { > if (GIC_GET_PRIORITY(irq, cpu) < best_prio) { > best_prio = GIC_GET_PRIORITY(irq, cpu); > best_irq = irq;