Re: [Qemu-devel] [PATCH 04/30] add a header file for atomic operations

2013-07-03 Thread liu ping fan
On Mon, Jul 1, 2013 at 9:20 PM, Anthony Liguori wrote: > Paolo Bonzini writes: > >> Il 01/07/2013 15:00, Anthony Liguori ha scritto: I > cannot find the commit exactly, but I think mst added specific code for > that. >>> Right, I'm not questioning whether these functions have stron

Re: [Qemu-devel] [PATCH 04/30] add a header file for atomic operations

2013-07-03 Thread liu ping fan
On Wed, Jul 3, 2013 at 1:59 PM, Paolo Bonzini wrote: > Il 03/07/2013 04:24, liu ping fan ha scritto: >>> > +- atomic operations in Linux are always on a 32-bit int type and >> 32-bit? int should be the integer type that the target processor is >> most efficient working with. > > Has Linux ever be

Re: [Qemu-devel] [PATCH 04/30] add a header file for atomic operations

2013-07-02 Thread Paolo Bonzini
Il 03/07/2013 04:24, liu ping fan ha scritto: >> > +- atomic operations in Linux are always on a 32-bit int type and > 32-bit? int should be the integer type that the target processor is > most efficient working with. Has Linux ever been ported to a machine where sizeof(int) != 4? (Honest questi

Re: [Qemu-devel] [PATCH 04/30] add a header file for atomic operations

2013-07-02 Thread liu ping fan
On Sat, Jun 29, 2013 at 2:26 AM, Paolo Bonzini wrote: > We're already using them in several places, but __sync builtins are just > too ugly to type, and do not provide seqcst load/store operations. > > Signed-off-by: Paolo Bonzini > --- > docs/atomics.txt | 345 > +++

Re: [Qemu-devel] [PATCH 04/30] add a header file for atomic operations

2013-07-01 Thread Anthony Liguori
Paolo Bonzini writes: > Il 01/07/2013 15:00, Anthony Liguori ha scritto: >>> I >>> > cannot find the commit exactly, but I think mst added specific code for >>> > that. >> Right, I'm not questioning whether these functions have strong enough >> semantics in their implementation, but asking what t

Re: [Qemu-devel] [PATCH 04/30] add a header file for atomic operations

2013-07-01 Thread Paolo Bonzini
Il 01/07/2013 15:00, Anthony Liguori ha scritto: >> I >> > cannot find the commit exactly, but I think mst added specific code for >> > that. > Right, I'm not questioning whether these functions have strong enough > semantics in their implementation, but asking what their contract should > be. > >

Re: [Qemu-devel] [PATCH 04/30] add a header file for atomic operations

2013-07-01 Thread Anthony Liguori
Paolo Bonzini writes: > Il 28/06/2013 22:41, Anthony Liguori ha scritto: >> Tiny copy/paste error here: s/qemu memory/memory/g". >> >> One thing I've been thinking about reviewing this code, what should we >> be doing in virtio.c? >> >> We have barriers but we're relying on st[u][wlb]_phys havi

Re: [Qemu-devel] [PATCH 04/30] add a header file for atomic operations

2013-07-01 Thread Peter Maydell
On 28 June 2013 21:41, Anthony Liguori wrote: > One thing I've been thinking about reviewing this code, what should we > be doing in virtio.c? > > We have barriers but we're relying on st[u][wlb]_phys having atomic > semantics. I think it's okay in practice but if we're taking a more > diligent a

Re: [Qemu-devel] [PATCH 04/30] add a header file for atomic operations

2013-07-01 Thread Paolo Bonzini
Il 28/06/2013 22:41, Anthony Liguori ha scritto: > Tiny copy/paste error here: s/qemu memory/memory/g". > > One thing I've been thinking about reviewing this code, what should we > be doing in virtio.c? > > We have barriers but we're relying on st[u][wlb]_phys having atomic > semantics. I think

Re: [Qemu-devel] [PATCH 04/30] add a header file for atomic operations

2013-06-28 Thread Anthony Liguori
Paolo Bonzini writes: > We're already using them in several places, but __sync builtins are just > too ugly to type, and do not provide seqcst load/store operations. > > Signed-off-by: Paolo Bonzini > --- > docs/atomics.txt | 345 > +++ > hw/

[Qemu-devel] [PATCH 04/30] add a header file for atomic operations

2013-06-28 Thread Paolo Bonzini
We're already using them in several places, but __sync builtins are just too ugly to type, and do not provide seqcst load/store operations. Signed-off-by: Paolo Bonzini --- docs/atomics.txt | 345 +++ hw/display/qxl.c | 3 +- hw/virti