From nobody Mon Feb 9 07:06:22 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1770071107; cv=none; d=zohomail.com; s=zohoarc; b=EfuEEU2pWyjadMMamlyrLp9YEwoFZwfk27DRvDypygj9hRQ+je07g+GTpcmTUPx7TBNT3W+gbngghTDwPKC7cvOCV+mkzHa9ppq6RCLtKUzzcv+EdLKHWeNGQpiXPH21tc5bJTNozrUb2SsXNNJJMrbO2GpG+O3I/Bfp2IH7TvU= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1770071107; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=bPFR6g8HavYKktYDjPEU2UNFbYpGAVNrutPVXVv/Yzs=; b=IOZakWGbcbCEr4WIon805Kv2kkyzsraMtvOdmhgw3ry8oBpUBYJe6XPUUDh1ee88ASxQ+utnHG6jvrzOwphgUsWLESN0kMH22CCrsnKuC8Sd+UWwgvCdDCtgn9pU67JNNwEu99poV8Om5EoDnsQlTMPmTKLJ+eb+WI4L0+05Uy4= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1770071107620297.67071023919993; Mon, 2 Feb 2026 14:25:07 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1vn2LL-0007xE-Ef; Mon, 02 Feb 2026 17:24:27 -0500 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 1vn2LK-0007wZ-22 for qemu-devel@nongnu.org; Mon, 02 Feb 2026 17:24:26 -0500 Received: from mail-wm1-x335.google.com ([2a00:1450:4864:20::335]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1vn2LH-0005e4-IN for qemu-devel@nongnu.org; Mon, 02 Feb 2026 17:24:25 -0500 Received: by mail-wm1-x335.google.com with SMTP id 5b1f17b1804b1-4806d23e9f1so55289935e9.2 for ; Mon, 02 Feb 2026 14:24:22 -0800 (PST) Received: from localhost.localdomain (88-187-86-199.subs.proxad.net. [88.187.86.199]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-435e10e474csm45795473f8f.2.2026.02.02.14.24.20 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Mon, 02 Feb 2026 14:24:20 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1770071061; x=1770675861; 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=bPFR6g8HavYKktYDjPEU2UNFbYpGAVNrutPVXVv/Yzs=; b=b1iIW8FKaXmoKfWAl0N7c69Du4vQJJlj0iGiCThsJitG/OcN4if6VDl8/5P/uAsXcv 9hTm5vzHKEhuvwsFbvzZcu8ejzAWtg8X5C1paxy6J9OsmKaIhaSZ7MFsYLOJqKUTOPtj WIliBnjtxyr1sJrMbtNEtv7WvCYKIt1TAEyEf6xH6O+T9wgApa7TTajl369EiOGc1Atf 3IVkgHjBQMDBUu2sicJVCRqGn5FRKeDraE5PIyRMTOX3PhQgdLsr3fG1Q5u0nUWs7fxP 3WaIW5iCyLBWFh2V8KPYRPQizhLIvnzeiGujPCDQzEuVrFCWg6PjceRMueIdeQRI2vfx hNLw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1770071061; x=1770675861; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=bPFR6g8HavYKktYDjPEU2UNFbYpGAVNrutPVXVv/Yzs=; b=gMLOFcVt4BuUrD1d6hGGoAqiogc5tCdtF43x+dyyWXwoe7Hswuqskqpj/GSiC4wTzo gmGsutxwG/tNPbkhvExyKixlJMtR5hqb7G6gE2lxkztwKq8hF6syXWFdb5W4gu5KpXKN uhLVZwAx/6otmgPuulwPcna3oBAoB8QtD8vfxqH4oQx1AmEfbESG/RSt3TBlLLeVJafb /Fb08TpyUjRumsy3x0auyfYTGOS3oSpPBc+Vdppkt9we8NIyruZV20CkgpEdj62xLkFZ ZuJS11jscVt17MEjATQC2MrEV+4h1R1N+wsKzqmQSo8r0RUdaNJOFcnMtRc5M0LR3P/5 mgRA== X-Gm-Message-State: AOJu0Yw3R0+wLfwd6x2871mtN5GaaJrLG3Y+JV4PE8JDKclJ5eUblRN+ pze52PUIYkzzS/QbJCSXNm2Wi8mSMdgrT3zDIQWae2eZs2jPHefjsFjG0C8TE2ZdbFbRPRm9eLT wq9L7QRY= X-Gm-Gg: AZuq6aJx9ISVBDOehGrssbl/o5ihfddpobGc5OnXYlnKga4rgg3WWLPde74RFPM6s7t OufzBvoibCO/oPfUsd+qeGCyIqGdZYgx+WOYEmonc96dfNuV2fuXoe5XFtjpx0v8EOmPmIPyM3f ENG0w+d1OFIPQPHYQ0VFP374+2sUfOqg9UfSlvwdX0xy6p2EngUFrXGU+6yAzz5k+3Bd2v9EO7d A8TJs5cR7M1U1toicLpsayxQUZse9mlJ1brkCppLwONsS4yAdC5LNh7mzGJ0hnTSmerq8TjAGK0 F4W5SbMWKaxbwg5i0M1qshJHfSpMq4IErc3R60IT/dhm11Gk5pH/hczFTvG208tdCUVvK3crY4A 4Jr0LGSljDzc48wfDqZOEq2q65VBHCNegIBr4DUNcl2nLoHlo5QwD8qKQC00MfVh3gkRFLhG423 qajgvnc2S0It6bA5rYEAVQtGhfDE/5tb293zoKdeWQVuQOtlFka5s/ORc2fjjf X-Received: by 2002:a05:6000:2001:b0:435:97ab:1299 with SMTP id ffacd0b85a97d-435f3abc8f3mr20340954f8f.51.1770071061146; Mon, 02 Feb 2026 14:24:21 -0800 (PST) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: qemu-arm@nongnu.org, Richard Henderson , qemu-riscv@nongnu.org, =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Peter Maydell Subject: [PATCH 1/7] target/arm: Have arm_feature() take a const @env argument Date: Mon, 2 Feb 2026 23:24:06 +0100 Message-ID: <20260202222412.24923-2-philmd@linaro.org> X-Mailer: git-send-email 2.52.0 In-Reply-To: <20260202222412.24923-1-philmd@linaro.org> References: <20260202222412.24923-1-philmd@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::335; envelope-from=philmd@linaro.org; helo=mail-wm1-x335.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: qemu development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1770071109297154100 arm_feature() only access @env read-only, make it const. Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Richard Henderson --- target/arm/cpu.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target/arm/cpu.h b/target/arm/cpu.h index 21fee5e840b..d4a146b4202 100644 --- a/target/arm/cpu.h +++ b/target/arm/cpu.h @@ -2140,7 +2140,7 @@ enum arm_features { ARM_FEATURE_BACKCOMPAT_CNTFRQ, /* 62.5MHz timer default */ }; =20 -static inline int arm_feature(CPUARMState *env, int feature) +static inline int arm_feature(const CPUARMState *env, int feature) { return (env->features & (1ULL << feature)) !=3D 0; } --=20 2.52.0 From nobody Mon Feb 9 07:06:22 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1770071225; cv=none; d=zohomail.com; s=zohoarc; b=GvQAVLyuaA/OV7b+CM3GDu+Udxk+7wQ7H5bBgkk+bUhg09o24KE4UKSU7le/pm5YC5+DPUNRUQ/UprjGgDf+R1TlODgKlDl8yzp17w66W6Xv3H+3bHg5dOOdKs3nvQYykCMEWNq9k09kExsnIm8hmATHFU5LLR4zGw+QVE5eBZo= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1770071225; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=uEwHj7cGBF710j93AX4dVUieGQt51AslYFDhNUlx8/I=; b=Kf3U9N1qP2gEqsTwzJ3LOaVODQB/TF7wlQbZNzvhER0mmlwHHVPM/JSQvnM9TiTfVV4vfivALVovsMh6suy9sM1ap2sifYqXmtRtYhZCtVgGclxZQua5yqaeqMFFi7lHcSZ6NkkMLRxM3UR5VPIe01u7tCh2dSYyZkOZZXgbXoY= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1770071225537536.3098607405067; Mon, 2 Feb 2026 14:27:05 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1vn2LR-0007zg-CK; Mon, 02 Feb 2026 17:24:33 -0500 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 1vn2LP-0007yR-Lt for qemu-devel@nongnu.org; Mon, 02 Feb 2026 17:24:32 -0500 Received: from mail-wm1-x32d.google.com ([2a00:1450:4864:20::32d]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1vn2LN-0005el-Ne for qemu-devel@nongnu.org; Mon, 02 Feb 2026 17:24:31 -0500 Received: by mail-wm1-x32d.google.com with SMTP id 5b1f17b1804b1-4807068eacbso41600175e9.2 for ; Mon, 02 Feb 2026 14:24:29 -0800 (PST) Received: from localhost.localdomain (88-187-86-199.subs.proxad.net. [88.187.86.199]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-483051539ddsm17525815e9.9.2026.02.02.14.24.27 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Mon, 02 Feb 2026 14:24:27 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1770071068; x=1770675868; 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=uEwHj7cGBF710j93AX4dVUieGQt51AslYFDhNUlx8/I=; b=Ir+jlfXc+l5LHY8BOVhZmhYqlSPCtj71Z36DGRnDu8h0+M2Vr8RxdeogV/Z8OQs38r rRXwrupBzGI9nI2hdCJEzWALdFbPZajmJiG6hL0pRIbo5d+lE5iqmRORLThMPmLT1Dds vzAlO+PAGOii+bYhoTk6hldDl8JPPgVKlIb68eFX16KuPzyVXYTzoxJXqBdJc1ygmf1b 1g4VpF1ykGtB1ldWaPdqG6S6B5L0xYeqEBgnRcWmYP4oDwCno5O6I6LZk9dUwtb6oYip HKSl3BAju6ujqtoggATYZ+qdO6X3ehjzLOnioWP/ILsYnT3zq2UP7bM/Lat4ujBG/vHE yB0A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1770071068; x=1770675868; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=uEwHj7cGBF710j93AX4dVUieGQt51AslYFDhNUlx8/I=; b=Vw9NKO5OR65VmsXKj/S2C/D4m7oPMz9HkdBZzYQWo852OMFkll/QL4kYCkJfmgMKya Uw112LQvPPj6AWRPeyYjnV9OQSRdTSSCxAFVISHBJmI8mlYlXl5P5nsCP7t4BphOU5Ro 0psDcnuTBmdSr0utISIyeMCJFVwUaMvArZZDoo1ZcqQ87t/G6sF78cMjtExLDLPSfbMr S7lE45oQvqUu+oDSvK0hj/Mi74QHfO7B8zsGd1e+/kFPsvr8R6aBvisFTOttcyRCX64T dL+btJ9OPtyluyKmn1yWz5Kpx4fXLW8KCNQrhLdT4m1x/bi/pxuAJWZneXjnNtBj2UVo PqTA== X-Gm-Message-State: AOJu0YztBppVuHq5pgHtMfDjmzzsuWHkqBB2FDqn4QUBV7NUWd8CuSZO K660wM06w8dGqpxTu2Xsu0+GuNyLuq8h+8sDY9I5QbU2Xt3zIsC4HRG5bUMMSrrxV6seaZx+6iT MgLYHbrw= X-Gm-Gg: AZuq6aLqt/E4pcrsuThQ2/EJU4t05PhtC2ba4dMXGVR1q3QzA3I0MHUZlkRMZJNYTXY TMT3e8fCGmwt0+ooXBVhHNoQH+lBMhhFTOuEYRBSxK8MVIDDEtHDKsTe4pWpi4INSWDXnq9OVXY 30LXLCvj/Cct8Uec/a2eFuPMuC53rrW3C6EQZ+IvygZxP5rEj+pCvXwvK89RiZIhyxmQMljYK7F awPVy8VZUkVXOmgRb2WPVBTgCQMrsBPzrGsRGvqeYO5NG7nccUhsqa+9N+tdbydVP2zkLABFct8 VIyHhm1jRN2vFMuCn2ZJ7bQxtg6zHnEVlb1WVIrQhjugcFfPhGcZZpL5pHlT5NSTEqWyxdLWRaO L2rRmmHvQbjJ8v0VQvvTeis3765y3HUMdBRW8wK9Rqoac7A9z24UWpONG9VawBzjtYEkeMFZh9N 53zZnLHmNLVhL0RLVQpo0Fw0nPdLe9KjHca9v90BoVhCEgVGlEP0MLrmq9OFUy X-Received: by 2002:a05:600c:8b65:b0:47e:e61d:b8d2 with SMTP id 5b1f17b1804b1-482db486ee9mr189007215e9.27.1770071067947; Mon, 02 Feb 2026 14:24:27 -0800 (PST) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: qemu-arm@nongnu.org, Richard Henderson , qemu-riscv@nongnu.org, =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Peter Maydell Subject: [PATCH 2/7] target/arm: Have cpu_isar_feature() use a const ARMCPU object Date: Mon, 2 Feb 2026 23:24:07 +0100 Message-ID: <20260202222412.24923-3-philmd@linaro.org> X-Mailer: git-send-email 2.52.0 In-Reply-To: <20260202222412.24923-1-philmd@linaro.org> References: <20260202222412.24923-1-philmd@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::32d; envelope-from=philmd@linaro.org; helo=mail-wm1-x32d.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=unavailable 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 development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1770071228842154100 The @cpu_ variable is only accessed read-only, make it const. Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Richard Henderson --- target/arm/cpu-features.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target/arm/cpu-features.h b/target/arm/cpu-features.h index a7ca410dcb4..f7b14373407 100644 --- a/target/arm/cpu-features.h +++ b/target/arm/cpu-features.h @@ -1643,6 +1643,6 @@ static inline uint64_t make_ccsidr(CCSIDRFormat forma= t, unsigned assoc, * Forward to the above feature tests given an ARMCPU pointer. */ #define cpu_isar_feature(name, cpu) \ - ({ ARMCPU *cpu_ =3D (cpu); isar_feature_##name(&cpu_->isar); }) + ({ const ARMCPU *cpu_ =3D (cpu); isar_feature_##name(&cpu_->isar); }) =20 #endif --=20 2.52.0 From nobody Mon Feb 9 07:06:22 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1770071127; cv=none; d=zohomail.com; s=zohoarc; b=ZMaEESplEtyssCQdEAO6QAlD7WIDbbpS6jG4rr1UufX60Sl8FnGDtzNvIBMc2bP7gaRXtbfm4gSzukMOknSeao+8PPpiOAQgVkLfiwD8jYhwxzD6aVb14MKkRJWdYGPsj/kLYBfJMRbVZOjhSpj510kjdH0Sc6Sycdh3XwP8EsY= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1770071127; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=pHArYt5JL2wmE5bb1Fmatz7wESrf6iQwO1bJMqHZ4A0=; b=iW8JlNGCESqR+D4RAoTlueu0YH/lkJUk8/+J9qur7antfbwRtBW7EtLxwHMYVIfQAQz1c8t8OdCI9SZTKRzMUVRDrdLBvpeMNgrbQJza7miysvXbyGquGcwbyEiUb9B/6kjvR9JgD2JJA8aoX+SGKTJDKGdjFFKFx6uupZGkgpo= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1770071127699148.7791178852642; Mon, 2 Feb 2026 14:25:27 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1vn2LY-00083S-UW; Mon, 02 Feb 2026 17:24:40 -0500 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 1vn2LW-00082e-MG for qemu-devel@nongnu.org; Mon, 02 Feb 2026 17:24:38 -0500 Received: from mail-wr1-x430.google.com ([2a00:1450:4864:20::430]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1vn2LU-0005fz-Gz for qemu-devel@nongnu.org; Mon, 02 Feb 2026 17:24:38 -0500 Received: by mail-wr1-x430.google.com with SMTP id ffacd0b85a97d-435a517be33so2970540f8f.0 for ; Mon, 02 Feb 2026 14:24:36 -0800 (PST) Received: from localhost.localdomain (88-187-86-199.subs.proxad.net. [88.187.86.199]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-435e10ee04csm47144832f8f.12.2026.02.02.14.24.33 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Mon, 02 Feb 2026 14:24:34 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1770071075; x=1770675875; 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=pHArYt5JL2wmE5bb1Fmatz7wESrf6iQwO1bJMqHZ4A0=; b=BHA8N3vmcKc1iIElNBR9br0jM7204vmgLHPSq+DsJ0OdvZe0x08H+ln9J+Ej948s9Z ZmSAKhZE0mzPejhFG+a9lpj3+hdjdA3aYf0VA4QWEcTfOL0FEPrLue+5/mboaKsd1WmF 8Z27yRNSjIIqh9HqzARO6DgDeZWTRWM8/PVcRQpvsPg7RLDDDbkYj77kpR2XDM+WgAZA uDpqPJgsp2N3LGqPSlJUT3+8n+SQx+ta3cxO0Sw9VFuD2QmU5W7wIjT0gMkot+R24gTE cfhgbw5LO8Klkn66APofHE4RFXUBFGg6bL25i5hbHEpZH7hhiS5EkZao0EiBiJ+lTbcm 0y8g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1770071075; x=1770675875; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=pHArYt5JL2wmE5bb1Fmatz7wESrf6iQwO1bJMqHZ4A0=; b=QhRksgL8GguOPYHQZwjXlueClJkqygalKhgWxpGzGJUxpx77l3A7Uflh6JK4q8M26z vcRXP3VzPbA63dW4C2SzKTZF4WkBvBN94vFKYNsh7cq6HiJYKbUskAs/4q0X3Vhq997A LFuboENWAPcTGtH7DPdpy4OdhW4nyojHDDzFE7y0Um85aKZ5SGuCK8fvKZmLmZb83qPb CryYo0KUB57PHsl1cP619pBiav328Zvm6BoytwQNftuncpzh3Gwqtaq6xmXK01qQxNDG xmWhALd51Nch8YJN+JWmkFHpsg38VwnaCBXdHfXL81QFVaq+UhB8DaVDmky4J1p3tty9 Fbew== X-Gm-Message-State: AOJu0YxYu8/ejJ1hV72Pp9hRqFuhKq92NCcNOuGuVFiYxCp6uloUYulo la7g8Tb2PG2E89L0bXCpq1KlqUzCWFSMkXFYk+LjF+AIyh09f5SpyWkTi95dF9xVVdoxucs+5Yb HOsTNN6c= X-Gm-Gg: AZuq6aJZ+V+MboFF8soxfNBxt9VRktksKGsKBYuUcAF3U5RfHKIGZ8JChNsL4FNkodh 030FGjVM94IMV+NORKJvPvEZeKaffz1SnGhSTu+qoVhrm3v7eU0cqin2LD4gMAvnSE3RUFzIUG9 oFRvIq7y5zBxUH+FcnhtDIl1+R5gPkNMizCi7j6ex9MOfhOvEm05nRbc6x5G01utO2fve2RcNcM 9mlRNaNet3ELVpnnXOW1E5D7sgDdYpdI6uYV6n7z+fu7671vnxD3EYIOGxKXUf8kKBUa4eiQPAA QofdJSS5kn7Of8ysXV3ss0smAp9QG6FB/DAqxfB1G1aFWgVbT+3VlATWeWXvrnQsTB6kK5rzF9K Z7ujQToBBtnOHdeipOO+hu8YNBX0IwPpmOioKpPm9QdSSiT104ujqk/hN1guZAv1luSZ46uM8Hw vWSxE67KV8WvHecX3hbyo1gl8GiGwfeZfRJLQCTLPpYKvRJsQKfeJmVVA0h1rK X-Received: by 2002:a05:6000:25c1:b0:435:99d5:9d90 with SMTP id ffacd0b85a97d-435f3a69053mr19331830f8f.3.1770071074809; Mon, 02 Feb 2026 14:24:34 -0800 (PST) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: qemu-arm@nongnu.org, Richard Henderson , qemu-riscv@nongnu.org, =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Peter Maydell Subject: [PATCH 3/7] target/arm: Have is_64() take a const @env argument Date: Mon, 2 Feb 2026 23:24:08 +0100 Message-ID: <20260202222412.24923-4-philmd@linaro.org> X-Mailer: git-send-email 2.52.0 In-Reply-To: <20260202222412.24923-1-philmd@linaro.org> References: <20260202222412.24923-1-philmd@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::430; envelope-from=philmd@linaro.org; helo=mail-wr1-x430.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=unavailable 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 development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1770071129686158500 is_64() only access @env read-only, make it const. Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Richard Henderson --- target/arm/cpu.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target/arm/cpu.h b/target/arm/cpu.h index d4a146b4202..40237168419 100644 --- a/target/arm/cpu.h +++ b/target/arm/cpu.h @@ -1345,7 +1345,7 @@ uint32_t sve_vqm1_for_el_sm(CPUARMState *env, int el,= bool sm); /* Likewise, but using @sm =3D PSTATE.SM. */ uint32_t sve_vqm1_for_el(CPUARMState *env, int el); =20 -static inline bool is_a64(CPUARMState *env) +static inline bool is_a64(const CPUARMState *env) { return env->aarch64; } --=20 2.52.0 From nobody Mon Feb 9 07:06:22 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1770071241; cv=none; d=zohomail.com; s=zohoarc; b=GereqEU98tn7LqTLXSyveVQuWVKy8gvO+fIsDJjtoQJrPvnPE3hKivHXhydDFJr1M6WX5JYv+UDPT6a5DafcrFmJ6z3LcmGgfTWrI3PDrAheu/gA1kXI2yUoBPMHg/IobF8Zd1sRdQ1ymgCUeUadqp1N7IkFsnESAtyBtwcdiV8= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1770071241; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=81e/xdnyRjFZ8mxcbWyUm8xYnIAVgB5Q+4bR4erYypE=; b=MHTWOsgt3tEXE7eThQTSvWVVnSo1DgPpBv/+EURLAy1ATCHGOz82f26ls1PZ61pdMcVosimEloodbK6qrHw1F0brC+WYVGBPc/tkJTmXUqDOjDRrxwige7NEjy0jIL88f1ruF1MOvWoElGbVFK9vyc79BCQqKcpSQp484ekV6mA= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1770071241632933.7463296142273; Mon, 2 Feb 2026 14:27:21 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1vn2Lf-00084r-LG; Mon, 02 Feb 2026 17:24:47 -0500 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 1vn2Le-00084N-7k for qemu-devel@nongnu.org; Mon, 02 Feb 2026 17:24:46 -0500 Received: from mail-wm1-x336.google.com ([2a00:1450:4864:20::336]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1vn2Lb-0005gh-Rn for qemu-devel@nongnu.org; Mon, 02 Feb 2026 17:24:46 -0500 Received: by mail-wm1-x336.google.com with SMTP id 5b1f17b1804b1-4806e0f6b69so36455715e9.3 for ; Mon, 02 Feb 2026 14:24:43 -0800 (PST) Received: from localhost.localdomain (88-187-86-199.subs.proxad.net. [88.187.86.199]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-435e131ce93sm45848864f8f.24.2026.02.02.14.24.40 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Mon, 02 Feb 2026 14:24:41 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1770071081; x=1770675881; 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=81e/xdnyRjFZ8mxcbWyUm8xYnIAVgB5Q+4bR4erYypE=; b=QpDaWTZXBrPCcbBfvyBrrrmvZqUQCK/XFLay8MB9SBug+JAQDxsiQEmwSAL22f3Yz6 jNNDK+xZCwB/QJuEl+NEmNtBOQJMV35xJuRtdJ6ag5dN0twxGKxBWHrRwwE5jUpS58nX TA3uWqMloAReIjEIt7A6dfbfGJHHb/Lpfp1dg34ulRD0I1lXKOanDBaKEq4zyc6yK7Hx QpcJdwlHTNd9XmYjLfc0lYGcDdbuvX0nbYulc12XRa1wgq05inbPQssVQ8f0XhqUO2NU qhvGf5HF809Rv0oHh1VEIJ10pgXOJGME4Xiq1hR/FDYllyaBNGQ8f+5mh87Gk/sfUZd8 0zaA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1770071081; x=1770675881; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=81e/xdnyRjFZ8mxcbWyUm8xYnIAVgB5Q+4bR4erYypE=; b=cndLBRaUhB3Zrlu+a56rYk3GCPOoMcpvPUNktWnBYt3lmexHVUWkBcPn9sgphVNG3t g2fMr6Er85jzsBqTeh82NiUbSEJQ3j3/Tcgxxt00WEadq8+AnjuVZjDviyjNVBWeHv+H IVGgWNmElgwBAGT5Rs2zfkrMxJTohxNBGtJSXOe6fSwLQEhAFb+0ipOAgiCQwq4b2UAy HgOrFmkakOXE07CBIZsGNZUe8I3XDlseU+V/+Mgt794GxiVKe31nvYt89Ujfl2QWjCFl 7R9ij4lUeqFeGsK8SN96hRCPm20EKrInZ83tqxAvJC6WxpuFORlF+nua+hX+TfqahtI/ hIjA== X-Gm-Message-State: AOJu0YxwaxI3cKWcY0zPPsdudEmwUXAWM7ApCZ3zwGKXDkbY8aaXY8yN E9zb57wuo5MH7BGxc/viv+QUfZzdM2ISml07w3hb/FcxSrZlwzsjl+WBxnWTdGhQwB7COW2wE1i ryQuTJ34= X-Gm-Gg: AZuq6aJzwLuYFzOvRaFrl2rP3zEC9zYtT0g7iZbZbUQJL454y2vasNG1XbhlS2IPNFM dXOBe3r/YqioM8IUObTFP+F16BB2+6T5HkEDUN+vRVupUByK4QXUxBNdnrBU3LFj8ihd0os2Mor dj9BCJggIasdvv9A0n0vClENGfsuVTQLRQXfOu2LVyoTamrNzGE7u0gQOOK/TlkVXJ8hD0Rnx2t XwbHdOnTmDr4tCHfDIQR3unE1ml9gmSWYEHoV5kEkbopE6hM7FtIV08DGHW5JBGF82b6vsmvQQH E5LuaefrE/pjToYgRa74RogEz0KEcp2DNBC5IMJnXxcRHzgPm9DUTIdpWOESHJ/bIrVm5VK74zv ni7PpuLxlQWuFO8ZpXZ0SmJ7RezPNlOL5AETTDw0HUxHPWL1EtNkyVxm64dcv/6rrItnE0zJQsX 0yuPVV97n2ustO0jQJikHZI+l0L9oDF12REBKTEgocfCRSaEF/O99WWxWsrIbx8h1nYqV7p1E= X-Received: by 2002:a05:6000:2401:b0:429:c14f:5f7d with SMTP id ffacd0b85a97d-435f3aaa9f6mr20982292f8f.29.1770071081533; Mon, 02 Feb 2026 14:24:41 -0800 (PST) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: qemu-arm@nongnu.org, Richard Henderson , qemu-riscv@nongnu.org, =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Peter Maydell Subject: [PATCH 4/7] target/arm: Have arm_sctlr_b() take a const @env argument Date: Mon, 2 Feb 2026 23:24:09 +0100 Message-ID: <20260202222412.24923-5-philmd@linaro.org> X-Mailer: git-send-email 2.52.0 In-Reply-To: <20260202222412.24923-1-philmd@linaro.org> References: <20260202222412.24923-1-philmd@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::336; envelope-from=philmd@linaro.org; helo=mail-wm1-x336.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=unavailable 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 development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1770071244972154100 arm_sctlr_b() only access @env read-only, make it const. Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Richard Henderson --- target/arm/cpu.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target/arm/cpu.h b/target/arm/cpu.h index 40237168419..e146f7e6c41 100644 --- a/target/arm/cpu.h +++ b/target/arm/cpu.h @@ -2385,7 +2385,7 @@ static inline bool arm_v7m_csselr_razwi(ARMCPU *cpu) return (GET_IDREG(&cpu->isar, CLIDR) & R_V7M_CLIDR_CTYPE_ALL_MASK) != =3D 0; } =20 -static inline bool arm_sctlr_b(CPUARMState *env) +static inline bool arm_sctlr_b(const CPUARMState *env) { return /* We need not implement SCTLR.ITD in user-mode emulation, so --=20 2.52.0 From nobody Mon Feb 9 07:06:22 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1770071166; cv=none; d=zohomail.com; s=zohoarc; b=jdN4IfkCL4lqbDng+RhL6E77TPYheGMaiu6uuHe8QRaKE7ku+EKTMLUZlx4kHe75nscpqOQtsFZtqkDiVB1m5o8gsqsWCXpG+PPPkH4+/Md5oWGVtKaT6YqmgUPufV46k5Rkx5mhbVOAqPOpG2h12UxrrXpyVHnN/v1hKy15Vno= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1770071166; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=Hxmb3dBWSHQNJ/KevGbWtwZmdhaTBJBpW5JHAL3soIQ=; b=icAZstFDXbNwF/Taa5NcTaZENI48AVca432mWuCQy+dgpNk5yUvuHG7EpHeJdm1eEClh7HNKDSCRm0BhV2J7aKE+T0oMVKzHCGndtfjWqO9s4rsx9nBE2G/3tXcrYiiBT/q+lfF5G/BWykLwa9Z8xSYKsXOKV9EMKN6Jt2zpnhk= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1770071166153944.771953752333; Mon, 2 Feb 2026 14:26:06 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1vn2Ll-000870-9x; Mon, 02 Feb 2026 17:24:53 -0500 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 1vn2Lk-00086D-2A for qemu-devel@nongnu.org; Mon, 02 Feb 2026 17:24:52 -0500 Received: from mail-wr1-x42d.google.com ([2a00:1450:4864:20::42d]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1vn2Li-0005hs-Aj for qemu-devel@nongnu.org; Mon, 02 Feb 2026 17:24:51 -0500 Received: by mail-wr1-x42d.google.com with SMTP id ffacd0b85a97d-43246af170aso135144f8f.0 for ; Mon, 02 Feb 2026 14:24:49 -0800 (PST) Received: from localhost.localdomain (88-187-86-199.subs.proxad.net. [88.187.86.199]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-435e10f82aesm49210576f8f.19.2026.02.02.14.24.47 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Mon, 02 Feb 2026 14:24:47 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1770071088; x=1770675888; 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=Hxmb3dBWSHQNJ/KevGbWtwZmdhaTBJBpW5JHAL3soIQ=; b=fV2prkgqe3vhXB9z53+SWDFaUNm1muKK9FRN00ucb+Ohm6qr4ZiJsmvXtxyQSe0lq6 neRnNAmN7m9j1rwgxlFyT4OIi/0cJrb/4QCLVXkI1vWyLknlx25XWYgxR9smiGDcUtGn 3iiAChagaNoF6b6wV9adCP/8Me9BmY7CAufYnHXNajgrgBKVS4a3+hRFOcWv+vMANwFP EZzd91v3TV55hvdkWQf5lK1PUzCL+ng2VQ4gyNKgmUX+b/SjaRA1Tawzr49uvCcaN/hx WaSSgKnBe6JH3+tywZZIBLirdCT2gQWE9qJ1jjlXoddAg3pIvCFzQLw+omdPtkmNe2Aa gSCQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1770071088; x=1770675888; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=Hxmb3dBWSHQNJ/KevGbWtwZmdhaTBJBpW5JHAL3soIQ=; b=pLdYP+MMLELu7deYQj0MOH2w28I6+062/3KLBYTephrlay535Xj8nFmPpqk27uPI5E +AenliQgrZYtyEQLYOpu+vZ46fIQn+LdCu2NWY8VPMwmCd5+rM0LZz0UUpHNtnk0krH3 XqdXPyuPzjYUYp4DkriZHrAkqOaf2jT0Sw6dOCsr60P90apoKO48UKGgH8U2IdmIKJxh qGN5nhNp3xelLIphldLCrlRy7opUvBxlq2jHpYKVSwMd64PNpBr6iT6qezS+/madPrD1 HCKl01x9smF4nzwpvKPP7r1eoSGT36CeeOGTmZ4hkFOgQ5EWwOX8XFy1fwSGwBl6SA6Y HUAQ== X-Gm-Message-State: AOJu0YwkmoqHkoqp4Gla7OEIAzjDXYQuoDiTa7X4bZIGeFaaQlQ5BLW1 ha6VnAESbwDf+k1+RAIBPWUwmbSz/ZfLn9JlLhHuD5UgQdBVvpR2NooZKA7JerLZOzOZ3hAL0KB gTwwSI5I= X-Gm-Gg: AZuq6aIUG/phEGsRGjLUcaG54SUndO9dyUDjg8i7wapo/2RiIq36m5phnxCb2VFDBV4 gmL45l6zPhu+EyVwkVOYln0ZUnHsCc6YNHqAh7e0qpXcVmsDCjGNIiDTtdAnc8KmT/NLqbicEOF lgnUEF2Xo/tLDc9x9Rj4/6ayAVFmkyqD3FXklDueQum4PPmzM6u7YEPOh6sr+G4YweOJPvBYgSz OAxukY4SCiUULvJxRR3vFIOUv7rc5tBZDI7ZksjYTCWK+m7sIfz+sl9/5TZg6CisKGMYd+HTvln H/fRIlo97/c+4PpzDQRjc1lRSjyHObIaOzbw69Ot6BSJWMqCCZ/aazdAzhPiq5SUrhEotiSvuXw 6SzsrohkufXJmNmqgCuprg4QA/BsJK4kVNYJy43DS2sMzE8XJ2D2Kwmp+WCDuYxnpWgzbZvCAkj y3hY22suqWjqG2f6uxhKV1lDe9RfCmpnxh4XHG9Nn50fr2N8Li72xWMkZATUpVMLPHbZfVpy4= X-Received: by 2002:a05:6000:4011:b0:435:932e:f932 with SMTP id ffacd0b85a97d-436114074e3mr1512247f8f.7.1770071088453; Mon, 02 Feb 2026 14:24:48 -0800 (PST) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: qemu-arm@nongnu.org, Richard Henderson , qemu-riscv@nongnu.org, =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Palmer Dabbelt , Alistair Francis Subject: [PATCH 5/7] disas/riscv: Make rv_decode::cfg const Date: Mon, 2 Feb 2026 23:24:10 +0100 Message-ID: <20260202222412.24923-6-philmd@linaro.org> X-Mailer: git-send-email 2.52.0 In-Reply-To: <20260202222412.24923-1-philmd@linaro.org> References: <20260202222412.24923-1-philmd@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::42d; envelope-from=philmd@linaro.org; helo=mail-wr1-x42d.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=unavailable 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 development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1770071167762158500 Disassembler is not expected to alter the CPU config. Besides, all other RISC-V methods takes a const RISCVCPUConfig. Make the @cfg field of the rv_decode structure const, passing a const pointer to disasm_inst(). Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Richard Henderson --- disas/riscv.h | 2 +- disas/riscv.c | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/disas/riscv.h b/disas/riscv.h index d211700cb2f..379e642ec84 100644 --- a/disas/riscv.h +++ b/disas/riscv.h @@ -189,7 +189,7 @@ typedef struct { } rv_opcode_data; =20 typedef struct { - RISCVCPUConfig *cfg; + const RISCVCPUConfig *cfg; uint64_t pc; uint64_t inst; const rv_opcode_data *opcode_data; diff --git a/disas/riscv.c b/disas/riscv.c index 85cd2a9c2ae..6f2667482dc 100644 --- a/disas/riscv.c +++ b/disas/riscv.c @@ -5409,7 +5409,7 @@ static void decode_inst_decompress(rv_decode *dec, rv= _isa isa) /* disassemble instruction */ =20 static GString *disasm_inst(rv_isa isa, uint64_t pc, rv_inst inst, - RISCVCPUConfig *cfg) + const RISCVCPUConfig *cfg) { rv_decode dec =3D { 0 }; dec.pc =3D pc; @@ -5509,7 +5509,8 @@ print_insn_riscv(bfd_vma memaddr, struct disassemble_= info *info, rv_isa isa) } =20 g_autoptr(GString) str =3D - disasm_inst(isa, memaddr, inst, (RISCVCPUConfig *)info->target_inf= o); + disasm_inst(isa, memaddr, inst, + (const RISCVCPUConfig *)info->target_info); (*info->fprintf_func)(info->stream, "%s", str->str); =20 return len; --=20 2.52.0 From nobody Mon Feb 9 07:06:22 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1770071116; cv=none; d=zohomail.com; s=zohoarc; b=CJEFHFh6qLptxrbxBrDsxO3blyGEUybtAL7B5QX0ZAXQK3cyJdUejWKbcAriG9HqmjoWddZ5lsmIkPhcbfw2XLVkesZRV4wBBUJMJBQFgpxOjDH+S4yNKoC6AVWxQLupdllSNxWsfRKdNym40No9x0rAolN0rh685851Yuh8rkw= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1770071116; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=/ZgFsj41R73USHfnfxx9xHJU0fzw4Fgplcv6IOSKNfw=; b=VgxlG6NcEZHYmgNY2ov7LARXhxmG+fdILRJIL8vQv1kOETKONBsj2mV8ZXWQUXXzzxvwJxeuSCGvSvwqcwFoEF0ZIe0NYcCOna4Pvi/9jwTvGpugcpdTJ3YDmshOrj3jdsaXnpxOPXg655/Uni1iZwyz7FmZiLH0XuWZ0kLLDUE= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1770071116293971.9948022756272; Mon, 2 Feb 2026 14:25:16 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1vn2Lu-0008Bw-9u; Mon, 02 Feb 2026 17:25:02 -0500 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 1vn2Lr-0008Af-OL for qemu-devel@nongnu.org; Mon, 02 Feb 2026 17:24:59 -0500 Received: from mail-wm1-x343.google.com ([2a00:1450:4864:20::343]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1vn2Lq-0005in-0Y for qemu-devel@nongnu.org; Mon, 02 Feb 2026 17:24:59 -0500 Received: by mail-wm1-x343.google.com with SMTP id 5b1f17b1804b1-4807068eacbso41601745e9.2 for ; Mon, 02 Feb 2026 14:24:57 -0800 (PST) Received: from localhost.localdomain (88-187-86-199.subs.proxad.net. [88.187.86.199]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-482dbcf9684sm119990765e9.5.2026.02.02.14.24.54 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Mon, 02 Feb 2026 14:24:54 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1770071096; x=1770675896; 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=/ZgFsj41R73USHfnfxx9xHJU0fzw4Fgplcv6IOSKNfw=; b=pEhSDHraZuPV4N4cpIzVPCVpVoMaCsY8xHiwKgORCnCpxehDD7BSDIaQtU9CgUor7c RngIHjkj1RV1O7CK+SqoNyyeYGP/HOJN7i62h5WglFnXKxr0YLigdFpDg5MFPqdWKcGL 1TZqXiEwNBnQ4yskIf4OmH2HU8Lw1sAMYwsGcA6oroAlufaekpbKNMEDLcTe3iY7i+SX bXb+eDsx++vn3sGAT1K0HWfRqbvyCl2qX2V+mFXCe8AZyi4ajycOV58s3sICuMbRmWpX N//tA880fqR8wFI5Ihx/3FLZPNd0sfrRPcBlSB/WGSj5lvf+iiBWNJjmS127vggzwHIi 1ukQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1770071096; x=1770675896; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=/ZgFsj41R73USHfnfxx9xHJU0fzw4Fgplcv6IOSKNfw=; b=dFFiWERFHChBODQBcZDfQ/x1HGQIVJ5LQCts+6Ug9c9QTfB5QnBWOlsHv64xGYjrD8 aOl+J5ABOK6xuVSu8TXLWUSshmW8xHohrS/bAvXzp0IuYDVaWq7AzGuLXFUDhnKAbtCS h6J1WpP20/8t13j5E0TSg32+67bAxwPE0zsoR2YWgS8FXah+8nVqEzV+160ahNGAB8+s +DApdh4y4Ukz15Dy9jtXHfDWOQRguERZdPqaHfmBBcKS7nIl/XEU9Ey5HwCMQqaZb5HT KWNZXLqYDZj9ntgMe7r8KHKPmZdR5O8RX62AKbU26xecwpn67v7yC+zA7x8EKXZQ/wBr JxIA== X-Gm-Message-State: AOJu0Yyx65QdL2d1bQ659YPndIrUFr1baFm3CfxJITny9eZ+wcBrJYxa ExyzDoZHa/NLcGQgvyVCl4Bh/l5iUdWFWK/TNJI7fl3cJXkAhUis5K7VhkzuCbgppBr5I6PoBab pMEMHa8eSOg== X-Gm-Gg: AZuq6aJTJXNkPBKTe098v5D4VG0cutz+K5cP4Sd9XlLQhxQDwnuBSv3/gZlwhBtFGg4 d0PxNsk6OsxeE7IzO2bV0Wf+cPh7t4PMGFzIdOzuJjz/o+V5nVC+oSL3hySNoEDywvrTalcBit/ okV7eMQawHe2lLUBD+s5noF1vw3fwTrHF/J00dN0N+m7pliwbPcXMmKoIHqUwwxqZAQUh+YWyV6 5rvjlcItN3kHeOnm1p4CqPh3Z1+dNiKhcQYHvgw3IUsSTolFBv6ONQyMBHXLYALJcx/1DJwXO8z Hvd6H83tu9+L+IRL2rLYprVZbBhivqWlH7uVYsDlmR9lyY2PJC7V6ZWklbTdjf1cYgh4wujbnUh nOQEwOrpDFzW0d7grnvdD3XN3F+n9OmdVDxCRs6tOtt90LXfM6sGC+3BkcDPX+u4OYJk+EbmXN9 GJNMp7ohnODgxlZc8rrBJlvVk3qiR/CtyLOtZTykGLNXYvgqkx5taQHcs0ZeB3ozHvp51Qnnw= X-Received: by 2002:a05:600c:818f:b0:47b:deb9:f8a with SMTP id 5b1f17b1804b1-482db491bfbmr174416925e9.30.1770071095951; Mon, 02 Feb 2026 14:24:55 -0800 (PST) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: qemu-arm@nongnu.org, Richard Henderson , qemu-riscv@nongnu.org, =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Subject: [PATCH 6/7] disas: Make disassemble_info::target_info field const Date: Mon, 2 Feb 2026 23:24:11 +0100 Message-ID: <20260202222412.24923-7-philmd@linaro.org> X-Mailer: git-send-email 2.52.0 In-Reply-To: <20260202222412.24923-1-philmd@linaro.org> References: <20260202222412.24923-1-philmd@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::343; envelope-from=philmd@linaro.org; helo=mail-wm1-x343.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=unavailable 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 development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1770071119258154100 Disassemblers shouldn't need writeable context, so make the disassemble_info::target_info field const. Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Richard Henderson --- include/disas/dis-asm.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/disas/dis-asm.h b/include/disas/dis-asm.h index 3b50ecfb540..911352703ea 100644 --- a/include/disas/dis-asm.h +++ b/include/disas/dis-asm.h @@ -397,7 +397,7 @@ typedef struct disassemble_info { bool show_opcodes; =20 /* Field intended to be used by targets in any way they deem suitable. = */ - void *target_info; + const void *target_info; =20 /* Options for Capstone disassembly. */ int cap_arch; --=20 2.52.0 From nobody Mon Feb 9 07:06:22 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1770071168; cv=none; d=zohomail.com; s=zohoarc; b=m+796VsU6b0wkihz7hxtvNToC6BUNm9/h8zyMJ2ib7VEuhRtPeVc5LaDazB702odaTe0KvA4IqGDnmnJ0dsJJOm4YjwN/uYiufDyC9H5Spe3zax9GrxMAIyP667Cqizx927q/Z295cNgkqOo/T94e6NW9gxHYHvxm7kyjQtiMMU= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1770071168; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=YstNmJa5PdlSLUf0W3RoDVAQE5Uz8f3BXKVj4i914pk=; b=IAkkpA/b4IWhSA9Q2XdByv/FsAu1jDIpRLmoIMu58laknUQqysNNFgXv9y9/Zia45JuB6bZ101whf/IqA/ghOyCllgqlziahH0x0ZY6viVEy0ko6g1erUcLXiIrJPXVWlEaGBcKr0sMmWI0awrNFGJ7qsMUvsy15rxjwpdD0S84= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1770071168181339.6563621021851; Mon, 2 Feb 2026 14:26:08 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1vn2MJ-0000CK-N6; Mon, 02 Feb 2026 17:25:27 -0500 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 1vn2M2-0008Lt-BP for qemu-devel@nongnu.org; Mon, 02 Feb 2026 17:25:11 -0500 Received: from mail-wm1-x342.google.com ([2a00:1450:4864:20::342]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1vn2Ly-0005uu-AR for qemu-devel@nongnu.org; Mon, 02 Feb 2026 17:25:10 -0500 Received: by mail-wm1-x342.google.com with SMTP id 5b1f17b1804b1-48039fdc8aeso29741595e9.3 for ; Mon, 02 Feb 2026 14:25:05 -0800 (PST) Received: from localhost.localdomain (88-187-86-199.subs.proxad.net. [88.187.86.199]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-435e1322dc7sm47209527f8f.37.2026.02.02.14.25.02 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Mon, 02 Feb 2026 14:25:03 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1770071104; x=1770675904; 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=YstNmJa5PdlSLUf0W3RoDVAQE5Uz8f3BXKVj4i914pk=; b=nmiRCOv4qh/yfjn0Vf/bJwZhqPAFvvjFGmIIzLK2svsX9CrU9qsh1DDm/anvmqYoDQ 7u7JEl2F6skVQ0mCzkYhAgzH4xbCxTncoLx9U1cYfS9O6pepjU2uLqw4KsoK2fD2SZ/z dnniQid9E0ZXuEQWCwv33VL6io/swRcJKxL/bdhU7Uvghnr6JnE3W01Di1mIkcAO15U4 V0FiWhFUmREgELQr9aLxfy0bjcmEBDSlNcRU8su+JFwa6Wout1ngzLbeHTofyUZYfKQT YUbtSfIgNQN2qws4OeTCX6eGRwplgSaZg5BURuHrmCYF8zGCi9RnfuwVBd4QpbDKfund 5VLA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1770071104; x=1770675904; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=YstNmJa5PdlSLUf0W3RoDVAQE5Uz8f3BXKVj4i914pk=; b=hSjWEEIYJMtE5RpH45bofFzdxSw597Jg9n7JCBRQnFvw0Qk6LF5iAHSJmNGxl/b93v 3x9neRzXJOlj6vzxPMtJO8OQ+er7G7GN7NwnpCpQAXTf/OsmA1wunNHuaGcuUoo447i7 julGH8saJBOKg+iGA26pf9+O9aweHCU8EjQu6Vioc87+H3lfcsfJtKkcUh4ZFnJsBUTm 0MEEu+kkn9TAadW6TKoTsYa4RiW+dNFFjXZBENwTNeRWLsr9iauuZXUmz4kPycnLMrok VXB0CIyzK8kWwTOcZSgbjckhS8usX1YjdKQsyKwCVnYUnZzycfkuEJRSN3q8r0F8ndyO 2fKA== X-Gm-Message-State: AOJu0Yz3I2ZimWroRE0zqVH44uG5HFL0LfTP4VuW4dEROxhDmMO3W+mE pusovKx4CzSPASvG0MpmRCEtjI+rVkKOh3HMvP4vUbE8tGlH0phGaMxobLq7w/5dubLQrW+02Td fsSBdAEZZHQ== X-Gm-Gg: AZuq6aIw7ghZmmVpUcYBHMVEjkQBCO4xLLlGdYNJUGNSI2Xg5kiI15KHiW2JkYgWZzi K5HuADQrT7kmj5iEkcE6BK2QC2JE/OADavnpX7GgnfRUMsOLhH6ISjpnjGHPNwvcGbe/xwIcosE A9/JCb0a7gxIszMRrrOHCHluxvr2gpuNteJxh52Op4Jv9JEzIdVDCuRpp/CIX54nWJWsK4etLMl KdOYkAhGhIQBnvSzB5PHhONum4JSBf6T/8XFtm6oZ35Pr/8XbBMdVKIahdwMfWtni4i44bZWjfU kVbzDsaM5vgqWEtNxxU+Hm6FX8/9V4WlmHnrCKaRazwuwGacs+Z8SoDiXDQB6ZN/GAPNiNbvMiy hBz/R/tx923aikn7JPpjSppWHeLjsM5JKh8LdXzKKL263Cxx/2O0O20MfR+DOgBVTUVEXyEOfVJ SPmnEVdyslY0sPa8IBtmatNUf8qTDsB0KzFZlMhYbCw5btMM+bB0jW2hki0zJY X-Received: by 2002:a05:600c:818f:b0:47b:deb9:f8a with SMTP id 5b1f17b1804b1-482db491bfbmr174421525e9.30.1770071104047; Mon, 02 Feb 2026 14:25:04 -0800 (PST) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: qemu-arm@nongnu.org, Richard Henderson , qemu-riscv@nongnu.org, =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Eduardo Habkost , Marcel Apfelbaum , Yanan Wang , Zhao Liu , Peter Maydell , Michael Rolnik , Brian Cain , Helge Deller , Paolo Bonzini , Song Gao , Laurent Vivier , "Edgar E. Iglesias" , Aurelien Jarno , Jiaxun Yang , Aleksandar Rikalo , Stafford Horne , Nicholas Piggin , Chinmay Rath , Palmer Dabbelt , Alistair Francis , Weiwei Li , Daniel Henrique Barboza , Liu Zhiwei , Yoshinori Sato , Thomas Huth , Ilya Leoshkevich , David Hildenbrand , Mark Cave-Ayland , Artyom Tarasenko , Max Filippov , qemu-ppc@nongnu.org, qemu-s390x@nongnu.org Subject: [PATCH 7/7] disas: Have disas_set_info() take a const CPUState Date: Mon, 2 Feb 2026 23:24:12 +0100 Message-ID: <20260202222412.24923-8-philmd@linaro.org> X-Mailer: git-send-email 2.52.0 In-Reply-To: <20260202222412.24923-1-philmd@linaro.org> References: <20260202222412.24923-1-philmd@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::342; envelope-from=philmd@linaro.org; helo=mail-wm1-x342.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=unavailable 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 development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1770071170392154100 The CPUClass::disas_set_info() handler is meant to initialize the %disassemble_info structure; it shoudn't alter the CPU state. Enforce the CPUState can not be modified by having the handler take a const pointer. Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Richard Henderson Reviewed-by: Thomas Huth --- include/hw/core/cpu.h | 2 +- target/alpha/cpu.c | 3 ++- target/arm/cpu.c | 6 +++--- target/avr/cpu.c | 2 +- target/hexagon/cpu.c | 3 ++- target/hppa/cpu.c | 2 +- target/i386/cpu.c | 6 +++--- target/loongarch/cpu.c | 3 ++- target/m68k/cpu.c | 2 +- target/microblaze/cpu.c | 2 +- target/mips/cpu.c | 7 +++++-- target/openrisc/cpu.c | 2 +- target/ppc/cpu_init.c | 5 +++-- target/riscv/cpu.c | 7 ++++--- target/rx/cpu.c | 2 +- target/s390x/cpu.c | 2 +- target/sh4/cpu.c | 3 ++- target/sparc/cpu.c | 3 ++- target/xtensa/cpu.c | 3 ++- 19 files changed, 38 insertions(+), 27 deletions(-) diff --git a/include/hw/core/cpu.h b/include/hw/core/cpu.h index 61da2ea4331..b2d33aac262 100644 --- a/include/hw/core/cpu.h +++ b/include/hw/core/cpu.h @@ -175,7 +175,7 @@ struct CPUClass { const char * (*gdb_arch_name)(CPUState *cpu); const char * (*gdb_get_core_xml_file)(CPUState *cpu); =20 - void (*disas_set_info)(CPUState *cpu, disassemble_info *info); + void (*disas_set_info)(const CPUState *cpu, disassemble_info *info); =20 const char *deprecation_note; struct AccelCPUClass *accel_cpu; diff --git a/target/alpha/cpu.c b/target/alpha/cpu.c index 932cddac055..1780db7d1e2 100644 --- a/target/alpha/cpu.c +++ b/target/alpha/cpu.c @@ -98,7 +98,8 @@ static int alpha_cpu_mmu_index(CPUState *cs, bool ifetch) return alpha_env_mmu_index(cpu_env(cs)); } =20 -static void alpha_cpu_disas_set_info(CPUState *cpu, disassemble_info *info) +static void alpha_cpu_disas_set_info(const CPUState *cpu, + disassemble_info *info) { info->endian =3D BFD_ENDIAN_LITTLE; info->mach =3D bfd_mach_alpha_ev6; diff --git a/target/arm/cpu.c b/target/arm/cpu.c index 586202071d0..c535b292d99 100644 --- a/target/arm/cpu.c +++ b/target/arm/cpu.c @@ -789,10 +789,10 @@ static void arm_wfxt_timer_cb(void *opaque) } #endif =20 -static void arm_disas_set_info(CPUState *cpu, disassemble_info *info) +static void arm_disas_set_info(const CPUState *cpu, disassemble_info *info) { - ARMCPU *ac =3D ARM_CPU(cpu); - CPUARMState *env =3D &ac->env; + const ARMCPU *ac =3D ARM_CPU(cpu); + const CPUARMState *env =3D &ac->env; bool sctlr_b =3D arm_sctlr_b(env); =20 if (is_a64(env)) { diff --git a/target/avr/cpu.c b/target/avr/cpu.c index 52237da3ce9..8579a7283b1 100644 --- a/target/avr/cpu.c +++ b/target/avr/cpu.c @@ -116,7 +116,7 @@ static void avr_cpu_reset_hold(Object *obj, ResetType t= ype) memset(env->r, 0, sizeof(env->r)); } =20 -static void avr_cpu_disas_set_info(CPUState *cpu, disassemble_info *info) +static void avr_cpu_disas_set_info(const CPUState *cpu, disassemble_info *= info) { info->endian =3D BFD_ENDIAN_LITTLE; info->mach =3D bfd_arch_avr; diff --git a/target/hexagon/cpu.c b/target/hexagon/cpu.c index 8ac4f49aa3b..58a22ee41f2 100644 --- a/target/hexagon/cpu.c +++ b/target/hexagon/cpu.c @@ -301,7 +301,8 @@ static void hexagon_cpu_reset_hold(Object *obj, ResetTy= pe type) set_float_default_nan_pattern(0b11111111, &env->fp_status); } =20 -static void hexagon_cpu_disas_set_info(CPUState *s, disassemble_info *info) +static void hexagon_cpu_disas_set_info(const CPUState *cs, + disassemble_info *info) { info->print_insn =3D print_insn_hexagon; info->endian =3D BFD_ENDIAN_LITTLE; diff --git a/target/hppa/cpu.c b/target/hppa/cpu.c index 0ca79ee5e23..714f3bbdaf7 100644 --- a/target/hppa/cpu.c +++ b/target/hppa/cpu.c @@ -150,7 +150,7 @@ static int hppa_cpu_mmu_index(CPUState *cs, bool ifetch) return env->psw & PSW_W ? MMU_ABS_W_IDX : MMU_ABS_IDX; } =20 -static void hppa_cpu_disas_set_info(CPUState *cs, disassemble_info *info) +static void hppa_cpu_disas_set_info(const CPUState *cs, disassemble_info *= info) { info->mach =3D bfd_mach_hppa20; info->endian =3D BFD_ENDIAN_BIG; diff --git a/target/i386/cpu.c b/target/i386/cpu.c index 45f0b80deb0..0a7b884528e 100644 --- a/target/i386/cpu.c +++ b/target/i386/cpu.c @@ -10359,10 +10359,10 @@ static bool x86_cpu_has_work(CPUState *cs) } #endif /* !CONFIG_USER_ONLY */ =20 -static void x86_disas_set_info(CPUState *cs, disassemble_info *info) +static void x86_disas_set_info(const CPUState *cs, disassemble_info *info) { - X86CPU *cpu =3D X86_CPU(cs); - CPUX86State *env =3D &cpu->env; + const X86CPU *cpu =3D X86_CPU(cs); + const CPUX86State *env =3D &cpu->env; =20 info->endian =3D BFD_ENDIAN_LITTLE; info->mach =3D (env->hflags & HF_CS64_MASK ? bfd_mach_x86_64 diff --git a/target/loongarch/cpu.c b/target/loongarch/cpu.c index b6539485266..4fa629cb144 100644 --- a/target/loongarch/cpu.c +++ b/target/loongarch/cpu.c @@ -506,7 +506,8 @@ static void loongarch_cpu_reset_hold(Object *obj, Reset= Type type) cs->exception_index =3D -1; } =20 -static void loongarch_cpu_disas_set_info(CPUState *s, disassemble_info *in= fo) +static void loongarch_cpu_disas_set_info(const CPUState *cs, + disassemble_info *info) { info->endian =3D BFD_ENDIAN_LITTLE; info->print_insn =3D print_insn_loongarch; diff --git a/target/m68k/cpu.c b/target/m68k/cpu.c index b55e604b11d..c721a23b966 100644 --- a/target/m68k/cpu.c +++ b/target/m68k/cpu.c @@ -176,7 +176,7 @@ static void m68k_cpu_reset_hold(Object *obj, ResetType = type) env->pc =3D 0; } =20 -static void m68k_cpu_disas_set_info(CPUState *s, disassemble_info *info) +static void m68k_cpu_disas_set_info(const CPUState *cs, disassemble_info *= info) { info->print_insn =3D print_insn_m68k; info->endian =3D BFD_ENDIAN_BIG; diff --git a/target/microblaze/cpu.c b/target/microblaze/cpu.c index 53649ec6567..ae41a1a3287 100644 --- a/target/microblaze/cpu.c +++ b/target/microblaze/cpu.c @@ -233,7 +233,7 @@ static void mb_cpu_reset_hold(Object *obj, ResetType ty= pe) #endif } =20 -static void mb_disas_set_info(CPUState *cpu, disassemble_info *info) +static void mb_disas_set_info(const CPUState *cpu, disassemble_info *info) { info->mach =3D bfd_arch_microblaze; info->print_insn =3D print_insn_microblaze; diff --git a/target/mips/cpu.c b/target/mips/cpu.c index f74a9d5f615..e424d115018 100644 --- a/target/mips/cpu.c +++ b/target/mips/cpu.c @@ -422,9 +422,12 @@ static void mips_cpu_reset_hold(Object *obj, ResetType= type) #endif } =20 -static void mips_cpu_disas_set_info(CPUState *s, disassemble_info *info) +static void mips_cpu_disas_set_info(const CPUState *cs, disassemble_info *= info) { - if (!(cpu_env(s)->insn_flags & ISA_NANOMIPS32)) { + const MIPSCPU *cpu =3D MIPS_CPU(cs); + const CPUMIPSState *env =3D &cpu->env; + + if (!(env->insn_flags & ISA_NANOMIPS32)) { info->endian =3D TARGET_BIG_ENDIAN ? BFD_ENDIAN_BIG : BFD_ENDIAN_LITTLE; info->print_insn =3D TARGET_BIG_ENDIAN ? print_insn_big_mips diff --git a/target/openrisc/cpu.c b/target/openrisc/cpu.c index 9bbfe22ed3a..c64542a59a2 100644 --- a/target/openrisc/cpu.c +++ b/target/openrisc/cpu.c @@ -94,7 +94,7 @@ static int openrisc_cpu_mmu_index(CPUState *cs, bool ifet= ch) return MMU_NOMMU_IDX; /* mmu is disabled */ } =20 -static void openrisc_disas_set_info(CPUState *cpu, disassemble_info *info) +static void openrisc_disas_set_info(const CPUState *cpu, disassemble_info = *info) { info->endian =3D BFD_ENDIAN_BIG; info->print_insn =3D print_insn_or1k; diff --git a/target/ppc/cpu_init.c b/target/ppc/cpu_init.c index 58816c51a74..d67db2e0064 100644 --- a/target/ppc/cpu_init.c +++ b/target/ppc/cpu_init.c @@ -7452,9 +7452,10 @@ static bool ppc_pvr_match_default(PowerPCCPUClass *p= cc, uint32_t pvr, bool best) return pcc->pvr =3D=3D pvr; } =20 -static void ppc_disas_set_info(CPUState *cs, disassemble_info *info) +static void ppc_disas_set_info(const CPUState *cs, disassemble_info *info) { - CPUPPCState *env =3D cpu_env(cs); + const PowerPCCPU *cpu =3D POWERPC_CPU(cs); + const CPUPPCState *env =3D &cpu->env; =20 if ((env->hflags >> MSR_LE) & 1) { info->endian =3D BFD_ENDIAN_LITTLE; diff --git a/target/riscv/cpu.c b/target/riscv/cpu.c index e95eea02493..e56470a3748 100644 --- a/target/riscv/cpu.c +++ b/target/riscv/cpu.c @@ -795,10 +795,11 @@ static void riscv_cpu_reset_hold(Object *obj, ResetTy= pe type) #endif } =20 -static void riscv_cpu_disas_set_info(CPUState *s, disassemble_info *info) +static void riscv_cpu_disas_set_info(const CPUState *s, disassemble_info *= info) { - RISCVCPU *cpu =3D RISCV_CPU(s); - CPURISCVState *env =3D &cpu->env; + const RISCVCPU *cpu =3D RISCV_CPU(s); + const CPURISCVState *env =3D &cpu->env; + info->target_info =3D &cpu->cfg; =20 /* diff --git a/target/rx/cpu.c b/target/rx/cpu.c index 0437edca1ba..b5284199e6d 100644 --- a/target/rx/cpu.c +++ b/target/rx/cpu.c @@ -178,7 +178,7 @@ static void rx_cpu_set_irq(void *opaque, int no, int re= quest) } } =20 -static void rx_cpu_disas_set_info(CPUState *cpu, disassemble_info *info) +static void rx_cpu_disas_set_info(const CPUState *cpu, disassemble_info *i= nfo) { info->endian =3D BFD_ENDIAN_LITTLE; info->mach =3D bfd_mach_rx; diff --git a/target/s390x/cpu.c b/target/s390x/cpu.c index cd472d38be7..c074e12ba2d 100644 --- a/target/s390x/cpu.c +++ b/target/s390x/cpu.c @@ -222,7 +222,7 @@ static void s390_cpu_reset_hold(Object *obj, ResetType = type) } } =20 -static void s390_cpu_disas_set_info(CPUState *cpu, disassemble_info *info) +static void s390_cpu_disas_set_info(const CPUState *cpu, disassemble_info = *info) { info->mach =3D bfd_mach_s390_64; info->cap_arch =3D CS_ARCH_SYSZ; diff --git a/target/sh4/cpu.c b/target/sh4/cpu.c index 1dd21ad9ed6..e2bde457618 100644 --- a/target/sh4/cpu.c +++ b/target/sh4/cpu.c @@ -164,7 +164,8 @@ static void superh_cpu_reset_hold(Object *obj, ResetTyp= e type) set_float_ftz_detection(float_ftz_before_rounding, &env->fp_status); } =20 -static void superh_cpu_disas_set_info(CPUState *cpu, disassemble_info *inf= o) +static void superh_cpu_disas_set_info(const CPUState *cpu, + disassemble_info *info) { info->endian =3D TARGET_BIG_ENDIAN ? BFD_ENDIAN_BIG : BFD_ENDIAN_LITTLE; diff --git a/target/sparc/cpu.c b/target/sparc/cpu.c index bfc6fb9d00d..3991681d1d1 100644 --- a/target/sparc/cpu.c +++ b/target/sparc/cpu.c @@ -103,7 +103,8 @@ static bool sparc_cpu_exec_interrupt(CPUState *cs, int = interrupt_request) } #endif /* !CONFIG_USER_ONLY */ =20 -static void cpu_sparc_disas_set_info(CPUState *cpu, disassemble_info *info) +static void cpu_sparc_disas_set_info(const CPUState *cpu, + disassemble_info *info) { info->print_insn =3D print_insn_sparc; info->endian =3D BFD_ENDIAN_BIG; diff --git a/target/xtensa/cpu.c b/target/xtensa/cpu.c index ecc5e093a40..86ec899a67c 100644 --- a/target/xtensa/cpu.c +++ b/target/xtensa/cpu.c @@ -226,7 +226,8 @@ static ObjectClass *xtensa_cpu_class_by_name(const char= *cpu_model) return oc; } =20 -static void xtensa_cpu_disas_set_info(CPUState *cs, disassemble_info *info) +static void xtensa_cpu_disas_set_info(const CPUState *cs, + disassemble_info *info) { XtensaCPU *cpu =3D XTENSA_CPU(cs); =20 --=20 2.52.0