From patchwork Sat Jun 18 04:03:39 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Pranith Kumar X-Patchwork-Id: 9185407 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 663E16075F for ; Sat, 18 Jun 2016 04:14:26 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 4D9C027E33 for ; Sat, 18 Jun 2016 04:14:26 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 423A32835D; Sat, 18 Jun 2016 04:14:26 +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_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, 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 DB36C27E33 for ; Sat, 18 Jun 2016 04:14:25 +0000 (UTC) Received: from localhost ([::1]:33003 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bE7eK-0004dW-Rd for patchwork-qemu-devel@patchwork.kernel.org; Sat, 18 Jun 2016 00:14:24 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:46388) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bE7Vk-0003fg-P6 for qemu-devel@nongnu.org; Sat, 18 Jun 2016 00:05:37 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bE7Vi-0005Lx-K8 for qemu-devel@nongnu.org; Sat, 18 Jun 2016 00:05:31 -0400 Received: from mail-yw0-x242.google.com ([2607:f8b0:4002:c05::242]:34428) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bE7Vi-0005Lp-8y for qemu-devel@nongnu.org; Sat, 18 Jun 2016 00:05:30 -0400 Received: by mail-yw0-x242.google.com with SMTP id b75so10800115ywe.1 for ; Fri, 17 Jun 2016 21:05:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=oei+UTtKRHLgM0PsnZL5bAfR1/bz/UQQQzTvlU4DlyY=; b=zaz/QbIpfBlef02Wow80WEVosaNFoIWdiZts86IEunbw5l5pSoPTY/j9nugkYxW6b2 RFSIJwnIvZfvOzD69jDE70M7bH7kSlrDol9prEhHGjZS6eldQn3KExXj8C8CpjfNoeSI 9zBRmMkWAVx6+9xSK6lp7js4zxg42xgKLde/76vPtCIoZ4gclpwZqA8FRBEf4tXH/f1u DW0nosxbm23nDhulLmu203qpI4BP0aeJsrGc4yR78JdEnKQmNjShMFG4lFXhBEjk3Bdd ehlSB8wxfYAdh+xfH2nShu4vHp//XTWDw7fIbslsIMNI+87wg8XIPT3WRsLlNUvWjYnS 5UWg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=oei+UTtKRHLgM0PsnZL5bAfR1/bz/UQQQzTvlU4DlyY=; b=D2q6KHDmBgsPGw4re4vjVvBE4YlOcsLokC9iQSgb1GxBLwKssFBa5RKmb+jqfMBkWI VhWGZ76334gKlPgm0Qh0HY8Q4RzQmpEgzQtZcmVLK9Bs1Klu3HxwRwZAPYspRGivPgk0 4EsrYmQjjGiFNYkY50rn/CP0jXiWtSht1ULh80vN+2RsHmF9F/M4xStmld/uV5sjlt8L 2xuYKrxg2GAKjzVePd2RqVN07c3HhZ0mfOOq0SAJloN3lkXz80mf3oKuqXxUifitlhFd L8bWhk559f1KFSJI21oxUeA4jqVJU1nUOVeEXNY7+LO5gTDCiaMVMxLGC941BI1IvFtb DxUw== X-Gm-Message-State: ALyK8tIMR282o1MhV3j7+lro6/Z8EVt/IkFW3sE3ITONKjYnBufzXS5MeeR4k+ZmPJ2Eow== X-Received: by 10.13.221.129 with SMTP id g123mr3206338ywe.175.1466222730009; Fri, 17 Jun 2016 21:05:30 -0700 (PDT) Received: from evgadesktop.attlocal.net (108-232-152-155.lightspeed.tukrga.sbcglobal.net. [108.232.152.155]) by smtp.gmail.com with ESMTPSA id q7sm19517992ywg.16.2016.06.17.21.05.29 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 17 Jun 2016 21:05:29 -0700 (PDT) From: Pranith Kumar To: Stefan Weil , Richard Henderson , qemu-devel@nongnu.org (open list:All patches CC here) Date: Sat, 18 Jun 2016 00:03:39 -0400 Message-Id: <20160618040343.19517-11-bobby.prani@gmail.com> X-Mailer: git-send-email 2.9.0 In-Reply-To: <20160618040343.19517-1-bobby.prani@gmail.com> References: <20160618040343.19517-1-bobby.prani@gmail.com> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2607:f8b0:4002:c05::242 Subject: [Qemu-devel] [RFC v3 PATCH 10/14] 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: serge.fdrv@gmail.com, alex.bennee@linaro.org 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 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(); + break; default: TODO(); break;