Subject: [PATCH v2 14/54] KVM: arm/arm64: vgic-new: Implement virtual IRQ injection

From: [email-masked] (Tom Hanson)
Date: Thu, 5 May 2016 10:34:48 -0600

On 05/05/2016 05:24 AM, Andre Przywara wrote:
> Hi Tom,
>
> thanks for looking at the patches!
>

You're quite welcome.  It's a great way to spin-up.

> The idea isn't too bad indeed.
> I see that we could use that in vgic_queue_irq_unlock() and
> vgic_mmio_write_sactive().
> But as Marc mentioned in a conversation yesterday we will have a mixture
> of wrapped locks and open coded lock sequences. See for instance
> vgic_prune_ap_list(), where we have the sequence, but we can't use
> vgic_lock_aplist_irq() because the IRQ lock is taken inside the loop
> while the ap_list_lock is taken once outside of it.

Agreed.  I looked at a few places where it wouldn't work. Definitely not a blanket solution but every little bit helps, especially if it helps avoid a bug such as a deadlock that may take hours to track down.  Been there, done that. :-)