From mboxrd@z Thu Jan 1 00:00:00 1970 From: Joerg Roedel Subject: Re: kvm PCI assignment & VFIO ramblings Date: Tue, 30 Aug 2011 18:14:33 +0200 Message-ID: <20110830161433.GC5203@8bytes.org> References: <1314119311.2859.59.camel@bling.home> <20110824085213.GB2079@amd.com> <1314198467.2859.192.camel@bling.home> <20110825123146.GD1923@amd.com> <20110826042423.GF2308@yookeroo.fritz.box> <20110826092440.GO1923@amd.com> <4E5A3F18.7050903@redhat.com> <20110828135632.GG8978@8bytes.org> <4E5A4AF0.20707@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: "Roedel, Joerg" , Alexander Graf , Alexey Kardashevskiy , "kvm@vger.kernel.org" , Paul Mackerras , qemu-devel , iommu , chrisw , Alex Williamson , Anthony Liguori , "linux-pci@vger.kernel.org" , linuxppc-dev , "benve@cisco.com" To: Avi Kivity Return-path: Content-Disposition: inline In-Reply-To: <4E5A4AF0.20707@redhat.com> Sender: linux-pci-owner@vger.kernel.org List-Id: kvm.vger.kernel.org On Sun, Aug 28, 2011 at 05:04:32PM +0300, Avi Kivity wrote: > On 08/28/2011 04:56 PM, Joerg Roedel wrote: >> This can't be secured by a lock, because it introduces potential >> A->B<-->B->A lock problem when two processes try to take each others mm. >> It could probably be solved by a task->real_mm pointer, havn't thought >> about this yet... >> > > Or a workqueue - you get a kernel thread context with a bit of boilerplate. Right, a workqueue might do the trick. We'll evaluate that. Thanks for the idea :) Joerg From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from 8bytes.org (8bytes.org [88.198.83.132]) by ozlabs.org (Postfix) with ESMTP id 5558CB6F92 for ; Wed, 31 Aug 2011 02:14:35 +1000 (EST) Date: Tue, 30 Aug 2011 18:14:33 +0200 From: Joerg Roedel To: Avi Kivity Subject: Re: kvm PCI assignment & VFIO ramblings Message-ID: <20110830161433.GC5203@8bytes.org> References: <1314119311.2859.59.camel@bling.home> <20110824085213.GB2079@amd.com> <1314198467.2859.192.camel@bling.home> <20110825123146.GD1923@amd.com> <20110826042423.GF2308@yookeroo.fritz.box> <20110826092440.GO1923@amd.com> <4E5A3F18.7050903@redhat.com> <20110828135632.GG8978@8bytes.org> <4E5A4AF0.20707@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii In-Reply-To: <4E5A4AF0.20707@redhat.com> Cc: Alex Williamson , Alexey Kardashevskiy , "kvm@vger.kernel.org" , Paul Mackerras , "Roedel, Joerg" , qemu-devel , Alexander Graf , chrisw , iommu , Anthony Liguori , "linux-pci@vger.kernel.org" , linuxppc-dev , "benve@cisco.com" List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , On Sun, Aug 28, 2011 at 05:04:32PM +0300, Avi Kivity wrote: > On 08/28/2011 04:56 PM, Joerg Roedel wrote: >> This can't be secured by a lock, because it introduces potential >> A->B<-->B->A lock problem when two processes try to take each others mm. >> It could probably be solved by a task->real_mm pointer, havn't thought >> about this yet... >> > > Or a workqueue - you get a kernel thread context with a bit of boilerplate. Right, a workqueue might do the trick. We'll evaluate that. Thanks for the idea :) Joerg From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:54654) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QyQxP-0002Se-1X for qemu-devel@nongnu.org; Tue, 30 Aug 2011 12:14:39 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QyQxO-0008Cl-Bo for qemu-devel@nongnu.org; Tue, 30 Aug 2011 12:14:35 -0400 Received: from 8bytes.org ([88.198.83.132]:55076) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QyQxO-0008CZ-6Y for qemu-devel@nongnu.org; Tue, 30 Aug 2011 12:14:34 -0400 Date: Tue, 30 Aug 2011 18:14:33 +0200 From: Joerg Roedel Message-ID: <20110830161433.GC5203@8bytes.org> References: <1314119311.2859.59.camel@bling.home> <20110824085213.GB2079@amd.com> <1314198467.2859.192.camel@bling.home> <20110825123146.GD1923@amd.com> <20110826042423.GF2308@yookeroo.fritz.box> <20110826092440.GO1923@amd.com> <4E5A3F18.7050903@redhat.com> <20110828135632.GG8978@8bytes.org> <4E5A4AF0.20707@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4E5A4AF0.20707@redhat.com> Subject: Re: [Qemu-devel] kvm PCI assignment & VFIO ramblings List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Avi Kivity Cc: Alex Williamson , Alexey Kardashevskiy , "kvm@vger.kernel.org" , Paul Mackerras , "Roedel, Joerg" , qemu-devel , Alexander Graf , chrisw , iommu , "linux-pci@vger.kernel.org" , linuxppc-dev , "benve@cisco.com" On Sun, Aug 28, 2011 at 05:04:32PM +0300, Avi Kivity wrote: > On 08/28/2011 04:56 PM, Joerg Roedel wrote: >> This can't be secured by a lock, because it introduces potential >> A->B<-->B->A lock problem when two processes try to take each others mm. >> It could probably be solved by a task->real_mm pointer, havn't thought >> about this yet... >> > > Or a workqueue - you get a kernel thread context with a bit of boilerplate. Right, a workqueue might do the trick. We'll evaluate that. Thanks for the idea :) Joerg