From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:47126) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UQNYs-0001mZ-KT for qemu-devel@nongnu.org; Thu, 11 Apr 2013 15:53:37 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UQNYp-0005Ky-UH for qemu-devel@nongnu.org; Thu, 11 Apr 2013 15:53:34 -0400 Received: from co1ehsobe003.messaging.microsoft.com ([216.32.180.186]:6507 helo=co1outboundpool.messaging.microsoft.com) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UQNYp-0005KJ-M1 for qemu-devel@nongnu.org; Thu, 11 Apr 2013 15:53:31 -0400 Date: Thu, 11 Apr 2013 14:53:24 -0500 From: Scott Wood In-Reply-To: <20130411125659.GL6858@8bytes.org> (from joro@8bytes.org on Thu Apr 11 07:56:59 2013) Message-ID: <1365710004.3640.8@snotra> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; delsp=Yes; format=Flowed Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] RFC: vfio API changes needed for powerpc (v3) List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Joerg Roedel Cc: Wood Scott-B07421 , "kvm@vger.kernel.org" , "agraf@suse.de" , "qemu-devel@nongnu.org" , Yoder Stuart-B08248 , "iommu@lists.linux-foundation.org" , Bhushan Bharat-R65777 On 04/11/2013 07:56:59 AM, Joerg Roedel wrote: > On Tue, Apr 09, 2013 at 01:22:15AM +0000, Yoder Stuart-B08248 wrote: > > > What happens if a normal unmap call is done on the MSI iova? Do =20 > we > > > need a separate unmap? > > > > I was thinking a normal unmap on an MSI windows would be an =20 > error...but > > I'm not set on that. I put the msi unmap there to make things =20 > symmetric, > > a normal unmap would work as well...and then we could drop the msi =20 > unmap. >=20 > Hmm, this API semantic isn't very clean. When you explicitly map the =20 > MSI > banks a clean API would also allow to unmap them. But that is not > possible in your design because the kernel is responsible for mapping > MSIs and you can't unmap a MSI bank that is in use by the kernel. Why is it not possible to unmap them? Once they've been mapped, =20 they're just like any other IOMMU mapping. If the user breaks MSI for =20 their own devices by unmapping the MSI page, that's their problem. > So since the kernel owns the MSI setup anyways it should also take =20 > care > of mapping the MSI banks. What is the reason to not let the kernel > allocate the MSI banks top-down from the end of the DMA window space? It's less flexible, and possibly more complicated. -Scott=