Re: [Qemu-devel] [RFC v3 PATCH 14/14] target-i386: Generate fences for x86

2016-06-22 Thread Sergey Fedorov
On 21/06/16 21:03, Pranith Kumar wrote: > On Tue, Jun 21, 2016 at 1:54 PM, Peter Maydell > wrote: >> On 21 June 2016 at 18:28, Pranith Kumar wrote: >>> Reg. the second point, I did consider this situation of running x86 on >>> ARM where such barriers are necessary for correctness. But, I am >>>

Re: [Qemu-devel] [RFC v3 PATCH 14/14] target-i386: Generate fences for x86

2016-06-21 Thread Alex Bennée
Pranith Kumar writes: > On Tue, Jun 21, 2016 at 1:54 PM, Peter Maydell > wrote: >> On 21 June 2016 at 18:28, Pranith Kumar wrote: >>> Reg. the second point, I did consider this situation of running x86 on >>> ARM where such barriers are necessary for correctness. But, I am >>> really apprehen

Re: [Qemu-devel] [RFC v3 PATCH 14/14] target-i386: Generate fences for x86

2016-06-21 Thread Pranith Kumar
On Tue, Jun 21, 2016 at 1:54 PM, Peter Maydell wrote: > On 21 June 2016 at 18:28, Pranith Kumar wrote: >> Reg. the second point, I did consider this situation of running x86 on >> ARM where such barriers are necessary for correctness. But, I am >> really apprehensive of the cost it will impose. I

Re: [Qemu-devel] [RFC v3 PATCH 14/14] target-i386: Generate fences for x86

2016-06-21 Thread Peter Maydell
On 21 June 2016 at 18:28, Pranith Kumar wrote: > Reg. the second point, I did consider this situation of running x86 on > ARM where such barriers are necessary for correctness. But, I am > really apprehensive of the cost it will impose. I am not sure if there > are any alternative solutions to avo

Re: [Qemu-devel] [RFC v3 PATCH 14/14] target-i386: Generate fences for x86

2016-06-21 Thread Pranith Kumar
On Tue, Jun 21, 2016 at 3:28 AM, Paolo Bonzini wrote: > > > On 18/06/2016 06:03, Pranith Kumar wrote: >> Signed-off-by: Pranith Kumar >> --- >> target-i386/translate.c | 4 >> 1 file changed, 4 insertions(+) >> >> diff --git a/target-i386/translate.c b/target-i386/translate.c >> index bf33e

Re: [Qemu-devel] [RFC v3 PATCH 14/14] target-i386: Generate fences for x86

2016-06-21 Thread Paolo Bonzini
On 21/06/2016 18:23, Richard Henderson wrote: > On 06/21/2016 09:12 AM, Paolo Bonzini wrote: >> >> >> On 21/06/2016 17:57, Richard Henderson wrote: > > || (prefixes & PREFIX_LOCK)) { > goto illegal_op; > } > +tcg_gen_m

Re: [Qemu-devel] [RFC v3 PATCH 14/14] target-i386: Generate fences for x86

2016-06-21 Thread Richard Henderson
On 06/21/2016 09:12 AM, Paolo Bonzini wrote: On 21/06/2016 17:57, Richard Henderson wrote: || (prefixes & PREFIX_LOCK)) { goto illegal_op; } +tcg_gen_mb(TCG_MO_ST_ST | TCG_BAR_SC); break; case 0xe8 ... 0xef: /* l

Re: [Qemu-devel] [RFC v3 PATCH 14/14] target-i386: Generate fences for x86

2016-06-21 Thread Paolo Bonzini
On 21/06/2016 17:57, Richard Henderson wrote: >>> >>> || (prefixes & PREFIX_LOCK)) { >>> goto illegal_op; >>> } >>> +tcg_gen_mb(TCG_MO_ST_ST | TCG_BAR_SC); >>> break; >>> case 0xe8 ... 0xef: /* lfence */ >>> +

Re: [Qemu-devel] [RFC v3 PATCH 14/14] target-i386: Generate fences for x86

2016-06-21 Thread Richard Henderson
On 06/21/2016 12:28 AM, Paolo Bonzini wrote: On 18/06/2016 06:03, Pranith Kumar wrote: Signed-off-by: Pranith Kumar --- target-i386/translate.c | 4 1 file changed, 4 insertions(+) diff --git a/target-i386/translate.c b/target-i386/translate.c index bf33e6b..32b0f5c 100644 --- a/target

Re: [Qemu-devel] [RFC v3 PATCH 14/14] target-i386: Generate fences for x86

2016-06-21 Thread Paolo Bonzini
On 18/06/2016 06:03, Pranith Kumar wrote: > Signed-off-by: Pranith Kumar > --- > target-i386/translate.c | 4 > 1 file changed, 4 insertions(+) > > diff --git a/target-i386/translate.c b/target-i386/translate.c > index bf33e6b..32b0f5c 100644 > --- a/target-i386/translate.c > +++ b/target

Re: [Qemu-devel] [RFC v3 PATCH 14/14] target-i386: Generate fences for x86

2016-06-20 Thread Pranith Kumar
On Sat, Jun 18, 2016 at 1:48 AM, Richard Henderson wrote: > On 06/17/2016 09:03 PM, Pranith Kumar wrote: >> >> case 0xe8 ... 0xef: /* lfence */ >> +tcg_gen_mb(TCG_MO_LD_LD | TCG_BAR_SC); >> +break; >> case 0xf0 ... 0xf7: /* mfence */ >> if (!(

Re: [Qemu-devel] [RFC v3 PATCH 14/14] target-i386: Generate fences for x86

2016-06-17 Thread Richard Henderson
On 06/17/2016 09:03 PM, Pranith Kumar wrote: case 0xe8 ... 0xef: /* lfence */ +tcg_gen_mb(TCG_MO_LD_LD | TCG_BAR_SC); +break; case 0xf0 ... 0xf7: /* mfence */ if (!(s->cpuid_features & CPUID_SSE2) || (prefixes & PREFIX_LOCK))

[Qemu-devel] [RFC v3 PATCH 14/14] target-i386: Generate fences for x86

2016-06-17 Thread Pranith Kumar
Signed-off-by: Pranith Kumar --- target-i386/translate.c | 4 1 file changed, 4 insertions(+) diff --git a/target-i386/translate.c b/target-i386/translate.c index bf33e6b..32b0f5c 100644 --- a/target-i386/translate.c +++ b/target-i386/translate.c @@ -8012,13 +8012,17 @@ static target_ulong