From: Ian Campbell Subject: Re: [PATCH 6/6] xen/arm: disable a physical IRQ when the guest disables the corresponding IRQ Date: Mon, 9 Dec 2013 12:48:19 +0000 Message-ID: <1386593299.30459.19.camel@kazak.uk.xensource.com> References: <1386350808-13648-6-git-send-email-stefano.stabellini@eu.citrix.com> <52A20FC2.6090505@linaro.org> 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: Stefano Stabellini Cc: Julien Grall , xen-devel@lists.xen.org List-Id: xen-devel@lists.xenproject.org On Mon, 2013-12-09 at 12:37 +0000, Stefano Stabellini wrote: > On Fri, 6 Dec 2013, Julien Grall wrote: > > On 12/06/2013 05:26 PM, Stefano Stabellini wrote: > > > Signed-off-by: Stefano Stabellini > > > > [..] > > > > > static void vgic_enable_irqs(struct vcpu *v, uint32_t r, int n) > > > { > > > struct pending_irq *p; > > > @@ -494,8 +509,10 @@ static int vgic_distr_mmio_write(struct vcpu *v, > > > mmio_info_t *info) > > > rank = vgic_irq_rank(v, 1, gicd_reg - GICD_ICENABLER); > > > if ( rank == NULL) goto write_ignore; > > > vgic_lock_rank(v, rank); > > > + tr = rank->ienable; > > > rank->ienable &= ~*r; > > > vgic_unlock_rank(v, rank); > > > + vgic_disable_irqs(v, (*r) & (~tr), gicd_reg - GICD_ICENABLER); > > > > > > Why ~tr? We want to disable only enabled IRQ. > > You are right, I'll make the change. Don't forget that the semantics of this register are that you right a 1 to the bit position for the interrupt you want to disable. Ian.