From mboxrd@z Thu Jan 1 00:00:00 1970 From: Julien Grall Subject: Re: [PATCH 2/2] xen/arm: observe itarget setting in vgic_enable_irqs and vgic_disable_irqs Date: Tue, 27 May 2014 18:09:33 +0100 Message-ID: <5384C6CD.3020405@linaro.org> References: <1401041192-20424-2-git-send-email-stefano.stabellini@eu.citrix.com> <5384C340.6090904@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@citrix.com, xen-devel@lists.xensource.com, Ian.Campbell@citrix.com List-Id: xen-devel@lists.xenproject.org On 05/27/2014 06:02 PM, Stefano Stabellini wrote: > On Tue, 27 May 2014, Julien Grall wrote: >> On 05/25/2014 07:06 PM, Stefano Stabellini wrote: >>> while ( (i = find_next_bit(&mask, 32, i)) < 32 ) { >>> irq = i + (32 * n); >>> - p = irq_to_pending(v, irq); >>> + rank = vgic_irq_rank(v, 1, irq/32); >>> + vgic_lock_rank(v, rank); >>> + if ( irq >= 32 ) >>> + { >>> + target = rank->itargets[(irq%32)/4] >> (8*(irq % 4)); >>> + target &= 0xff; >>> + v_target = v->domain->vcpu[target]; >> >> Without looking to the target stuff (see comment on patch #1), I don't >> need to do a specific case for SPIs. >> >> It will avoid diverging following the IRQ type. > > Sooner or later we'll implement SPI delivery to vcpu != 0. When we do > we'll actually need this patch, that is correct even without SPI > delivery to vcpu != 0. > Hrrrm .... right I forgot this case. If so, the vgic_irq_rank_lock doesn't need to be taken for non-SPIs. Regards, -- Julien Grall