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

Re: [Xen-devel] [PATCH-4.5 v3 10/12] xen/arm: don't protect GICH and lr_queue accesses with gic.lock

Hi Stefano,

On 03/18/2014 02:59 PM, Stefano Stabellini wrote:
> On Wed, 26 Feb 2014, Julien Grall wrote:
>> On 26/02/14 18:39, Stefano Stabellini wrote:
>>> GICH is banked, protect accesses by disabling interrupts.
>>> Protect lr_queue accesses with the vgic.lock only.
>> When the interrupt is an SPI, the lr_queue is shared between every VCPU. 
>> Using
>> only vgic.lock seems wrong to me.
> Even though lr_queue is a field in a struct that can be per domain for
> irq > 32, the lr_pending queue is always per vcpu, in fact it keeps
> track of the irqs waiting to go into lr registers, that are banked.

It might have a race between adding and removing lr_queue. For now it's
safe because the SPIs are always routed to VCPU0 (even if the guest ask
to route on VCPU1).

Just by reading the code, nothing protect correctly SPIs between VCPUs.
We are only take vgic.lock, which is wrong.


Julien Grall

Xen-devel mailing list



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