From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:53257) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QSB5O-0003xu-FD for qemu-devel@nongnu.org; Thu, 02 Jun 2011 12:49:31 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QSB5N-0004Ws-3R for qemu-devel@nongnu.org; Thu, 02 Jun 2011 12:49:30 -0400 Received: from mail-yw0-f45.google.com ([209.85.213.45]:50289) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QSB5M-0004Wm-PW for qemu-devel@nongnu.org; Thu, 02 Jun 2011 12:49:28 -0400 Received: by ywl41 with SMTP id 41so488071ywl.4 for ; Thu, 02 Jun 2011 09:49:28 -0700 (PDT) Sender: Richard Henderson Message-ID: <4DE7BF15.9020004@twiddle.net> Date: Thu, 02 Jun 2011 09:49:25 -0700 From: Richard Henderson MIME-Version: 1.0 References: <1307027562-3460-1-git-send-email-david@gibson.dropbear.id.au> <1307027562-3460-3-git-send-email-david@gibson.dropbear.id.au> In-Reply-To: <1307027562-3460-3-git-send-email-david@gibson.dropbear.id.au> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH 02/14] pci: add IOMMU support via the generic DMA layer List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: David Gibson Cc: qemu-devel@nongnu.org, eduard.munteanu@linux360.ro On 06/02/2011 08:12 AM, David Gibson wrote: > --- a/hw/pci_internals.h > +++ b/hw/pci_internals.h > @@ -14,8 +14,15 @@ > > extern struct BusInfo pci_bus_info; > > +typedef DMAMmu *(*pci_iommu_new_device_fn)(PCIBus *); > + > +struct PCIBusIOMMU { > + pci_iommu_new_device_fn new_device; > +}; > + > struct PCIBus { > BusState qbus; > + PCIBusIOMMU *iommu; Is there a reason that you put PCIBusIOMMU here and not in pci.h? At present, the only users of pci_internals.h are the core pci implementation files, not pci host bridges, not pci devices. Modulo that, I can live with this arrangement. r~