From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:54390) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bFoHW-0007jR-Kw for qemu-devel@nongnu.org; Wed, 22 Jun 2016 15:57:51 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bFoHS-0005fS-DY for qemu-devel@nongnu.org; Wed, 22 Jun 2016 15:57:49 -0400 Received: from mail-lf0-x241.google.com ([2a00:1450:4010:c07::241]:36765) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bFoHS-0005fN-5Y for qemu-devel@nongnu.org; Wed, 22 Jun 2016 15:57:46 -0400 Received: by mail-lf0-x241.google.com with SMTP id a2so15345357lfe.3 for ; Wed, 22 Jun 2016 12:57:45 -0700 (PDT) References: <20160618040343.19517-1-bobby.prani@gmail.com> <20160618040343.19517-11-bobby.prani@gmail.com> From: Sergey Fedorov Message-ID: <576AEDB7.9040004@gmail.com> Date: Wed, 22 Jun 2016 22:57:43 +0300 MIME-Version: 1.0 In-Reply-To: <20160618040343.19517-11-bobby.prani@gmail.com> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [RFC v3 PATCH 10/14] tcg/tci: Add support for fence List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Pranith Kumar , Stefan Weil , Richard Henderson , "open list:All patches CC here" Cc: alex.bennee@linaro.org On 18/06/16 07:03, Pranith Kumar wrote: > Cc: Stefan Weil > Signed-off-by: Richard Henderson > Signed-off-by: Pranith Kumar > --- > tcg/tci/tcg-target.inc.c | 3 +++ > tci.c | 3 +++ > 2 files changed, 6 insertions(+) > > diff --git a/tcg/tci/tcg-target.inc.c b/tcg/tci/tcg-target.inc.c > index fa74d52..8e950df 100644 > --- a/tcg/tci/tcg-target.inc.c > +++ b/tcg/tci/tcg-target.inc.c > @@ -255,6 +255,7 @@ static const TCGTargetOpDef tcg_target_op_defs[] = { > { INDEX_op_bswap32_i32, { R, R } }, > #endif > > + { INDEX_op_mb, { } }, > { -1 }, > }; > > @@ -800,6 +801,8 @@ static void tcg_out_op(TCGContext *s, TCGOpcode opc, const TCGArg *args, > } > tcg_out_i(s, *args++); > break; > + case INDEX_op_mb: > + break; > case INDEX_op_mov_i32: /* Always emitted via tcg_out_mov. */ > case INDEX_op_mov_i64: > case INDEX_op_movi_i32: /* Always emitted via tcg_out_movi. */ > diff --git a/tci.c b/tci.c > index b488c0d..4081e61 100644 > --- a/tci.c > +++ b/tci.c > @@ -1236,6 +1236,9 @@ uintptr_t tcg_qemu_tb_exec(CPUArchState *env, uint8_t *tb_ptr) > tcg_abort(); > } > break; > + case INDEX_op_mb: > + smp_mb(); I think we could distinguish smp_rmb(), smp_wmb() and smp_mb() here. Kind regards, Sergey > + break; > default: > TODO(); > break;