From mboxrd@z Thu Jan 1 00:00:00 1970 From: Julien Grall Subject: Re: [PATCH 5/6] xen/arm: Only enable physical IRQs when the guest asks Date: Fri, 06 Dec 2013 18:28:37 +0000 Message-ID: <52A21755.70906@linaro.org> References: <1386350808-13648-5-git-send-email-stefano.stabellini@eu.citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; Format="flowed" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1386350808-13648-5-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 , xen-devel@lists.xen.org Cc: Julien Grall , ian.campbell@citrix.com List-Id: xen-devel@lists.xenproject.org On 12/06/2013 05:26 PM, Stefano Stabellini wrote: > From: Julien Grall > > From: Julien Grall > > Set/Unset IRQ_DISABLED from gic_irq_enable and gic_irq_disable. > Enable IRQs when the guest requests it, not unconditionally at boot time. > > Signed-off-by: Stefano Stabellini > Signed-off-by: Julien Grall > --- [..] > @@ -605,6 +603,8 @@ int __init setup_dt_irq(const struct dt_irq *irq, struct irqaction *new) > > rc = __setup_irq(desc, irq->irq, new); > > + desc->handler->startup(desc); > + You forgot to take the GIC lock here. > spin_unlock_irqrestore(&desc->lock, flags); > > return rc; > @@ -743,6 +743,7 @@ int gic_route_irq_to_guest(struct domain *d, const struct dt_irq *irq, > unsigned long flags; > int retval; > bool_t level; > + struct pending_irq *p; > > action = xmalloc(struct irqaction); > if (!action) > @@ -769,6 +770,10 @@ int gic_route_irq_to_guest(struct domain *d, const struct dt_irq *irq, > goto out; > } > > + /* do not assume delivery to vcpu0 */ I would add TODO: in the comment. -- Julien Grall