[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 13/13] iommu: Add a memory barrier to DMA RW fun
From: |
Benjamin Herrenschmidt |
Subject: |
Re: [Qemu-devel] [PATCH 13/13] iommu: Add a memory barrier to DMA RW function |
Date: |
Tue, 15 May 2012 11:11:54 +1000 |
On Mon, 2012-05-14 at 19:52 -0500, Anthony Liguori wrote:
> >
> > diff --git a/dma-helpers.c b/dma-helpers.c
> > index 36fa963..4350cdf 100644
> > --- a/dma-helpers.c
> > +++ b/dma-helpers.c
> > @@ -312,6 +312,9 @@ int iommu_dma_memory_rw(DMAContext *dma, dma_addr_t
> > addr,
> > buf += plen;
> > }
> >
> > + /* HACK: full memory barrier here */
> > + __sync_synchronize();
>
> I thought you were going to limit this to the TCE iommu?
I can I suppose but technically speaking, this isn't an attribute of the
iommu... in fact, from a model standpoint, it should be in the pci_*
accessors since PCI transactions are ordered (at least to some extent,
let's not get into relaxed ordering etc... at this stage).
It was just easier to stick it in the above function for now, which
handles all known cases... I'm happy to move it to the TCE backend if
you prefer for now but I can see that problem hitting other
architectures such as ARM or even on powerpc, hitting emulated PCI on
Alex "usermode" KVM using the Mac99 machine model which doesn't use TCEs
etc....
Cheers,
Ben.
- Re: [Qemu-devel] [PATCH 08/13] iommu: Introduce IOMMU emulation infrastructure, (continued)
- Re: [Qemu-devel] [PATCH 08/13] iommu: Introduce IOMMU emulation infrastructure, Anthony Liguori, 2012/05/15
- Re: [Qemu-devel] [PATCH 08/13] iommu: Introduce IOMMU emulation infrastructure, Benjamin Herrenschmidt, 2012/05/15
- Re: [Qemu-devel] [PATCH 08/13] iommu: Introduce IOMMU emulation infrastructure, Anthony Liguori, 2012/05/15
- Re: [Qemu-devel] [PATCH 08/13] iommu: Introduce IOMMU emulation infrastructure, Benjamin Herrenschmidt, 2012/05/15
- Re: [Qemu-devel] [PATCH 08/13] iommu: Introduce IOMMU emulation infrastructure, Anthony Liguori, 2012/05/16
[Qemu-devel] [PATCH 12/13] pseries: Implement IOMMU and DMA for PAPR PCI devices, Benjamin Herrenschmidt, 2012/05/10
[Qemu-devel] [PATCH 10/13] pseries: Convert sPAPR TCEs to use generic IOMMU infrastructure, Benjamin Herrenschmidt, 2012/05/10
[Qemu-devel] [PATCH 11/13] iommu: Allow PCI to use IOMMU infrastructure, Benjamin Herrenschmidt, 2012/05/10
[Qemu-devel] [PATCH 13/13] iommu: Add a memory barrier to DMA RW function, Benjamin Herrenschmidt, 2012/05/10
- Re: [Qemu-devel] [PATCH 13/13] iommu: Add a memory barrier to DMA RW function, Anthony Liguori, 2012/05/14
- Re: [Qemu-devel] [PATCH 13/13] iommu: Add a memory barrier to DMA RW function,
Benjamin Herrenschmidt <=
- Re: [Qemu-devel] [PATCH 13/13] iommu: Add a memory barrier to DMA RW function, David Gibson, 2012/05/14
- Re: [Qemu-devel] [PATCH 13/13] iommu: Add a memory barrier to DMA RW function, Benjamin Herrenschmidt, 2012/05/16
- Re: [Qemu-devel] [PATCH 13/13] iommu: Add a memory barrier to DMA RW function, David Gibson, 2012/05/16
- Re: [Qemu-devel] [PATCH 13/13] iommu: Add a memory barrier to DMA RW function, Anthony Liguori, 2012/05/16
- Re: [Qemu-devel] [PATCH 13/13] iommu: Add a memory barrier to DMA RW function, Benjamin Herrenschmidt, 2012/05/16
- Re: [Qemu-devel] [PATCH 13/13] iommu: Add a memory barrier to DMA RW function, Benjamin Herrenschmidt, 2012/05/16
- Re: [Qemu-devel] [PATCH 13/13] iommu: Add a memory barrier to DMA RW function, Benjamin Herrenschmidt, 2012/05/16
- Re: [Qemu-devel] [PATCH 13/13] iommu: Add a memory barrier to DMA RW function, Benjamin Herrenschmidt, 2012/05/16
- [Qemu-devel] [RFC/PATCH] Add a memory barrier to guest memory access functions, Benjamin Herrenschmidt, 2012/05/16
- Re: [Qemu-devel] [RFC/PATCH] Add a memory barrier to guest memory access functions, Anthony Liguori, 2012/05/16