From: Ian Campbell Subject: Re: [PATCH v7 09/12] xen/arm: second irq injection while the first irq is still inflight Date: Wed, 23 Apr 2014 14:00:19 +0100 Message-ID: <1398258019.18537.93.camel@kazak.uk.xensource.com> References: <1396969969-18973-9-git-send-email-stefano.stabellini@eu.citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1396969969-18973-9-git-send-email-stefano.stabellini@eu.citrix.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Stefano Stabellini Cc: julien.grall@citrix.com, xen-devel@lists.xensource.com List-Id: xen-devel@lists.xenproject.org On Tue, 2014-04-08 at 16:12 +0100, Stefano Stabellini wrote: > + if ( lr & GICH_LR_ACTIVE ) > { > - inflight = 0; > + /* HW interrupts cannot be ACTIVE and PENDING */ > + if ( p->desc == NULL && > + test_bit(GIC_IRQ_GUEST_ENABLED, &p->status) && > + test_and_clear_bit(GIC_IRQ_GUEST_QUEUED, &p->status) ) > + GICH[GICH_LR + i] = lr | GICH_LR_PENDING; Do we really need to take no action for a HW interrupt here? We leave it QUEUED and then something else later will inject another one? What does that? Can you expand the comment to explain, "HW interrupts cannot be ... and therefore we leave it active and later on ..." etc. > + } else { > + spin_lock(&gic.lock); It probably doesn't matter much, but do you need to expand the scope of the lock or could you leave it where it was? Ian.