Re: [Xen-devel] [PATCH] arm/acpi: Fix the deadlock in function vgic_lock_rank()

2016-06-01 Thread Shannon Zhao
On 2016年06月01日 18:49, Julien Grall wrote: > Hi Stefano, > > On 01/06/16 10:54, Stefano Stabellini wrote: >>> spin_is_locked does not work as you expect. The function will not >>> tell you if >>> the lock was taken by the current CPU, but if the lock was taken by >>> *a* CPU. >>> >>> It would be

Re: [Xen-devel] [PATCH] arm/acpi: Fix the deadlock in function vgic_lock_rank()

2016-06-01 Thread Julien Grall
Hi Stefano, On 01/06/16 10:54, Stefano Stabellini wrote: spin_is_locked does not work as you expect. The function will not tell you if the lock was taken by the current CPU, but if the lock was taken by *a* CPU. It would be possible to have CPU A calling this function and have CPU B with the

Re: [Xen-devel] [PATCH] arm/acpi: Fix the deadlock in function vgic_lock_rank()

2016-06-01 Thread Stefano Stabellini
On Tue, 31 May 2016, Julien Grall wrote: > Hi Stefano, > > On 31/05/16 10:40, Stefano Stabellini wrote: > > On Mon, 30 May 2016, Julien Grall wrote: > > > ACPI can only be enabled in expert mode and will be a tech-preview for Xen > > > 4.7. So I would revert the patch. SPIs will not be routed,

Re: [Xen-devel] [PATCH] arm/acpi: Fix the deadlock in function vgic_lock_rank()

2016-05-31 Thread Wei Liu
On Tue, May 31, 2016 at 10:40:13AM +0100, Stefano Stabellini wrote: > On Mon, 30 May 2016, Julien Grall wrote: > > (CC Wei Liu) > > > > Hi Stefano, > > > > On 30/05/2016 14:16, Stefano Stabellini wrote: > > > On Fri, 27 May 2016, Julien Grall wrote: > > > > Hello Shanker, > > > > > > > > On

Re: [Xen-devel] [PATCH] arm/acpi: Fix the deadlock in function vgic_lock_rank()

2016-05-31 Thread Julien Grall
Hi Stefano, On 31/05/16 10:40, Stefano Stabellini wrote: On Mon, 30 May 2016, Julien Grall wrote: ACPI can only be enabled in expert mode and will be a tech-preview for Xen 4.7. So I would revert the patch. SPIs will not be routed, but it is better than a deadlock. I would also replace the

Re: [Xen-devel] [PATCH] arm/acpi: Fix the deadlock in function vgic_lock_rank()

2016-05-31 Thread Stefano Stabellini
On Mon, 30 May 2016, Julien Grall wrote: > (CC Wei Liu) > > Hi Stefano, > > On 30/05/2016 14:16, Stefano Stabellini wrote: > > On Fri, 27 May 2016, Julien Grall wrote: > > > Hello Shanker, > > > > > > On 27/05/16 01:39, Shanker Donthineni wrote: > > > > Commit 9d77b3c01d1261c (Configure SPI

Re: [Xen-devel] [PATCH] arm/acpi: Fix the deadlock in function vgic_lock_rank()

2016-05-30 Thread Shannon Zhao
On 2016/5/31 3:45, Julien Grall wrote: > (CC Wei Liu) > > Hi Stefano, > > On 30/05/2016 14:16, Stefano Stabellini wrote: >> On Fri, 27 May 2016, Julien Grall wrote: >>> Hello Shanker, >>> >>> On 27/05/16 01:39, Shanker Donthineni wrote: Commit 9d77b3c01d1261c (Configure SPI interrupt type

Re: [Xen-devel] [PATCH] arm/acpi: Fix the deadlock in function vgic_lock_rank()

2016-05-30 Thread Julien Grall
(CC Wei Liu) Hi Stefano, On 30/05/2016 14:16, Stefano Stabellini wrote: On Fri, 27 May 2016, Julien Grall wrote: Hello Shanker, On 27/05/16 01:39, Shanker Donthineni wrote: Commit 9d77b3c01d1261c (Configure SPI interrupt type and route to Dom0 dynamically) causing dead loop inside the

Re: [Xen-devel] [PATCH] arm/acpi: Fix the deadlock in function vgic_lock_rank()

2016-05-30 Thread Stefano Stabellini
On Fri, 27 May 2016, Julien Grall wrote: > Hello Shanker, > > On 27/05/16 01:39, Shanker Donthineni wrote: > > Commit 9d77b3c01d1261c (Configure SPI interrupt type and route to > > Dom0 dynamically) causing dead loop inside the spinlock function. > > Note that spinlocks in XEN are not recursive.

Re: [Xen-devel] [PATCH] arm/acpi: Fix the deadlock in function vgic_lock_rank()

2016-05-27 Thread Julien Grall
Hello Shanker, On 27/05/16 01:39, Shanker Donthineni wrote: Commit 9d77b3c01d1261c (Configure SPI interrupt type and route to Dom0 dynamically) causing dead loop inside the spinlock function. Note that spinlocks in XEN are not recursive. Re-acquiring a spinlock that has already held by calling

[Xen-devel] [PATCH] arm/acpi: Fix the deadlock in function vgic_lock_rank()

2016-05-26 Thread Shanker Donthineni
Commit 9d77b3c01d1261c (Configure SPI interrupt type and route to Dom0 dynamically) causing dead loop inside the spinlock function. Note that spinlocks in XEN are not recursive. Re-acquiring a spinlock that has already held by calling CPU leads to deadlock. This happens whenever dom0 does writes