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

Re: [PATCH] arm/vgic-v3: fix virq offset in the rank



On 26/07/2022 18:54, Luca Fancellu wrote:

Hi Julien,

Hi Luca,

/* Get the index in the rank */
- offset &= virq & INTERRUPT_RANK_MASK;
+ offset = virq & INTERRUPT_RANK_MASK;

AFAICT, vgic_fetch_irouter() has the same problem. Can you update it here as 
well?

I think that function is ok, because in there we have:

/* There is exactly 1 vIRQ per IROUTER */
offset = offset  / NR_BYTES_PER_IROUTER;

/* Get the index in the rank */
offset = offset & INTERRUPT_RANK_MASK;

Which is basically offset = (offset  / NR_BYTES_PER_IROUTER) & 
INTERRUPT_RANK_MASK;

Like in the counterpart (updated by this patch) vgic_store_irouter who has:

/* There is 1 vIRQ per IROUTER */
virq = offset / NR_BYTES_PER_IROUTER;

[…]

/* Get the index in the rank */
offset = virq & INTERRUPT_RANK_MASK;

Which is the same as above

You are right. So the patch looks correct to me.

Although, I would still like the commit message to be clarified.

Cheers,

--
Julien Grall



 


Rackspace

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