From patchwork Wed Sep 7 21:10:43 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 9319959 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 3523160752 for ; Wed, 7 Sep 2016 21:29:35 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 3D30429431 for ; Wed, 7 Sep 2016 21:29:35 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 30C7E29432; Wed, 7 Sep 2016 21:29:35 +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 9914529430 for ; Wed, 7 Sep 2016 21:29:34 +0000 (UTC) Received: from localhost ([::1]:43143 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bhkPV-00020U-Me for patchwork-qemu-devel@patchwork.kernel.org; Wed, 07 Sep 2016 17:29:33 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:52437) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bhk8C-0000Wa-9Z for qemu-devel@nongnu.org; Wed, 07 Sep 2016 17:11:41 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bhk8B-0002nK-6f for qemu-devel@nongnu.org; Wed, 07 Sep 2016 17:11:40 -0400 Received: from mail-yw0-x241.google.com ([2607:f8b0:4002:c05::241]:34234) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bhk8B-0002nB-2z for qemu-devel@nongnu.org; Wed, 07 Sep 2016 17:11:39 -0400 Received: by mail-yw0-x241.google.com with SMTP id j1so1172305ywb.1 for ; Wed, 07 Sep 2016 14:11:39 -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=blu2g2rV3jmlZI7WobSiCM1wwH64RHqt52Teb5za9RI=; b=wwfza3EWSvU5lWeIvchIvemVnvI9H81/9j2jiDmXaieU2B2kfg+eWkupbVF1oJiGa1 IqXqMN/m5bbD2+18Fr1VYETxlhbP6/7P9Psp2jptRowGolxmgvafOXbzrjeVET0jSWzD Ge5USsf+uDamBIg/C3hcM3svniTRw/4XiuUo1XtIzswnP8d5x/LjjjHozCCZWv5JylpR 0fojv1AfcIZN6uS4A/JdcxRol13CEcSY4f5EpVcczqSk4eYjJa3lb30P1ZnjADeoCAJE SifaM8AYrTbeAd3VIY1ijg4hCnzaOFXrAcBAom1A+9Y3zerr0s8K04dth9DYE9sZ90Dw en2Q== 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=blu2g2rV3jmlZI7WobSiCM1wwH64RHqt52Teb5za9RI=; b=f8PujpgOAV9FLAw+biiThUW+xdBhrVaxYof/LkwcTbU/L7wAlIKuJT8YsAfuq8bSjK 79x7NhCSExZdBIjsm89OgpCvtW4es69ApgPc/xmSaLZ42YkX83hyGLXVn7Fq9TB+fX0H Ruo3qPr6M/z1CU79k9tWL2YVYpjs23eBvlFR2HnCSOIFiNzV75CHizELHlwJS90/cA6u kCLTWPgJBi3uazkNOLo3lsFGmpk8+txhO5t30TPma+tgdVXb+1fF4G3hzjJgWgIyro/k 1EcCkEeS9bIE4Df9Vg+r2C3atCNBFaYdDbtYWnuw8znlLdQYZfVebu8MbFHhixkvQMtC EiQQ== X-Gm-Message-State: AE9vXwNKSUuFzNztfz7/Wdk+aejr3YRrczFTkcqEycncUHihexlqc7Q5u/clhpXZsNrC/A== X-Received: by 10.129.177.197 with SMTP id p188mr8061212ywh.159.1473282698771; Wed, 07 Sep 2016 14:11:38 -0700 (PDT) Received: from bigtime.com (174-24-157-40.tukw.qwest.net. [174.24.157.40]) by smtp.gmail.com with ESMTPSA id 17sm15558301ywk.17.2016.09.07.14.11.37 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 07 Sep 2016 14:11:38 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Date: Wed, 7 Sep 2016 14:10:43 -0700 Message-Id: <1473282648-23487-14-git-send-email-rth@twiddle.net> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1473282648-23487-1-git-send-email-rth@twiddle.net> References: <1473282648-23487-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:4002:c05::241 Subject: [Qemu-devel] [PULL 13/18] 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: peter.maydell@linaro.org, Pranith Kumar , Stefan Weil Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" X-Virus-Scanned: ClamAV using ClamSMTP From: Pranith Kumar Cc: Stefan Weil Signed-off-by: Pranith Kumar Message-Id: <20160714202026.9727-11-bobby.prani@gmail.com> Signed-off-by: Richard Henderson --- tcg/tci/tcg-target.inc.c | 3 +++ tci.c | 4 ++++ 2 files changed, 7 insertions(+) diff --git a/tcg/tci/tcg-target.inc.c b/tcg/tci/tcg-target.inc.c index 3c47ea7..9dbf4d5 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..4bdc645 100644 --- a/tci.c +++ b/tci.c @@ -1236,6 +1236,10 @@ uintptr_t tcg_qemu_tb_exec(CPUArchState *env, uint8_t *tb_ptr) tcg_abort(); } break; + case INDEX_op_mb: + /* Ensure ordering for all kinds */ + smp_mb(); + break; default: TODO(); break;