From mboxrd@z Thu Jan 1 00:00:00 1970 From: Radim =?utf-8?B?S3LEjW3DocWZ?= Subject: Re: [PATCH v3 01/24] KVM: x86: race between KVM_SET_GSI_ROUTING and KVM_CREATE_IRQCHIP Date: Tue, 25 Apr 2017 16:58:10 +0200 Message-ID: <20170425145809.GG5713@potion> References: <20170407085041.5257-1-david@redhat.com> <20170407085041.5257-2-david@redhat.com> <7e88e9b1-de11-0715-7849-3c12f644e40b@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: Steve Rutherford , KVM list , Paolo Bonzini , Peter Xu To: David Hildenbrand Return-path: Received: from mx1.redhat.com ([209.132.183.28]:38124 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1948451AbdDYO6V (ORCPT ); Tue, 25 Apr 2017 10:58:21 -0400 Content-Disposition: inline In-Reply-To: <7e88e9b1-de11-0715-7849-3c12f644e40b@redhat.com> Sender: kvm-owner@vger.kernel.org List-ID: 2017-04-25 14:34+0200, David Hildenbrand: > On 25.04.2017 00:39, Steve Rutherford wrote: >> Sorry to resurrect this thread. There's an srcu_synchronize_expedited >> call in kvm_set_irq_routing, so this lock might get held for a fairly >> long while. Wouldn't it be a better idea to check the irqchip mode? >> > > We could maybe check for kvm->arch.irqchip_mode == KVM_IRQCHIP_NONE > here under lock instead of in the function itself. Maybe we then even > don't need patch NR 2. Will have a look! Sounds good and the extra mode would be obsolete. Checking in kvm_main.c will just need a new arch hook. The patches are already in kvm/next, though, so please prepare it as a fix. Thanks.