From mboxrd@z Thu Jan 1 00:00:00 1970 From: Julien Grall Subject: Re: [PATCH v9 05/10] xen/arm: physical irq follow virtual irq Date: Fri, 01 Aug 2014 19:00:39 +0100 Message-ID: <53DBD5C7.3070508@linaro.org> References: <1406223192-26267-5-git-send-email-stefano.stabellini@eu.citrix.com> <53D67097.1020707@linaro.org> <53D67D83.1010406@linaro.org> <53DBD448.7030801@linaro.org> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; Format="flowed" 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 01/08/14 18:58, Stefano Stabellini wrote: > On Fri, 1 Aug 2014, Julien Grall wrote: >> Hi Stefano, >> >> On 01/08/14 18:22, Stefano Stabellini wrote: >>> On Mon, 28 Jul 2014, Julien Grall wrote: >>>> On 07/28/2014 05:20 PM, Stefano Stabellini wrote: >>>>> On Mon, 28 Jul 2014, Julien Grall wrote: >>>>>> Hi stefano, >>>>>> >>>>>> On 07/24/2014 06:33 PM, Stefano Stabellini wrote: >>>>>>> +void arch_move_irqs(struct vcpu *v) >>>>>>> +{ >>>>>>> + const cpumask_t *cpu_mask = cpumask_of(v->processor); >>>>>>> + struct domain *d = v->domain; >>>>>>> + struct pending_irq *p; >>>>>>> + struct vcpu *v_target; >>>>>>> + int i; >>>>>>> + >>>>>>> + for ( i = 32; i < d->arch.vgic.nr_lines; i++ ) >>>>>> >>>>>> Sorry, I didn't spot this error until now. >>>>>> >>>>>> For the VGIC nr_lines contains the number of *SPIs* rather on the GIC >>>>>> structure it's the number of IRQs... the name is very confusing. I >>>>>> have >>>>>> a patch to rename nr_lines into nr_spis, along with adding a macro >>>>>> vgic_number_lines. >>>>> >>>>> I couldn't parse this sentence. >>>> >>>> Sorry it was not very clear. >>>> >>>>> I guess you are saying that vgic.nr_lines doesn't represent the number >>>>> of spis? >>>> >>>> Yes. In the VGIC structure nr_lines = number of SPIs. >>>> >>>> On GIC structure nr_lines = number of IRQs. >>> >>> Wait a second. If in the vgic struct, nr_lines = number of SPIs, then >>> the code in this patch is correct as it is, isn't it? >> >> No because your loop starts at 32 and you check against vgic.nr_lines. >> >> The loop should be: >> >> for ( i = 32; i < (d->arch.vgic.nr_lines + 32); i++ ) >> >> Otherwise you will forget to migrate the last 32 SPIs. > > Sorry, obviously I didn't think it through. > > For simplicity I think it is best if I just make this change. > > If you are going to base your series on this one, you might as well > cleanup this line too in your patch? It's fine for me. Regards, -- Julien Grall