From mboxrd@z Thu Jan 1 00:00:00 1970 From: Alex Williamson Subject: Re: [PATCH 1/1] KVM: Fix potentially recursively get kvm lock Date: Fri, 22 May 2009 09:34:29 -0600 Message-ID: <1243006469.27733.59.camel@lappy> References: <200905121705.53176.sheng.yang@intel.com> <1242120729-2280-1-git-send-email-sheng@linux.intel.com> <20090512115524.GB10901@amt.cnet> <200905122213.36833.sheng.yang@intel.com> <20090512143021.GB12888@amt.cnet> <20090512194432.GA19969@amt.cnet> <1242164187.4788.4.camel@2710p.home> <20090512220908.GA22626@amt.cnet> <1242166650.4788.16.camel@2710p.home> <20090522150623.GD20823@sequoia.sous-sol.org> Mime-Version: 1.0 Content-Type: text/plain Content-Transfer-Encoding: 7bit Cc: Marcelo Tosatti , "Yang, Sheng" , Avi Kivity , kvm@vger.kernel.org To: Chris Wright Return-path: Received: from g1t0029.austin.hp.com ([15.216.28.36]:33972 "EHLO g1t0029.austin.hp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756970AbZEVPeb (ORCPT ); Fri, 22 May 2009 11:34:31 -0400 In-Reply-To: <20090522150623.GD20823@sequoia.sous-sol.org> Sender: kvm-owner@vger.kernel.org List-ID: On Fri, 2009-05-22 at 08:06 -0700, Chris Wright wrote: > * Alex Williamson (alex.williamson@hp.com) wrote: > > On Tue, 2009-05-12 at 19:09 -0300, Marcelo Tosatti wrote: > > > KVM: workaround workqueue / deassign_host_irq deadlock > > > > > > I think I'm running into the following deadlock in the kvm kernel module > > > when trying to use device assignment: > > > > > > CPU A CPU B > > > kvm_vm_ioctl_deassign_dev_irq() > > > mutex_lock(&kvm->lock); worker_thread() > > > -> kvm_deassign_irq() -> > > > kvm_assigned_dev_interrupt_work_handler() > > > -> deassign_host_irq() mutex_lock(&kvm->lock); > > > -> cancel_work_sync() [blocked] > > > > > > Workaround the issue by dropping kvm->lock for cancel_work_sync(). > > Is this still pending? I haven't seen this particular workaround make it into a tree, however Marcelo has been working on a set of patches to properly fix this. Most recent version was sent on 5/20. Alex