[Qemu-devel] Re: [patch uq/master 2/2] kvm-all.c: define smp_wmb and use it for coalesced mmio

2010-02-22 Thread Avi Kivity
On 02/22/2010 06:57 PM, Marcelo Tosatti wrote: Acked-by: "Michael S. Tsirkin" Signed-off-by: Marcelo Tosatti Applied, thanks. -- error compiling committee.c: too many arguments to function

[Qemu-devel] Re: [patch uq/master 2/2] kvm-all.c: define smp_wmb and use it for coalesced mmio

2010-02-22 Thread Marcelo Tosatti
Acked-by: "Michael S. Tsirkin" Signed-off-by: Marcelo Tosatti Index: qemu/kvm-all.c === --- qemu.orig/kvm-all.c +++ qemu/kvm-all.c @@ -21,6 +21,7 @@ #include #include "qemu-common.h" +#include "qemu-barrier.h" #include "sysem

[Qemu-devel] Re: [patch uq/master 2/2] kvm-all.c: define smp_wmb and use it for coalesced mmio

2010-02-22 Thread Avi Kivity
On 02/22/2010 05:08 PM, Michael S. Tsirkin wrote: I imagine all arches need an instruction. For reads as well. Note, gcc has a __sync_synchronize() builtin that compiles to mfence on x86. We might use that as a baseline for both rmb and wmb, and let each arch override it incrementally.

[Qemu-devel] Re: [patch uq/master 2/2] kvm-all.c: define smp_wmb and use it for coalesced mmio

2010-02-22 Thread Michael S. Tsirkin
On Mon, Feb 22, 2010 at 05:08:00PM +0200, Avi Kivity wrote: > On 02/22/2010 04:57 PM, Michael S. Tsirkin wrote: >> >> There is no need (for this case). Older read cannot be reordered with write, writes are not reordered with other writes, writes by a single processor are observed

[Qemu-devel] Re: [patch uq/master 2/2] kvm-all.c: define smp_wmb and use it for coalesced mmio

2010-02-22 Thread Avi Kivity
On 02/22/2010 04:57 PM, Michael S. Tsirkin wrote: There is no need (for this case). Older read cannot be reordered with write, writes are not reordered with other writes, writes by a single processor are observed in the same order by all processors. Well, Linux does use sfence.

[Qemu-devel] Re: [patch uq/master 2/2] kvm-all.c: define smp_wmb and use it for coalesced mmio

2010-02-22 Thread Michael S. Tsirkin
On Mon, Feb 22, 2010 at 04:57:29PM +0200, Avi Kivity wrote: > On 02/22/2010 04:45 PM, Marcelo Tosatti wrote: >> On Mon, Feb 22, 2010 at 04:23:32PM +0200, Avi Kivity wrote: >> >>> On 02/22/2010 03:59 PM, Marcelo Tosatti wrote: >>> Cc: "Michael S. Tsirkin" Signed-off-by: Marcelo T

[Qemu-devel] Re: [patch uq/master 2/2] kvm-all.c: define smp_wmb and use it for coalesced mmio

2010-02-22 Thread Avi Kivity
On 02/22/2010 04:45 PM, Marcelo Tosatti wrote: On Mon, Feb 22, 2010 at 04:23:32PM +0200, Avi Kivity wrote: On 02/22/2010 03:59 PM, Marcelo Tosatti wrote: Cc: "Michael S. Tsirkin" Signed-off-by: Marcelo Tosatti Index: qemu/kvm-all.c

[Qemu-devel] Re: [patch uq/master 2/2] kvm-all.c: define smp_wmb and use it for coalesced mmio

2010-02-22 Thread Michael S. Tsirkin
On Mon, Feb 22, 2010 at 10:59:08AM -0300, Marcelo Tosatti wrote: > Cc: "Michael S. Tsirkin" > Signed-off-by: Marcelo Tosatti Acked-by: Michael S. Tsirkin We'll need implementation for other arches, I'll dust off my patch that adds it and repost, but for now this is better than what we have. >

[Qemu-devel] Re: [patch uq/master 2/2] kvm-all.c: define smp_wmb and use it for coalesced mmio

2010-02-22 Thread Marcelo Tosatti
On Mon, Feb 22, 2010 at 04:23:32PM +0200, Avi Kivity wrote: > On 02/22/2010 03:59 PM, Marcelo Tosatti wrote: > >Cc: "Michael S. Tsirkin" > >Signed-off-by: Marcelo Tosatti > > > >Index: qemu/kvm-all.c > >=== > >--- qemu.orig/kvm-all.c >

[Qemu-devel] Re: [patch uq/master 2/2] kvm-all.c: define smp_wmb and use it for coalesced mmio

2010-02-22 Thread Avi Kivity
On 02/22/2010 03:59 PM, Marcelo Tosatti wrote: Cc: "Michael S. Tsirkin" Signed-off-by: Marcelo Tosatti Index: qemu/kvm-all.c === --- qemu.orig/kvm-all.c +++ qemu/kvm-all.c @@ -718,6 +718,9 @@ static int kvm_handle_io(uint16_t port,