[Qemu-devel] [PATCH 11/11] Add a memory barrier to DMA functions

2012-06-26 Thread Benjamin Herrenschmidt
The emulated devices can run simultaneously with the guest, so we need to be careful with ordering of load and stores done by them to the guest system memory, which need to be observed in the right order by the guest operating system. This adds a barrier call to the basic DMA read/write ops which

Re: [Qemu-devel] [PATCH 11/11] Add a memory barrier to DMA functions

2012-06-24 Thread Benjamin Herrenschmidt
On Sun, 2012-06-24 at 06:03 +, Blue Swirl wrote: > > + * A smarter implementation can be devised if needed to > > + * use lighter barriers based on the direction of the > > + * transfer, the DMA context, etc... > > + */ > > +if (kvm_enabled()) > > +smp_mb(); > > Mis

Re: [Qemu-devel] [PATCH 11/11] Add a memory barrier to DMA functions

2012-06-23 Thread Blue Swirl
On Fri, Jun 22, 2012 at 3:29 AM, Benjamin Herrenschmidt wrote: > The emulated devices can run simultaneously with the guest, so > we need to be careful with ordering of load and stores done by > them to the guest system memory, which need to be observed in > the right order by the guest operating

[Qemu-devel] [PATCH 11/11] Add a memory barrier to DMA functions

2012-06-21 Thread Benjamin Herrenschmidt
The emulated devices can run simultaneously with the guest, so we need to be careful with ordering of load and stores done by them to the guest system memory, which need to be observed in the right order by the guest operating system. This adds a barrier call to the basic DMA read/write ops which