Message ID | 20230523135322.678948-28-richard.henderson@linaro.org |
---|---|
State | Superseded |
Headers | show
Delivered-To: patch@linaro.org Received: by 2002:a5d:4e01:0:0:0:0:0 with SMTP id p1csp1732985wrt; Tue, 23 May 2023 06:57:48 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ6vGyu2chrFvE9gcYcANmVncudvKkFWMUAONNbK+JcJ3rFPv875JxsMpHMM5IeemgYVq+ma X-Received: by 2002:ad4:5742:0:b0:623:64cd:940b with SMTP id q2-20020ad45742000000b0062364cd940bmr22843970qvx.28.1684850268109; Tue, 23 May 2023 06:57:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1684850268; cv=none; d=google.com; s=arc-20160816; b=UpOkbgszGxi4jZa7EEA859lkV1CrQA4Lo86BqCdoXHELcP18abZmA0ya/mTIoV2oEa HiIxiRvCH2i64N04aVUXInR+bOTQJKEBWb9DJkxlFVRraFplAbsAuMdJohd+bO162kkj iavUjiVZg0SzcXPFEBb/F1RoWqnqs8HlGhMU2SeKGZOQepy/G0yj0l0Dtk2SiyMELofK Jz3BB3JDqP0JCy2sTyqXFdoy6EJ64MxDZ3AvLrRW3h9tVlDSyrsFjnOqqoGJtCAiuFLu Tq1y9qc1yVEbO2VU0W1XdTJrYalj98hS/XbZBBMYVSNBfSfPz/CSV1esQdcNNLSMlKoj aRdA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:to:from :dkim-signature; bh=4h70UmOuZApqGwH8fl/aBGmj5U+73aMDvSoJL1qlazg=; b=SOBUIjwbg4x/YvbtUrUhZ12PCXKIlbZ3HX/cwNACK8P7/IFUFIqBImcAH8GRN8NBj9 xd+hHX7Djqj+sdzpxq0RALj6sXIHxslW1peNj6L44UDieO7mpJj6ntq48HgLML3rCyUt PjUFzoOmaV6fwYmRpMUg9ZszS7hdXPOjdILihUCs5u+MdWRoi6a/1ABw5xqSx3SBql+5 YS85o7JqsJlw79e1LBu8/UghLnjrReUBOPGy+RJw8sh3vWkH5geTMsCs7jf5TKcbHg6j V59485Cjimzwphaep9o2YUBpRc5ZDdoKJq2xbfL9NRttGhjQhM+kuka9Q9bRUpF6CQ1i bABA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=DQKN1Rmh; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: <qemu-devel-bounces+patch=linaro.org@nongnu.org> Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id 3-20020a0562140d4300b006238889cad6si5166212qvr.139.2023.05.23.06.57.47 for <patch@linaro.org> (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 23 May 2023 06:57:48 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=DQKN1Rmh; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from <qemu-devel-bounces@nongnu.org>) id 1q1STB-0006nA-Hd; Tue, 23 May 2023 09:54:34 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from <richard.henderson@linaro.org>) id 1q1SST-00054S-Vg for qemu-devel@nongnu.org; Tue, 23 May 2023 09:53:52 -0400 Received: from mail-pf1-x429.google.com ([2607:f8b0:4864:20::429]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from <richard.henderson@linaro.org>) id 1q1SSR-00037V-HC for qemu-devel@nongnu.org; Tue, 23 May 2023 09:53:48 -0400 Received: by mail-pf1-x429.google.com with SMTP id d2e1a72fcca58-64d1e96c082so4211806b3a.1 for <qemu-devel@nongnu.org>; Tue, 23 May 2023 06:53:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1684850026; x=1687442026; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=4h70UmOuZApqGwH8fl/aBGmj5U+73aMDvSoJL1qlazg=; b=DQKN1RmhsM1WfV3sb9RmlkUxVXfYbojqu1dvscpbTZbzz7nREbkM7i/8ahnlouwUqF PlvxwIAN6HgS3fyOREULmzlaZsP12JPsC7ZRKMhwYAEKrwSwmCiH8Ty8hihVKvYMAhDU iFusDgOQF9uQnCVs9uuCwcRvx1zPkrqCM3uleWN0qFmqV4OP/EXa0T1SUG0iRT653JIL CN8t0LdtIy+ZZoLf/zpDZKutkKaUXzYv38h2thiczlhMt+AowyGmhdC+vrXp+9xGkeRr pxxFW6O183wKDNE3nvQFtMGTegPv41UyKLONejg8YHtGUppJAOWB76pxTvGAyq8sloQT KOKA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1684850026; x=1687442026; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=4h70UmOuZApqGwH8fl/aBGmj5U+73aMDvSoJL1qlazg=; b=KEvSK6w3rw9WLSKMB1wuwMLSG1+EWWS11WiEwZ5+zVEuxSngBpXWE9mFcz6wCVkAi7 lhjMnv6+fF5HTfLocT+dqBpjRe1AODsV+mOkFjCwbl4lwcUsCKNzaxeBDs/zY4LpqzzX jHtyEA3k8ce7cSM38VCBQv5jjsi7sKGYgcu1U/DXbwtr1LWTJ2XG0NuYBCNkJLYDYVGj PL6XVG4f3dAwZT3F1Q9+6UmSW0NpcCGb/PDwcahSpLPJtmaHxIG/HZw+K4qJH600Vjv0 vXFi6htinI+ap2uziplMX8tyYSK0OOR6+OIcusD5mS3qVEBZJAgahvWVr9pad++R4+US 8YVA== X-Gm-Message-State: AC+VfDzTHM9ukrgpISnsW9rzslSQxQT2unuXXaAzPHbkiIkT2flkU2qH zJb6sXeajGoYgAboJooNyN8LY2rMRWYLgv37sx8= X-Received: by 2002:a05:6a00:a14:b0:647:2ce5:57c4 with SMTP id p20-20020a056a000a1400b006472ce557c4mr19913958pfh.5.1684850026152; Tue, 23 May 2023 06:53:46 -0700 (PDT) Received: from stoup.. ([2602:ae:1598:4c01:c13a:d73:4f88:3654]) by smtp.gmail.com with ESMTPSA id b8-20020aa78708000000b0064d27a28451sm5796111pfo.100.2023.05.23.06.53.45 for <qemu-devel@nongnu.org> (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 23 May 2023 06:53:45 -0700 (PDT) From: Richard Henderson <richard.henderson@linaro.org> To: qemu-devel@nongnu.org Subject: [PATCH v2 27/52] tcg: Add guest_mo to TCGContext Date: Tue, 23 May 2023 06:52:57 -0700 Message-Id: <20230523135322.678948-28-richard.henderson@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230523135322.678948-1-richard.henderson@linaro.org> References: <20230523135322.678948-1-richard.henderson@linaro.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Received-SPF: pass client-ip=2607:f8b0:4864:20::429; envelope-from=richard.henderson@linaro.org; helo=mail-pf1-x429.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: <qemu-devel.nongnu.org> List-Unsubscribe: <https://lists.nongnu.org/mailman/options/qemu-devel>, <mailto:qemu-devel-request@nongnu.org?subject=unsubscribe> List-Archive: <https://lists.nongnu.org/archive/html/qemu-devel> List-Post: <mailto:qemu-devel@nongnu.org> List-Help: <mailto:qemu-devel-request@nongnu.org?subject=help> List-Subscribe: <https://lists.nongnu.org/mailman/listinfo/qemu-devel>, <mailto:qemu-devel-request@nongnu.org?subject=subscribe> Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org |
Series |
tcg: Build once for system, once for user
|
expand
|
diff --git a/include/tcg/tcg.h b/include/tcg/tcg.h index 813c733910..9f607e2664 100644 --- a/include/tcg/tcg.h +++ b/include/tcg/tcg.h @@ -521,6 +521,7 @@ struct TCGContext { uint8_t tlb_dyn_max_bits; #endif uint8_t insn_start_words; + TCGBar guest_mo; TCGRegSet reserved_regs; intptr_t current_frame_offset; diff --git a/accel/tcg/translate-all.c b/accel/tcg/translate-all.c index 03ebe58099..181f276b18 100644 --- a/accel/tcg/translate-all.c +++ b/accel/tcg/translate-all.c @@ -367,6 +367,11 @@ TranslationBlock *tb_gen_code(CPUState *cpu, (int)offsetof(ArchCPU, neg.tlb.f) - (int)offsetof(ArchCPU, env); #endif tcg_ctx->insn_start_words = TARGET_INSN_START_WORDS; +#ifdef TCG_GUEST_DEFAULT_MO + tcg_ctx->guest_mo = TCG_GUEST_DEFAULT_MO; +#else + tcg_ctx->guest_mo = TCG_MO_ALL; +#endif tb_overflow: diff --git a/tcg/tcg-op-ldst.c b/tcg/tcg-op-ldst.c index aae74f4341..55338ef0d7 100644 --- a/tcg/tcg-op-ldst.c +++ b/tcg/tcg-op-ldst.c @@ -104,9 +104,7 @@ static void gen_ldst_i64(TCGOpcode opc, TCGv_i64 v, TCGTemp *addr, MemOpIdx oi) static void tcg_gen_req_mo(TCGBar type) { -#ifdef TCG_GUEST_DEFAULT_MO - type &= TCG_GUEST_DEFAULT_MO; -#endif + type &= tcg_ctx->guest_mo; type &= ~TCG_TARGET_DEFAULT_MO; if (type) { tcg_gen_mb(type | TCG_BAR_SC);
This replaces of TCG_GUEST_DEFAULT_MO in tcg-op-ldst.c. Signed-off-by: Richard Henderson <richard.henderson@linaro.org> --- include/tcg/tcg.h | 1 + accel/tcg/translate-all.c | 5 +++++ tcg/tcg-op-ldst.c | 4 +--- 3 files changed, 7 insertions(+), 3 deletions(-)