Re: [Xen-devel] [RFC PATCH 04/10] ARM: vGIC: add struct pending_irq locking

2017-05-05 Thread Julien Grall
Hi Andre, On 05/05/2017 10:02 AM, Andre Przywara wrote: Hi, On 04/05/17 17:21, Julien Grall wrote: Hi Andre, On 04/05/17 16:31, Andre Przywara wrote: Introduce the proper locking sequence for the new pending_irq lock. This takes the lock around multiple accesses to struct members, also makes

Re: [Xen-devel] [RFC PATCH 04/10] ARM: vGIC: add struct pending_irq locking

2017-05-05 Thread Stefano Stabellini
On Thu, 4 May 2017, Julien Grall wrote: > > @@ -545,14 +549,30 @@ static void gic_restore_pending_irqs(struct vcpu *v) > > /* No more free LRs: find a lower priority irq to evict */ > > list_for_each_entry_reverse( p_r, inflight_r, inflight ) > > { > > +

Re: [Xen-devel] [RFC PATCH 04/10] ARM: vGIC: add struct pending_irq locking

2017-05-05 Thread Stefano Stabellini
On Fri, 5 May 2017, Andre Przywara wrote: > Hi, > > On 04/05/17 17:21, Julien Grall wrote: > > Hi Andre, > > > > On 04/05/17 16:31, Andre Przywara wrote: > >> Introduce the proper locking sequence for the new pending_irq lock. > >> This takes the lock around multiple accesses to struct members, >

Re: [Xen-devel] [RFC PATCH 04/10] ARM: vGIC: add struct pending_irq locking

2017-05-05 Thread Stefano Stabellini
On Thu, 4 May 2017, Julien Grall wrote: > On 04/05/17 16:31, Andre Przywara wrote: > > diff --git a/xen/arch/arm/vgic.c b/xen/arch/arm/vgic.c > > index f4ae454..44363bb 100644 > > --- a/xen/arch/arm/vgic.c > > +++ b/xen/arch/arm/vgic.c > > @@ -356,11 +356,16 @@ void vgic_enable_irqs(struct vcpu *v,

Re: [Xen-devel] [RFC PATCH 04/10] ARM: vGIC: add struct pending_irq locking

2017-05-05 Thread Andre Przywara
Hi, On 04/05/17 17:21, Julien Grall wrote: > Hi Andre, > > On 04/05/17 16:31, Andre Przywara wrote: >> Introduce the proper locking sequence for the new pending_irq lock. >> This takes the lock around multiple accesses to struct members, >> also makes sure we observe the locking order (VGIC VCPU

Re: [Xen-devel] [RFC PATCH 04/10] ARM: vGIC: add struct pending_irq locking

2017-05-04 Thread Julien Grall
On 04/05/17 16:31, Andre Przywara wrote: diff --git a/xen/arch/arm/vgic.c b/xen/arch/arm/vgic.c index f4ae454..44363bb 100644 --- a/xen/arch/arm/vgic.c +++ b/xen/arch/arm/vgic.c @@ -356,11 +356,16 @@ void vgic_enable_irqs(struct vcpu *v, uint32_t r, int n) while ( (i = find_next_bit(&mask,

Re: [Xen-devel] [RFC PATCH 04/10] ARM: vGIC: add struct pending_irq locking

2017-05-04 Thread Julien Grall
Hi Andre, On 04/05/17 16:31, Andre Przywara wrote: Introduce the proper locking sequence for the new pending_irq lock. This takes the lock around multiple accesses to struct members, also makes sure we observe the locking order (VGIC VCPU lock first, then pending_irq lock). This locking order

[Xen-devel] [RFC PATCH 04/10] ARM: vGIC: add struct pending_irq locking

2017-05-04 Thread Andre Przywara
Introduce the proper locking sequence for the new pending_irq lock. This takes the lock around multiple accesses to struct members, also makes sure we observe the locking order (VGIC VCPU lock first, then pending_irq lock). Signed-off-by: Andre Przywara --- xen/arch/arm/gic.c | 26 +