From patchwork Wed Apr 2 21:03:16 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 877708 Delivered-To: patch@linaro.org Received: by 2002:a5d:6dae:0:b0:38f:210b:807b with SMTP id u14csp2961330wrs; Wed, 2 Apr 2025 14:07:21 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCUzpMm6wD3dWgup9pQDzVqasoiNHPxywxfGx7BJqNy0T7WBA/5YM5a5BeNDc0Qv0tb9dBeibw==@linaro.org X-Google-Smtp-Source: AGHT+IEfmgpe12GnUEj4c5Z/poGcVlLNsSaO4iESqQXKEJU+f2KfhQhcTg7eD37KkgJqbHC1utKG X-Received: by 2002:a05:6214:c8b:b0:6e8:f4c6:6813 with SMTP id 6a1803df08f44-6ef02bc188cmr50819256d6.13.1743628041261; Wed, 02 Apr 2025 14:07:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1743628041; cv=none; d=google.com; s=arc-20240605; b=HwINTiHQc8yJajPoaBqQ1DidoMFf4PqoTG30qVOw71/0PgKNhVdRpGuJwEUFY37ZG9 vxbzSuMLqQWadWSCP91DfYRHz8DwIJtn5IAJMGrafsAXhAcLYadv+SNQtoec++rfze8W xngHI+qI7uSJ4xp9b1do1NrlTcOvurpIk8B1sHWcTVIh0cn5G15bXtZnNJEIsvGg1XzL VBxv7rJ2SI1oZk02yFOsNZr9KQQSc6oXwi+L7xzLn++XM+2BG8d5Bg2bd4L202FI2uJE /T4vHX4CK5eZRzZBSs/YMFBNy1D9klJAhBetdUPCRgpswHruHWnKwFWfwuDd6Vm2gl4L ybWQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; 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=9MO7LV0/gXNfytPX25lgbZnxOJWCw84WsDrMRmk30ac=; fh=g4MaY0V4i7r9PHi/Pa4TBf356AO8Pr5jaBllvZmncq8=; b=imiWKNZlyZYoBb/FQDE1jg9d7qtXz+7QgCVoj0ZCZRqYwcP9FefhfZGaaEsIv7R1MU r8OO2DI6UPFMZHEdIH60QN09D0agYx5bK+ZGwJugvbpFTeH8pVzI/UuCm0cmvkgqDD4Y DBb3AHqIjf5Ht7YG9CUUET1ISNPxOF4QE8n7/9i0+0jBPipvCuoHFITg1CvL39C2OO8M Kq/wACWkv61GbcaYkaZ5fp3H9Hdc2vu15aROc7o+TgWFq2jz4RLHo9fL9Zf/IiO7VOAT 1hrQmGjC1Oo4/Ank0BGX6zXOgoPa1+I2VjIl4gL/CFudZ3OzI2eIuJfN6A2/NbXQr/Mg NsQw==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=bI4ATBe2; 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; dara=neutral header.i=@linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id 6a1803df08f44-6eec97cf44esi116194596d6.379.2025.04.02.14.07.21 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 02 Apr 2025 14:07:21 -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=bI4ATBe2; 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; dara=neutral header.i=@linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1u05Hy-0000Bo-4r; Wed, 02 Apr 2025 17:06:22 -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 ) id 1u05Hi-0007Fy-1R for qemu-devel@nongnu.org; Wed, 02 Apr 2025 17:06:07 -0400 Received: from mail-wm1-x334.google.com ([2a00:1450:4864:20::334]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1u05Hf-0006iM-Sp for qemu-devel@nongnu.org; Wed, 02 Apr 2025 17:06:05 -0400 Received: by mail-wm1-x334.google.com with SMTP id 5b1f17b1804b1-43cfe63c592so1686855e9.2 for ; Wed, 02 Apr 2025 14:06:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1743627962; x=1744232762; darn=nongnu.org; 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=9MO7LV0/gXNfytPX25lgbZnxOJWCw84WsDrMRmk30ac=; b=bI4ATBe26Dr9iep86zw5IPjUc90bVQdygh6nWT0Im8jKefRhnFarsqA6Kv5Si+p3LQ AcxuE8LJ5NlD8zSOk2owHIpglpccZGgshEo8phtqXyiRUJS0bs4JaPl52kEORW556uv6 zGXgUwEajTNXheJrLwE5V1Hjo8cIpbb7GIoYJTpHF28UZ/N3nOSMfVNfmYezWy9ul+56 CvGHMMkGouYo5WwuqcFtNiD2tQnq8rK/uuplqtSUzZ6MP9LYefKiC/l646q2XjfbAud5 jDZbFEJqvWEO8ChF90xaG5f/D78NT4HSg4CCqp7lIi4Cv6Z36ufsHt34yUONpeXm9D2h 9AqA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1743627962; x=1744232762; 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=9MO7LV0/gXNfytPX25lgbZnxOJWCw84WsDrMRmk30ac=; b=CG6J0PASxo0b9uPYgxgJ1b8xkX/AzI+7vfIeyMbBowv0c6kwQqf+cegIDKxUqzig68 U9d0Jk7BCtzsDPR4cCXz+iJhuWulyGCT+gj0qd0x68pPRMAhyxhYa9JRVyBhWK1N4yPI nuBwGohSXOHjGCc78+sBTSWZlPyU/OFluNBYj7tQloq8K/t/lpTFg4pvHT4NQRkMq5K8 TlLeup065uQKxEGL891ZPQDDBdPwwjtLK6xMUoq8ZO9tbtc7B02wM3ZEpk1NilZAQiXY 782epYsa/ocAfkcYf/u7zzW+2BepJtiQA1lJoUy4kcJ0UNVHMEqA3qSP/2v7eBfFLFPU 2NwA== X-Forwarded-Encrypted: i=1; AJvYcCVZrohvicdZhuDJ1HSGnLKCQL4yCk5GlPqlLcXk0WrmpNt7Acu9BUV/tf0IjuxBYRbq/2BzHIP+z/Oi@nongnu.org X-Gm-Message-State: AOJu0Ywir4KoGnrydYcSC41A8OnWOyA2yn11wKLUt0WCvf1WBFGegOKT xjxBlt0FzoHXqCOab6zHeYzReF836qejv2SwP39P4oKeWAkp2JGuGp0NzTLsnW0= X-Gm-Gg: ASbGnctzYw2aW1WEWgNHWayf+synFY9yuIJs5m4PwPkbRgFCdYPjD/C7whsCOmT9CpG kFnPVFdmLoSovbv1l5QPKC+9RVdjmpbRErU3RBIGhNk93NnFFGfirj1hh5pqQ6KcsDVvgeIv88f HR5mN0AHL9YLfQ8zhOTimSHug/n2SHejrYQmgBSu/nQ7r5AZDt/e7AbBh06F30l83QQ+iOQ6Vpo 5tQLVO7XU70Bv5JyGURxXYTXmGWMyr+CZCQXUye8Dg7jlNqfi01ZxeUpOkd5bwsV2IWAu56WEI+ +ly1agAG+phQZv1+6v1M7Ed6k67C6UVOPDGXSS2deRZu7uVH+cIIKiuWgnY1V3kOUAeAECv7Shy 0Rd3Umlc7D629Ps38f98= X-Received: by 2002:a05:600c:1f17:b0:439:643a:c8d5 with SMTP id 5b1f17b1804b1-43e99ab533cmr159971185e9.0.1743627962155; Wed, 02 Apr 2025 14:06:02 -0700 (PDT) Received: from localhost.localdomain (88-187-86-199.subs.proxad.net. [88.187.86.199]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-43ec24b22a0sm135735e9.6.2025.04.02.14.06.00 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Wed, 02 Apr 2025 14:06:00 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: Richard Henderson , qemu-devel@nongnu.org Subject: [PATCH-for-10.1 31/43] tcg: Always define TCG_GUEST_DEFAULT_MO Date: Wed, 2 Apr 2025 23:03:16 +0200 Message-ID: <20250402210328.52897-32-philmd@linaro.org> X-Mailer: git-send-email 2.47.1 In-Reply-To: <20250402210328.52897-1-philmd@linaro.org> References: <20250402210328.52897-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::334; envelope-from=philmd@linaro.org; helo=mail-wm1-x334.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 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: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org We only require the TCG_GUEST_DEFAULT_MO for MTTCG-enabled frontends, otherwise we use a default value of TCG_MO_ALL. In order to simplify, require the definition for all targets, defining it for hexagon, m68k, rx, sh4 and tricore. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Anton Johansson Reviewed-by: Richard Henderson Reviewed-by: Pierrick Bouvier --- target/hexagon/cpu-param.h | 3 +++ target/m68k/cpu-param.h | 3 +++ target/rx/cpu-param.h | 3 +++ target/sh4/cpu-param.h | 3 +++ target/tricore/cpu-param.h | 3 +++ accel/tcg/translate-all.c | 4 ---- 6 files changed, 15 insertions(+), 4 deletions(-) diff --git a/target/hexagon/cpu-param.h b/target/hexagon/cpu-param.h index 635d509e743..7cc63a01d4b 100644 --- a/target/hexagon/cpu-param.h +++ b/target/hexagon/cpu-param.h @@ -25,4 +25,7 @@ #define TARGET_INSN_START_EXTRA_WORDS 0 +/* MTTCG not yet supported: require strict ordering */ +#define TCG_GUEST_DEFAULT_MO TCG_MO_ALL + #endif diff --git a/target/m68k/cpu-param.h b/target/m68k/cpu-param.h index 256a2b5f8b2..10a8d74bfa9 100644 --- a/target/m68k/cpu-param.h +++ b/target/m68k/cpu-param.h @@ -19,4 +19,7 @@ #define TARGET_INSN_START_EXTRA_WORDS 1 +/* MTTCG not yet supported: require strict ordering */ +#define TCG_GUEST_DEFAULT_MO TCG_MO_ALL + #endif diff --git a/target/rx/cpu-param.h b/target/rx/cpu-param.h index 84934f3bcaf..fe39a77ca38 100644 --- a/target/rx/cpu-param.h +++ b/target/rx/cpu-param.h @@ -26,4 +26,7 @@ #define TARGET_INSN_START_EXTRA_WORDS 0 +/* MTTCG not yet supported: require strict ordering */ +#define TCG_GUEST_DEFAULT_MO TCG_MO_ALL + #endif diff --git a/target/sh4/cpu-param.h b/target/sh4/cpu-param.h index f328715ee86..acdf2397495 100644 --- a/target/sh4/cpu-param.h +++ b/target/sh4/cpu-param.h @@ -18,4 +18,7 @@ #define TARGET_INSN_START_EXTRA_WORDS 1 +/* MTTCG not yet supported: require strict ordering */ +#define TCG_GUEST_DEFAULT_MO TCG_MO_ALL + #endif diff --git a/target/tricore/cpu-param.h b/target/tricore/cpu-param.h index eb33a67c419..45fde756b6a 100644 --- a/target/tricore/cpu-param.h +++ b/target/tricore/cpu-param.h @@ -14,4 +14,7 @@ #define TARGET_INSN_START_EXTRA_WORDS 0 +/* MTTCG not yet supported: require strict ordering */ +#define TCG_GUEST_DEFAULT_MO TCG_MO_ALL + #endif diff --git a/accel/tcg/translate-all.c b/accel/tcg/translate-all.c index ed41fc5d0cc..cb1cf270888 100644 --- a/accel/tcg/translate-all.c +++ b/accel/tcg/translate-all.c @@ -352,11 +352,7 @@ TranslationBlock *tb_gen_code(CPUState *cpu, tcg_ctx->tlb_dyn_max_bits = CPU_TLB_DYN_MAX_BITS; #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 restart_translate: trace_translate_block(tb, pc, tb->tc.ptr);