From mboxrd@z Thu Jan 1 00:00:00 1970 From: Tom Hanson Subject: Re: [PATCH v2 14/54] KVM: arm/arm64: vgic-new: Implement virtual IRQ injection Date: Thu, 5 May 2016 10:34:48 -0600 Message-ID: <572B7628.4020608@linaro.org> References: <1461861973-26464-1-git-send-email-andre.przywara@arm.com> <1461861973-26464-15-git-send-email-andre.przywara@arm.com> <57293844.1060802@linaro.org> <572B2D88.3050504@arm.com> Mime-Version: 1.0 Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Cc: linux-arm-kernel@lists.infradead.org, kvmarm@lists.cs.columbia.edu, kvm@vger.kernel.org, Eric Auger To: Andre Przywara , Marc Zyngier , Christoffer Dall Return-path: Received: from mail-pa0-f53.google.com ([209.85.220.53]:33543 "EHLO mail-pa0-f53.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755506AbcEEQez (ORCPT ); Thu, 5 May 2016 12:34:55 -0400 Received: by mail-pa0-f53.google.com with SMTP id xk12so37922952pac.0 for ; Thu, 05 May 2016 09:34:55 -0700 (PDT) In-Reply-To: <572B2D88.3050504@arm.com> Sender: kvm-owner@vger.kernel.org List-ID: 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. :-)