From patchwork Thu Apr 24 00:49:18 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 883844 Delivered-To: patch@linaro.org Received: by 2002:a5d:474d:0:b0:38f:210b:807b with SMTP id o13csp3203996wrs; Wed, 23 Apr 2025 18:10:33 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCUGvyO10dbDVP2tABw9jCHkI3yqXATgZbL8gg6gakxi6S7VYbfygwam5kvCsPCsX5+lY9n8Qw==@linaro.org X-Google-Smtp-Source: AGHT+IFQv8zYVESULBfv4rnNJ8Sm76uqYeSQ6WN+qGpv8Ce3amhC2OhQDWAVDhOPEpo7A7P147wK X-Received: by 2002:a05:622a:4d:b0:476:9377:17aa with SMTP id d75a77b69052e-47eb4ba3a4emr10604371cf.52.1745457033013; Wed, 23 Apr 2025 18:10:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1745457032; cv=none; d=google.com; s=arc-20240605; b=dXCu4iREfFc52KA/tR5fvfFSjG1AIJHiIAo0/y8fli953UMyQdGVRH5HVdCW83KrK4 ZxmDUmFZdBSzwi2NajlRR19W7XbRcsyhmQS2YHjKOnxAvjQ6fCLAgKFfm/iQ/NOaKcIM z96h8bc2wBFNm+B8PpiZqVQSv6O3PJoxRw7l4jCMxtPqUv1Dnpvuw6LD7fMOtNPLYf1W j7a6fku6BT847SvIFM1RXSFJ39Gap07xqa4phFDshV7MyM59/+VZUcdpWcmOrP7flFel J80fhr0udwYoGoXN3F7lDDpWhyhEOvKJOd2MjakCS66mUbbnQVTg207qU7iCLqpAGbqM 2pDA== 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:cc:to :from:dkim-signature; bh=Q2Qeo3QXQKKP4XnDRGevpdG6ZhTAI9iOzSVzVjKvTY4=; fh=GenBbR+/7gYaTcd1KqVHGA9TQPQZSS4lyPm/ns+6Qjo=; b=ZFnlZGcni9UKxQ/9MMfdcNnvQmk5a95qM8/HiypouIq/hgh/sWWGF9abmVVD+dxUEy EVGzOQIHnkkZzGLtf4oWbODQdr+8jGihAhJTJqY0uZaVbphEvZ6eIcfciybkMxiE7svj /OCkvsBLLpsIxsrcjOXFQnwckDaT4gm6eeV/t6lgQ/6CdeWEDZRq/V18ZMnGCRRjdazc NS7KmNzucAzE/VI2vqxeUej2CYSysZKFB9Jbgvd790dbqUWq+ca2SSeVup39WvesTc0o Q0HPEsP76Gvc1ILISNOZ/70jtEqSETKkXODec5jHlTIe/LSvHP9Qwy0DO7sY9MouSg1e XIEw==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=SlSL46FI; 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 d75a77b69052e-47ea199688esi5218711cf.281.2025.04.23.18.10.32 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 23 Apr 2025 18:10:32 -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=SlSL46FI; 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 1u7kxj-0006lc-Nw; Wed, 23 Apr 2025 21:01:12 -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 1u7kwr-00055Y-Tf for qemu-devel@nongnu.org; Wed, 23 Apr 2025 21:00:18 -0400 Received: from mail-pl1-x62a.google.com ([2607:f8b0:4864:20::62a]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1u7kwo-0005UY-6g for qemu-devel@nongnu.org; Wed, 23 Apr 2025 21:00:17 -0400 Received: by mail-pl1-x62a.google.com with SMTP id d9443c01a7336-2279915e06eso4598915ad.1 for ; Wed, 23 Apr 2025 18:00:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1745456412; x=1746061212; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=Q2Qeo3QXQKKP4XnDRGevpdG6ZhTAI9iOzSVzVjKvTY4=; b=SlSL46FI/gIygliorbCTrsQm3AKSfDEBmbDjP9wXHgE9aHEENP19pgKDY7qDVpFhB/ 74P9bk+XwLYW2djFgqb9OZ8o+Wj6Yyc8dhJ8no0ZR0GtNh5aR19/sNjPKt8MGIA8g2Eq CQMIvSUNjUej7B5Pr6Y4Jp0sZycB+Blc6L1a7kRsGRfAiYfw3lVwerSYtus8zrbRz4ke iYbNRUKxmKy5EPz9c+1fl24X1T32XSaYX+KnDGX8EtCcszAjZKRQnCvqhLmvUs4tvIoS oIeLTXPa+sCq+3/s2zTUuJt85OC8xlFxOlZDkucQzOj4xDpX/FEz+W0ZvlEb9oZ06z4h GXfg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1745456412; x=1746061212; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=Q2Qeo3QXQKKP4XnDRGevpdG6ZhTAI9iOzSVzVjKvTY4=; b=FyNYgw/j16/yP6ZTm4simL3ncS/91YUjbQ0F4s7juXnFUstfNBQPDaQKHz09DlG8RX MZnd8PDPRPbcpG6qPBCxLefX8VhmEK+LJikDpAIaHEyEruXz8/krL5S3RqhSMnt9gMYD G8sN1kpMn3zxGW6J60qIuKCLUH9AF3V8xGOEjOevJJoWzRcZlblHkrnBZwf2za0F/5SG IwD61vNz5usX2YMXDgP61vDMg7JQbzCP5UNH+4Co1VrAaqvqmSeebvloqtrq1hWOAg9K GgImqMZQxub9R+mTW8tc9NR+7QH2I7VPoFaPhBbAHKpBaO77DXBuVmB28OmGXSqq8DtP u4vg== X-Gm-Message-State: AOJu0Yzdt9wh6QhyJJ7ZopraOjsiSlMq5k7oyIr+BPTsmA4dNAPXzXG1 SOT+IBkSQyFJ1a8kD8DvCYpHgKf1FzaWwDgaD5iOUutmq2l3bxixdCn8KppYMJ+zuc+pgPFtkQu 4 X-Gm-Gg: ASbGncuyURlgu3SN0dkMk230FYa+odhdnNMqhIOGxFw8a2VZ3/V3RHqobPFs04zOfRw E2W/5stnk/l8cVX+ySDHVnc44bNOuLyZ8ty05EyT0+tsL3dkNuUR4AYOxoCsXuy8atzpHyCM544 VywsLC0o29y0tTFfUJhpUJOYyA1NpY+Yjo3Qe7cvHjZlS5+y4/KyjhRm7mZXhFCz/3E+2DD8N11 LHfQarLRaGvdv76kLAraRw7txyPD6uj0NqSfRIGIu3UI0IatmNz8aIBANEnIttlGiBzaKEI0lm8 SnrFTo3ADP+fj8o6NzhHJ2OKPviaHeelvKVSfaPtowRno0rNVs87HGI3v78P1ceL9iDsc/UoAk0 = X-Received: by 2002:a17:903:8c6:b0:223:619e:71e9 with SMTP id d9443c01a7336-22db3bb6f8cmr8245595ad.11.1745456412471; Wed, 23 Apr 2025 18:00:12 -0700 (PDT) Received: from stoup.. (71-212-47-143.tukw.qwest.net. [71.212.47.143]) by smtp.gmail.com with ESMTPSA id 41be03b00d2f7-b15f76f45c7sm129259a12.16.2025.04.23.18.00.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 23 Apr 2025 18:00:12 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Cc: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Anton Johansson , Pierrick Bouvier Subject: [PULL 133/148] tcg: Always define TCG_GUEST_DEFAULT_MO Date: Wed, 23 Apr 2025 17:49:18 -0700 Message-ID: <20250424004934.598783-134-richard.henderson@linaro.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250424004934.598783-1-richard.henderson@linaro.org> References: <20250424004934.598783-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::62a; envelope-from=richard.henderson@linaro.org; helo=mail-pl1-x62a.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 From: Philippe Mathieu-Daudé 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 Signed-off-by: Richard Henderson --- 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 635d509e74..7cc63a01d4 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 256a2b5f8b..10a8d74bfa 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 84934f3bca..fe39a77ca3 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 f328715ee8..acdf239749 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 eb33a67c41..45fde756b6 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 c5590eb695..7467255f6e 100644 --- a/accel/tcg/translate-all.c +++ b/accel/tcg/translate-all.c @@ -353,11 +353,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);