From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:45074) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QJGVb-0002b0-IL for qemu-devel@nongnu.org; Sun, 08 May 2011 22:47:44 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QJGVa-0000fu-Fz for qemu-devel@nongnu.org; Sun, 08 May 2011 22:47:43 -0400 Received: from e23smtp02.au.ibm.com ([202.81.31.144]:51019) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QJGVZ-0000cv-Vr for qemu-devel@nongnu.org; Sun, 08 May 2011 22:47:42 -0400 Received: from d23relay05.au.ibm.com (d23relay05.au.ibm.com [202.81.31.247]) by e23smtp02.au.ibm.com (8.14.4/8.13.1) with ESMTP id p492fkJc028770 for ; Mon, 9 May 2011 12:41:46 +1000 Received: from d23av04.au.ibm.com (d23av04.au.ibm.com [9.190.235.139]) by d23relay05.au.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id p492lGsE1188028 for ; Mon, 9 May 2011 12:47:17 +1000 Received: from d23av04.au.ibm.com (loopback [127.0.0.1]) by d23av04.au.ibm.com (8.14.4/8.13.1/NCO v10.0 AVout) with ESMTP id p492lP4t012968 for ; Mon, 9 May 2011 12:47:26 +1000 Date: Mon, 9 May 2011 12:05:12 +1000 From: David Gibson Message-ID: <20110509020512.GB20682@yookeroo.fritz.box> References: <20110421070347.GG11968@yookeroo> <67FBBBAD-991F-48D8-901F-490C17B9DBC2@suse.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <67FBBBAD-991F-48D8-901F-490C17B9DBC2@suse.de> 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, eduard.munteanu@linux360.ro, qemu-devel@nongnu.org On Thu, Apr 21, 2011 at 11:39:22AM +0200, Alexander Graf wrote: > On 21.04.2011, at 09:03, David Gibson wrote: [snip] > > @@ -934,6 +939,8 @@ echo " --enable-docs enable documentation build" > > echo " --disable-docs disable documentation build" > > echo " --disable-vhost-net disable vhost-net acceleration support" > > echo " --enable-vhost-net enable vhost-net acceleration support" > > +echo " --disable-iommu disable IOMMU emulation support" > > +echo " --enable-vhost-net enable IOMMU emulation support" > > eeh? Oops, copy and paste error. Fix in my tree now. [snip] > > +#else > > +struct DMAMmu { > > + DeviceState *iommu; > > + DMATranslateFunc *translate; > > + QLIST_HEAD(memory_maps, DMAMemoryMap) memory_maps; > > +}; > > + > > +struct DMADevice { > > How exactly is this going to be used? Well, the guts of the dma layer is not my work, so I can't really answer that. > 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, ...) So, I was actually thinking it would make most sense to have an iommu pointer in *every* qdev, PCI or otherwise, so that we just use dma_memory_rw(qdev, ...) everywhere. Obviously a NULL iommu pointer would fall back to no translation. -- 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