[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH v9 05/10] xen/arm: physical irq follow virtual irq

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
a patch to rename nr_lines into nr_spis, along with adding a macro

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.


Julien Grall

Xen-devel mailing list



Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.