[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [RFC/PATCH] Add a memory barrier to guest memory access
From: |
David Gibson |
Subject: |
Re: [Qemu-devel] [RFC/PATCH] Add a memory barrier to guest memory access functions |
Date: |
Thu, 17 May 2012 13:35:20 +1000 |
User-agent: |
Mutt/1.5.21 (2010-09-15) |
On Wed, May 16, 2012 at 09:28:39PM -0500, Anthony Liguori wrote:
> On 05/16/2012 07:52 PM, Benjamin Herrenschmidt wrote:
[snip]
> >@@ -2794,6 +2795,9 @@ void *qemu_get_ram_ptr(ram_addr_t addr)
> > {
> > RAMBlock *block;
> >
> >+ /* We ensure ordering for all DMA transactions */
> >+ dma_mb();
> >+
>
> I get being conservative, but I don't think this makes a lot of
> sense. There are cases where the return of this function is cached
> (like the VGA ram area). I think it would make more sense if you
> explicitly put a barrier after write operations.
I tend to agree. I think the barriers should be in
cpu_physical_memory_rw() and the st*_phys() functions.
--
David Gibson | I'll have my music baroque, and my code
david AT gibson.dropbear.id.au | minimalist, thank you. NOT _the_ _other_
| _way_ _around_!
http://www.ozlabs.org/~dgibson
- Re: [Qemu-devel] [PATCH 13/13] iommu: Add a memory barrier to DMA RW function, (continued)
- 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
- Re: [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/17
- Re: [Qemu-devel] [RFC/PATCH] Add a memory barrier to guest memory access functions, Benjamin Herrenschmidt, 2012/05/17
- Re: [Qemu-devel] [RFC/PATCH] Add a memory barrier to guest memory access functions, David Gibson, 2012/05/17
- Re: [Qemu-devel] [RFC/PATCH] Add a memory barrier to guest memory access functions,
David Gibson <=
- Re: [Qemu-devel] [PATCH 13/13] iommu: Add a memory barrier to DMA RW function, Paolo Bonzini, 2012/05/18
- Re: [Qemu-devel] [PATCH 13/13] iommu: Add a memory barrier to DMA RW function, Benjamin Herrenschmidt, 2012/05/18
- Re: [Qemu-devel] [PATCH 13/13] iommu: Add a memory barrier to DMA RW function, Paolo Bonzini, 2012/05/18
- Re: [Qemu-devel] [PATCH 13/13] iommu: Add a memory barrier to DMA RW function, Benjamin Herrenschmidt, 2012/05/18
- Re: [Qemu-devel] [PATCH 13/13] iommu: Add a memory barrier to DMA RW function, Paolo Bonzini, 2012/05/19
- Re: [Qemu-devel] [PATCH 13/13] iommu: Add a memory barrier to DMA RW function, Benjamin Herrenschmidt, 2012/05/20
- [Qemu-devel] [PATCH] Add a memory barrier to guest memory access functions, Benjamin Herrenschmidt, 2012/05/20
- Re: [Qemu-devel] [PATCH] Add a memory barrier to guest memory access functions, Paolo Bonzini, 2012/05/21
- Re: [Qemu-devel] [PATCH] Add a memory barrier to guest memory access functions, Michael S. Tsirkin, 2012/05/21
- Re: [Qemu-devel] [PATCH] Add a memory barrier to guest memory access functions, Benjamin Herrenschmidt, 2012/05/21