From patchwork Fri May 27 01:00:13 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 9137537 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id C5E986075A for ; Fri, 27 May 2016 01:06:15 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B93592807E for ; Fri, 27 May 2016 01:06:15 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id AC865282F7; Fri, 27 May 2016 01:06:15 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 4C8032807E for ; Fri, 27 May 2016 01:06:15 +0000 (UTC) Received: from localhost ([::1]:41177 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b66EA-0004SF-D1 for patchwork-qemu-devel@patchwork.kernel.org; Thu, 26 May 2016 21:06:14 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:40692) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b669E-0000EV-5W for qemu-devel@nongnu.org; Thu, 26 May 2016 21:01:13 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1b669C-0004EC-4M for qemu-devel@nongnu.org; Thu, 26 May 2016 21:01:07 -0400 Received: from mail-qk0-x242.google.com ([2607:f8b0:400d:c09::242]:34841) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b669C-0004E3-0j for qemu-devel@nongnu.org; Thu, 26 May 2016 21:01:06 -0400 Received: by mail-qk0-x242.google.com with SMTP id z80so3423944qkb.2 for ; Thu, 26 May 2016 18:01:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references; bh=fqWrvWDnmzwEmhbzcbI+TNwCBsz8sCVu6+M1bnYJMxE=; b=o49SgYVSl4+oc4f4CvKNgCj2qi7zDduYskLyoIfU9bTiwHIlB9AfOkNMxj89Va8erE /VEh/u226XEvRzpGaadWsLJaA7zhvBMGh+meYlCHcK5CADGv6Cr6/SgSM2Rb3hx9kKOJ 9M7QKk7gyrlusc5Z7dCSsFtss4ThgnsxH+qD8AVCwNavtlruDF1YQ07X15uDBwxKRHj1 kFTBzL8iSJx5D0sm5cOu7e7AOp9nGlNfQ6urw0EUhoOo+PpU/AFDeYlUrCJ2KeMRctTJ EYiO4LpJ8ybJKlfQZtxpp2SYjIeDhO7Fe+xK5JWEVid5WOgLnOmjwmTZOn/eEIUrhJqI a2DQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references; bh=fqWrvWDnmzwEmhbzcbI+TNwCBsz8sCVu6+M1bnYJMxE=; b=Vk5nr9JP19IlDu5dDHyAbIme3aUxLT2pY4BDeNM6tKaR5kExo+2czVqN0+skuiZ8as jbtSlKslqj8h5QuS6M1lYxjTvNlCN8K7J2Hdotiq7iteNKtnUO6VXo1r8HVu/ZTGaIip Uq+17bgoMDr5zM0fOc4lh/cSnJboHtZPeU7Qn3XaeWufgEQvkhnaznGDKSxnLLWJo6bu lklfdSRuG6quQKGydoJOHfatizaJcmim2NC0NzlFzRTlYTEgGwf0jZNj8sKs2J+35w3+ 2PuWEHiaSdt8YrpvSvfhqyvBqzsUtCkDiXCAyylPUIQt/6zAfMYMkP7cZG5pOgsJERYb zGcw== X-Gm-Message-State: ALyK8tKSMOUG80+cLJEV4iSdJh22R06j1jwI5u8QrlRPNLOkPI5exgI9WyHYFNL2RhRXOg== X-Received: by 10.237.44.162 with SMTP id g31mr11124428qtd.67.1464310865561; Thu, 26 May 2016 18:01:05 -0700 (PDT) Received: from bigtime.com ([172.56.17.0]) by smtp.gmail.com with ESMTPSA id 77sm1872030qgn.29.2016.05.26.18.01.04 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 26 May 2016 18:01:05 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Date: Thu, 26 May 2016 18:00:13 -0700 Message-Id: <1464310815-13554-11-git-send-email-rth@twiddle.net> X-Mailer: git-send-email 2.5.5 In-Reply-To: <1464310815-13554-1-git-send-email-rth@twiddle.net> References: <1464310815-13554-1-git-send-email-rth@twiddle.net> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2607:f8b0:400d:c09::242 Subject: [Qemu-devel] [PATCH v2 10/12] tcg/tci: Add support for fence X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Stefan Weil , bobby.prani@gmail.com Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" X-Virus-Scanned: ClamAV using ClamSMTP Cc: Stefan Weil Signed-off-by: Richard Henderson --- 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..bf65416 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_fence, { } }, { -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_fence: + 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..53b3f71 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_fence: + smp_mb(); + break; default: TODO(); break;