From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:39133) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ShSbl-0007Fe-EH for qemu-devel@nongnu.org; Wed, 20 Jun 2012 17:38:38 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ShSbj-0000Qe-P9 for qemu-devel@nongnu.org; Wed, 20 Jun 2012 17:38:37 -0400 Received: from mail-pb0-f45.google.com ([209.85.160.45]:34529) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ShSbj-0000QR-Il for qemu-devel@nongnu.org; Wed, 20 Jun 2012 17:38:35 -0400 Received: by pbbro12 with SMTP id ro12so1207158pbb.4 for ; Wed, 20 Jun 2012 14:38:34 -0700 (PDT) Message-ID: <4FE242D6.4060709@codemonkey.ws> Date: Wed, 20 Jun 2012 16:38:30 -0500 From: Anthony Liguori MIME-Version: 1.0 References: <1340087992-2399-1-git-send-email-benh@kernel.crashing.org> <1340087992-2399-4-git-send-email-benh@kernel.crashing.org> <4FE23DBF.9040706@codemonkey.ws> <20120620213217.GA25850@redhat.com> In-Reply-To: <20120620213217.GA25850@redhat.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH 03/13] iommu: Add universal DMA helper functions List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: "Michael S. Tsirkin" Cc: Richard Henderson , Eduard - Gabriel Munteanu , qemu-devel@nongnu.org, David Gibson On 06/20/2012 04:32 PM, Michael S. Tsirkin wrote: > On Wed, Jun 20, 2012 at 04:16:47PM -0500, Anthony Liguori wrote: >>> diff --git a/hw/pci.h b/hw/pci.h >>> index 7f223c0..ee669d9 100644 >>> --- a/hw/pci.h >>> +++ b/hw/pci.h >>> @@ -558,10 +558,16 @@ static inline uint32_t pci_config_size(const PCIDevice *d) >>> } >>> >>> /* DMA access functions */ >>> +static inline DMAContext *pci_dma_context(PCIDevice *dev) >>> +{ >>> + /* Stub for when we have no PCI iommu support */ >>> + return NULL; >>> +} >> >> Why is all of this stuff static inline? > > Let's face it, most people don't need an MMU in their VM. > inline stubs help make double sure we are not adding > overhead for the sake of this niche case. It also makes for an overly complex pci.h with no obvious performance justification. Let's not prematurely optimize here. Regards, Anthony Liguori >