From patchwork Fri Mar 21 12:57:33 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: 875239 Delivered-To: patch@linaro.org Received: by 2002:a5d:5f4c:0:b0:38f:210b:807b with SMTP id cm12csp850770wrb; Fri, 21 Mar 2025 05:59:10 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCUmBTnTC2ZIpWFIhNFpEMtuuDiYQrWlIwdTxhbeMUhrCRgJn5XW5zXhbqN5SAWYWMhsYJWoOA==@linaro.org X-Google-Smtp-Source: AGHT+IGKcNYi7f59FxmLUEZxpmPM0mfpxaht3N1NxgAxKqlN5jMXCsWlx3jFaUr2T2axtJt4jJwA X-Received: by 2002:a05:622a:2:b0:477:1ee2:1260 with SMTP id d75a77b69052e-4771ee21436mr39490831cf.1.1742561949878; Fri, 21 Mar 2025 05:59:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1742561949; cv=none; d=google.com; s=arc-20240605; b=BEBUtHJWXP/kDFx8CWngJciusWkhSfsaALqJF1vRQe2bCG2vBlwgQUqufjloqZjXnY Mh+Z41lJ/VXSY8CzDBT60xAR1jvgPAVHKN6PfzNeK9K/zgKLgg63waBD+sMuRXjHL2UV QnJBotTE1hJByRgaSsIfryCvixLYIFXt9ocxi8SId5SKCni9Xda/MJQKQ8Frz5j//4Wb KGzhgwMWNbZawmBrzV6Rr3A3IYYK3CJJr+xGLPYSAmz5wa2YIPJEx336ofG6KQ4aKUYk qpy91zVNcGveNUdlWxSo2MsJ2ijSxkukn/kRh1y8N73QodwKfe6pdjweeF0lSe800D+Y y8Xw== 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:message-id:date:subject:cc:to:from:dkim-signature; bh=r31x35p8ltAnwsmr7YiPke9x3zOvdyh82uVgAn6Y+5Q=; fh=m1WbZvsEjO55kzIvX4/GQJbtfe/+oBQMBNPYAAKyv4c=; b=AGYCCJu9u3owuArW6C+PLI1F4dFWnAnE38cx7yK5pBmRDk2EzRn4sD7THqCSYhB+Mp 4HWEGu1naSwn7uAFJGD7qxLINJVl6dz+SuNyy17Z0TNRq6XpiO0KRhTgGxXHpMbvgOoy wWZJ5LoZXaajXJkYqx1m09dKm3SNTk3HVKcjA1HVn96MiZM05x0uzwYQ6wWRbwagdaCg 7fxvOpII3PFLTSCkAjAQfUnwySJbcd7VcID6Gf/wJvs5rJWG6+Jen+WwfrBsk1RIB8tT xN+Pfx8/5P21A29/Y44LWeSgK/SFyjnRL5dglfj6qJ9QMQRT416zuK+B8Sz70GkYFta5 SrIA==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=y8xNHXPY; 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-4771d52ca74si19328411cf.352.2025.03.21.05.59.09 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 21 Mar 2025 05:59:09 -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=y8xNHXPY; 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 1tvbwX-0007hX-I2; Fri, 21 Mar 2025 08:57:45 -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 1tvbwW-0007gz-6A for qemu-devel@nongnu.org; Fri, 21 Mar 2025 08:57:44 -0400 Received: from mail-wr1-x436.google.com ([2a00:1450:4864:20::436]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tvbwU-0002zj-CZ for qemu-devel@nongnu.org; Fri, 21 Mar 2025 08:57:43 -0400 Received: by mail-wr1-x436.google.com with SMTP id ffacd0b85a97d-394780e98easo1204705f8f.1 for ; Fri, 21 Mar 2025 05:57:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1742561860; x=1743166660; darn=nongnu.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=r31x35p8ltAnwsmr7YiPke9x3zOvdyh82uVgAn6Y+5Q=; b=y8xNHXPYikcnEph8Bpt0g3yKSGiqVs6OR3WR+AuxTsRa3/Bsohn4oWxyB8FTQR0lfN Zmg9cGokJo7dO9LV9DNuTCWVRlOKRwv4Y213X6gC2S8YR4ZAGbJafOz0crTHqyN4Po2y WlH2GBFtSZoBRB/fxR9XBA9rDTYf4muO6QSsE6ntjCIhxxbEeQuBgKxk5SQ5KkSYLAOv lZCQ40zDqIyIocx8SP8GlK2oogQv4SpIS+25LXQvo68OqRfivxX7V4HiHiYmSNssvYjx A/ect0hz4R/8THFQOkJN4PaK+gsrgZ/SxegSE6K/f9ly2UenStb2CfCjXave3ZlXmy+g k2jg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1742561860; x=1743166660; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=r31x35p8ltAnwsmr7YiPke9x3zOvdyh82uVgAn6Y+5Q=; b=Ts0n7heMBrjkmDP8jeLCneUdYLz91PmLpW5B99Z0TPrPqv7qrjpaaqCbUSDxT6OsC0 EHyo6mc9XPNx/4OZGM4VNX19ibzGELtk/zJ/bkG3ppif++r6EeWacL1reMM1lA3drWcs IH+yl+NXIRv7fSSW7076jkoz9KcuMPNpu+7WUC89hfICx5n8M/tg1zty1f9eq0VVnLQu XIyMOU0paPzMw7ukTsvuflIstDmma20QDi+r+66tCNTgyrEy3CR6Azg2OYWNOcPrKQYv k+n/zHAAuVPOow4lwu11j+XMw7+2MrNDz4oKS8yyDXypbiCDIbK41FeH4P2tDa2rOhFw bfSQ== X-Forwarded-Encrypted: i=1; AJvYcCW4QhB4J8Ijtw9Bwbnf+Bi3XkP8SKI7sgY9ElrRgOcW9pa29aQcevH2WC1BF2ayBr/dZcT5WqXD+zVJ@nongnu.org X-Gm-Message-State: AOJu0YxpfJ8xG3K+1BG99+kkrOeYJx8bglPp4p2aw8ZsZbWdcjlRpJNN gotw3S9wsz5UDPSf1omr6ym5VshRMJs6piFDdHJseMKoarl3b415rSMJs0Pve7o= X-Gm-Gg: ASbGncvV+9OjlaDFsZjUTuDwoRZfGssNaPjzNc+Y2cXEppJuMAWgxLz+SICSgSSW6h7 wr6a8I92EnULOssg3qq4aD1mH+hKk6RElRWdu5NuoOAo/UdPg9UcKUJ4PFwVxS3qSJRoCoDZk5p ibFQ2GxXCa8YwxctkRLGQRVOBneOBogIuLjeD6d/nDm676L68ojGKpd6dNQxqwZIO5PcDhd4U1E jmIscpKaHwaENVofkQUPS72OH/Xxp/XKj6+vqymNouOjRKAV5QUSwU1OVCcgNcyNpDlLEFWK77I b/3zeqlch3p9hKkqEB+vCvRJ9HELN/7XANgF2HFwWrUvIns527B1/6iQ2a7zPu3dcNfeFCFq07Z tsu6rhImI5HdqkA7bQR0= X-Received: by 2002:a05:6000:18a2:b0:391:952:c728 with SMTP id ffacd0b85a97d-3997f8ede02mr3157655f8f.4.1742561859608; Fri, 21 Mar 2025 05:57:39 -0700 (PDT) Received: from localhost.localdomain (88-187-86-199.subs.proxad.net. [88.187.86.199]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-3997f9f0107sm2347793f8f.99.2025.03.21.05.57.38 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Fri, 21 Mar 2025 05:57:38 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: Richard Henderson , qemu-devel@nongnu.org Cc: Paolo Bonzini , Pierrick Bouvier , =?utf-8?q?Alex_Benn=C3=A9e?= , Anton Johansson , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= Subject: [RFC PATCH-for-10.1 0/4] tcg: Move TCG_GUEST_DEFAULT_MO -> TCGCPUOps::guest_default_memory_order Date: Fri, 21 Mar 2025 13:57:33 +0100 Message-ID: <20250321125737.72839-1-philmd@linaro.org> X-Mailer: git-send-email 2.47.1 MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::436; envelope-from=philmd@linaro.org; helo=mail-wr1-x436.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 Hi, In this series we replace the TCG_GUEST_DEFAULT_MO definition from "cpu-param.h" by a 'guest_default_memory_order' field in TCGCPUOps. Since tcg_req_mo() now accesses tcg_ctx, this impact the cpu_req_mo() calls in accel/tcg/{cputlb,user-exec}.c. The long term goal is to be able to use targets with distinct guest memory order restrictions. Philippe Mathieu-Daudé (4): tcg: Always define TCG_GUEST_DEFAULT_MO tcg: Simplify tcg_req_mo() macro tcg: Have tcg_req_mo() use runtime TCGContext::guest_mo tcg: Define guest_default_memory_order in TCGCPUOps accel/tcg/internal-target.h | 13 ++----------- include/accel/tcg/cpu-ops.h | 8 ++++++++ target/alpha/cpu-param.h | 3 --- target/arm/cpu-param.h | 3 --- target/avr/cpu-param.h | 2 -- target/hppa/cpu-param.h | 8 -------- target/i386/cpu-param.h | 3 --- target/loongarch/cpu-param.h | 2 -- target/microblaze/cpu-param.h | 3 --- target/mips/cpu-param.h | 2 -- target/openrisc/cpu-param.h | 2 -- target/ppc/cpu-param.h | 2 -- target/riscv/cpu-param.h | 2 -- target/s390x/cpu-param.h | 6 ------ target/sparc/cpu-param.h | 23 ----------------------- target/xtensa/cpu-param.h | 3 --- accel/tcg/tcg-all.c | 3 --- accel/tcg/translate-all.c | 6 +----- target/alpha/cpu.c | 3 +++ target/arm/cpu.c | 3 +++ target/arm/tcg/cpu-v7m.c | 3 +++ target/avr/cpu.c | 1 + target/hexagon/cpu.c | 2 ++ target/hppa/cpu.c | 8 ++++++++ target/i386/tcg/tcg-cpu.c | 5 +++++ target/loongarch/cpu.c | 2 ++ target/m68k/cpu.c | 3 +++ target/microblaze/cpu.c | 3 +++ target/mips/cpu.c | 2 ++ target/openrisc/cpu.c | 2 ++ target/ppc/cpu_init.c | 2 ++ target/riscv/tcg/tcg-cpu.c | 2 ++ target/rx/cpu.c | 3 +++ target/s390x/cpu.c | 6 ++++++ target/sh4/cpu.c | 3 +++ target/sparc/cpu.c | 23 +++++++++++++++++++++++ target/tricore/cpu.c | 2 ++ target/xtensa/cpu.c | 3 +++ 38 files changed, 92 insertions(+), 83 deletions(-) Reviewed-by: Anton Johansson