From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:45091) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QJGVe-0002er-VJ for qemu-devel@nongnu.org; Sun, 08 May 2011 22:47:47 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QJGVd-0000jM-Tw for qemu-devel@nongnu.org; Sun, 08 May 2011 22:47:46 -0400 Received: from e23smtp09.au.ibm.com ([202.81.31.142]:39831) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QJGVd-0000dS-At for qemu-devel@nongnu.org; Sun, 08 May 2011 22:47:45 -0400 Received: from d23relay05.au.ibm.com (d23relay05.au.ibm.com [202.81.31.247]) by e23smtp09.au.ibm.com (8.14.4/8.13.1) with ESMTP id p492lSaI028293 for ; Mon, 9 May 2011 12:47:28 +1000 Received: from d23av03.au.ibm.com (d23av03.au.ibm.com [9.190.234.97]) by d23relay05.au.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id p492lFc11130730 for ; Mon, 9 May 2011 12:47:17 +1000 Received: from d23av03.au.ibm.com (loopback [127.0.0.1]) by d23av03.au.ibm.com (8.14.4/8.13.1/NCO v10.0 AVout) with ESMTP id p492lPrp006014 for ; Mon, 9 May 2011 12:47:26 +1000 Date: Mon, 9 May 2011 12:06:12 +1000 From: David Gibson Message-ID: <20110509020612.GC20682@yookeroo.fritz.box> References: <20110421070347.GG11968@yookeroo> <67FBBBAD-991F-48D8-901F-490C17B9DBC2@suse.de> <4DB9E2BA.7050602@twiddle.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4DB9E2BA.7050602@twiddle.net> Subject: Re: [Qemu-devel] Supporting emulation of IOMMUs List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Richard Henderson Cc: Anthony Liguori , aik@ozlabs.ru, Joerg.Rodel@amd.com, qemu-devel@nongnu.org, Alexander Graf , eduard.munteanu@linux360.ro On Thu, Apr 28, 2011 at 02:57:14PM -0700, Richard Henderson wrote: > On 04/21/2011 02:39 AM, Alexander Graf wrote: > > How exactly is this going to be used? Also, in the end I think that > > most devices should just go through a PCI specific interface that > > then calls the DMA helpers: > > > > pci_memory_rw(PCIDevice *d, ...) > > > > even if it's only as simple as calling > > > > dma_memory_rw(d->iommu, ...) > > I've had a read through the patches posted in January. It all does > seem relatively sane. At least, I can readily see how I would apply > these interfaces to my Alpha port without trouble. > > I'll agree with Alex though that the raw dma_memory_rw functions > should not be exposed to the drivers for any given bus. They should > always go through {pci,isa}_memory_rw. And these should almost > certainly be inline functions that just pass on &device->bus.mmu. I don't really see the point of having per-bus helpers. This is going to be widespread enough that we can have an iommu pointer in the core qdev, then everything can use the same helpers. -- David Gibson | I'll have my music baroque, and my code david AT gibson.dropbear.id.au | minimalist, thank you. NOT _the_ _other_ | _way_ _around_! http://www.ozlabs.org/~dgibson