From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:35610) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QFZvN-0003H7-SU for qemu-devel@nongnu.org; Thu, 28 Apr 2011 18:43:06 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QFZvK-0004mN-0e for qemu-devel@nongnu.org; Thu, 28 Apr 2011 18:43:05 -0400 Received: from a.mail.sonic.net ([64.142.16.245]:43175) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QFZvI-0004lZ-7D for qemu-devel@nongnu.org; Thu, 28 Apr 2011 18:43:01 -0400 Message-ID: <4DB9E2BA.7050602@twiddle.net> Date: Thu, 28 Apr 2011 14:57:14 -0700 From: Richard Henderson MIME-Version: 1.0 References: <20110421070347.GG11968@yookeroo> <67FBBBAD-991F-48D8-901F-490C17B9DBC2@suse.de> In-Reply-To: <67FBBBAD-991F-48D8-901F-490C17B9DBC2@suse.de> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] Supporting emulation of IOMMUs List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Alexander Graf Cc: Anthony Liguori , aik@ozlabs.ru, Joerg.Rodel@amd.com, qemu-devel@nongnu.org, eduard.munteanu@linux360.ro, David Gibson 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. r~