[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: |
Benjamin Herrenschmidt |
Subject: |
Re: [Qemu-devel] [RFC/PATCH] Add a memory barrier to guest memory access functions |
Date: |
Fri, 18 May 2012 11:16:27 +1000 |
On Thu, 2012-05-17 at 17:09 -0500, Anthony Liguori wrote:
> ld/st should not ever be used by device emulation because they use a concept
> of
> "target endianness" that doesn't exist for devices.
Hrm, there's a bit of both, some of them even have explicit endianness
arguments and some of them are definitely used by bits of hw/*
virtio core uses them directly as well but then virtio also does
explicit barriers (though I need to double check whether it does enough
of them in all the right places).
> So no, I don't think you need to put barriers there as they should only be
> used
> by VCPU emulation code.
I'm ok to leave them alone for now, I'll give a quick look at the
various callers.
> > Note that with the above, cpu_physical_memory_map and unmap will
> > imply a barrier when using bounce buffers, it would make sense to also
> > provide the same barrier when not.
> >
> > That does actually make sense for the same reason explained above,
> > ie, when those are used for a DMA transfer via async IO, that guarantees
> > ordering of the "block" vs. surrounding accesses even if accesses within
> > the actual map/unmap region are not ordered vs. each other.
> >
> > Any objection ?
>
> I think so. I'd like to see a better comment about barrier usage at the top
> of
> the file or something like that too.
Ok.
Cheers,
Ben.
> Regards,
>
> Anthony Liguori
>
> >
> > Cheers,
> > Ben.
> >
> >
> >
- 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 <=
- 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, 2012/05/16
- 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