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