Re: [Xen-devel] [PATCH v10 01/32] ARM: vGIC: avoid rank lock when reading priority

2017-06-06 Thread Stefano Stabellini
On Tue, 6 Jun 2017, Julien Grall wrote: > Hi Andre, > > On 06/06/17 18:20, Andre Przywara wrote: > > > > > > > > What about this one (in xen/arch/arm/vgic-v[23].c): > > > > > > > > static int vgic_v2_distr_mmio_write(struct vcpu *v, ... > > > > { > > > > -uint32_t *ipriorityr; > > > > +u

Re: [Xen-devel] [PATCH v10 01/32] ARM: vGIC: avoid rank lock when reading priority

2017-06-06 Thread Julien Grall
Hi Andre, On 06/06/17 18:20, Andre Przywara wrote: What about this one (in xen/arch/arm/vgic-v[23].c): static int vgic_v2_distr_mmio_write(struct vcpu *v, ... { -uint32_t *ipriorityr; +uint32_t *ipriorityr, priority; vgic_lock_rank(v, rank, flags); ipriorityr = &rank->ip

Re: [Xen-devel] [PATCH v10 01/32] ARM: vGIC: avoid rank lock when reading priority

2017-06-06 Thread Andre Przywara
Hi, On 06/06/17 18:11, Julien Grall wrote: > > > On 06/06/17 18:06, Andre Przywara wrote: >> On 30/05/17 11:47, Julien Grall wrote: >>> Hi Andre, >>> >>> On 26/05/17 18:35, Andre Przywara wrote: When reading the priority value of a virtual interrupt, we were taking the respective rank

Re: [Xen-devel] [PATCH v10 01/32] ARM: vGIC: avoid rank lock when reading priority

2017-06-06 Thread Julien Grall
On 06/06/17 18:06, Andre Przywara wrote: On 30/05/17 11:47, Julien Grall wrote: Hi Andre, On 26/05/17 18:35, Andre Przywara wrote: When reading the priority value of a virtual interrupt, we were taking the respective rank lock so far. However for forwarded interrupts (Dom0 only so far) this

Re: [Xen-devel] [PATCH v10 01/32] ARM: vGIC: avoid rank lock when reading priority

2017-06-06 Thread Andre Przywara
Hi, On 30/05/17 11:47, Julien Grall wrote: > Hi Andre, > > On 26/05/17 18:35, Andre Przywara wrote: >> When reading the priority value of a virtual interrupt, we were taking >> the respective rank lock so far. >> However for forwarded interrupts (Dom0 only so far) this may lead to a >> deadlock w

Re: [Xen-devel] [PATCH v10 01/32] ARM: vGIC: avoid rank lock when reading priority

2017-06-02 Thread Julien Grall
On 05/31/2017 11:42 AM, Julien Grall wrote: Hi Stefano, On 30/05/17 22:39, Stefano Stabellini wrote: On Tue, 30 May 2017, Julien Grall wrote: Hi Andre, On 26/05/17 18:35, Andre Przywara wrote: When reading the priority value of a virtual interrupt, we were taking the respective rank lock s

Re: [Xen-devel] [PATCH v10 01/32] ARM: vGIC: avoid rank lock when reading priority

2017-05-31 Thread Julien Grall
Hi Stefano, On 30/05/17 22:39, Stefano Stabellini wrote: On Tue, 30 May 2017, Julien Grall wrote: Hi Andre, On 26/05/17 18:35, Andre Przywara wrote: When reading the priority value of a virtual interrupt, we were taking the respective rank lock so far. However for forwarded interrupts (Dom0 o

Re: [Xen-devel] [PATCH v10 01/32] ARM: vGIC: avoid rank lock when reading priority

2017-05-30 Thread Stefano Stabellini
On Tue, 30 May 2017, Julien Grall wrote: > Hi Andre, > > On 26/05/17 18:35, Andre Przywara wrote: > > When reading the priority value of a virtual interrupt, we were taking > > the respective rank lock so far. > > However for forwarded interrupts (Dom0 only so far) this may lead to a > > deadlock

Re: [Xen-devel] [PATCH v10 01/32] ARM: vGIC: avoid rank lock when reading priority

2017-05-30 Thread Julien Grall
Hi Andre, On 26/05/17 18:35, Andre Przywara wrote: When reading the priority value of a virtual interrupt, we were taking the respective rank lock so far. However for forwarded interrupts (Dom0 only so far) this may lead to a deadlock with the following call chain: - MMIO access to change the IR

[Xen-devel] [PATCH v10 01/32] ARM: vGIC: avoid rank lock when reading priority

2017-05-26 Thread Andre Przywara
When reading the priority value of a virtual interrupt, we were taking the respective rank lock so far. However for forwarded interrupts (Dom0 only so far) this may lead to a deadlock with the following call chain: - MMIO access to change the IRQ affinity, calling the ITARGETSR handler - this handl