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

Re: [Xen-devel] [PATCH v9 08/10] xen/arm: take the rank lock before accessing ipriority



Hi Stefano,

On 07/24/2014 06:33 PM, Stefano Stabellini wrote:
> Currently we read ipriority from vgic_vcpu_inject_irq without taking the
> rank lock. Fix that by taking the rank lock and reading ipriority at the
> beginning of the function.
> 
> As vgic_vcpu_inject_irq is called from the irq.c upon receiving an
> interrupt, we need to change the implementation of vgic_lock/unlock_rank
> to spin_lock_irqsave to make it safe in irq context.
> 
> Signed-off-by: Stefano Stabellini <stefano.stabellini@xxxxxxxxxxxxx>

Which series between GICv3 and this one will go first? I suspect this
one, so Vijay will have to rebase his VGICv3 patch on yours.

[..]

> @@ -367,6 +368,10 @@ void vgic_vcpu_inject_irq(struct vcpu *v, unsigned int 
> irq)
>      unsigned long flags;
>      bool_t running;
>  
> +    vgic_lock_rank(v, rank, flags);
> +    priority = vgic_byte_read(rank->ipriority[REG_RANK_INDEX(8, irq, 
> DABT_WORD)], 0, irq & 0x3);

This line is longer than 80 characters. I would split it, but I'm not
sure if it will be readable.

Anyway:

Acked-by: Julien Grall <julien.grall@xxxxxxxxxx>

Regards,

-- 
Julien Grall

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

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