From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:38656) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RLMiN-0004o7-LS for qemu-devel@nongnu.org; Tue, 01 Nov 2011 18:21:52 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RLMiM-0000fA-IT for qemu-devel@nongnu.org; Tue, 01 Nov 2011 18:21:51 -0400 Received: from mail-gx0-f173.google.com ([209.85.161.173]:47126) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RLMiM-0000ez-7M for qemu-devel@nongnu.org; Tue, 01 Nov 2011 18:21:50 -0400 Received: by ggnr5 with SMTP id r5so9295025ggn.4 for ; Tue, 01 Nov 2011 15:21:49 -0700 (PDT) Message-ID: <4EB070FA.9040104@codemonkey.ws> Date: Tue, 01 Nov 2011 17:21:46 -0500 From: Anthony Liguori MIME-Version: 1.0 References: <1320041218-30487-1-git-send-email-david@gibson.dropbear.id.au> <1320041218-30487-2-git-send-email-david@gibson.dropbear.id.au> In-Reply-To: <1320041218-30487-2-git-send-email-david@gibson.dropbear.id.au> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH 01/14] Define DMA address and direction types List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: David Gibson Cc: mst@redhat.com, joerg.roedel@amd.com, agraf@suse.de, qemu-devel@nongnu.org, avi@redhat.com, eduard.munteanu@linux360.ro, rth@twiddle.net On 10/31/2011 01:06 AM, David Gibson wrote: > As a preliminary to adding more extensive DMA and IOMMU infrastructure > support into qemu, this patch defines a dma_addr_t for storing DMA bus > addresses and a DMADirection enum which describes whether a DMA is > from an external device to main memory or from main memory to an > external device. > > For now dma_addr_t is just defined to be target_phys_addr_t, but in > future, we can change this to support machines where we have bus > addresses which don't necessarily have the same format as CPU physical > addresses. > > Signed-off-by: David Gibson Applied all. Thanks. Regards, Anthony Liguori > --- > dma.h | 9 +++++++++ > 1 files changed, 9 insertions(+), 0 deletions(-) > > diff --git a/dma.h b/dma.h > index 2bdc236..56e163a 100644 > --- a/dma.h > +++ b/dma.h > @@ -18,6 +18,15 @@ > typedef struct ScatterGatherEntry ScatterGatherEntry; > > #if defined(TARGET_PHYS_ADDR_BITS) > +typedef target_phys_addr_t dma_addr_t; > + > +#define DMA_ADDR_FMT TARGET_FMT_plx > + > +typedef enum { > + DMA_DIRECTION_TO_DEVICE = 0, > + DMA_DIRECTION_FROM_DEVICE = 1, > +} DMADirection; > + > struct ScatterGatherEntry { > target_phys_addr_t base; > target_phys_addr_t len;