qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH 03/13] iommu: Add universal DMA helper functions


From: Anthony Liguori
Subject: Re: [Qemu-devel] [PATCH 03/13] iommu: Add universal DMA helper functions
Date: Wed, 20 Jun 2012 16:38:30 -0500
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:11.0) Gecko/20120329 Thunderbird/11.0.1

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






reply via email to

[Prev in Thread] Current Thread [Next in Thread]