From nobody Thu Apr 16 20:57:20 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=1772061296; cv=none; d=zohomail.com; s=zohoarc; b=jNozp3SAq7nZRcO/Q/BRsFcQIn2Jr5VS2V7Q3oFxXQG7l1SCfHSxyrqlvva6bPZXG5c7PgzDab0NT+IjjdtTkspJ+E8Hn5hAu4wAoWptTrGszaoBFYfNC+mvIoD95xsmNvXN0C7cxJx/BowXTEtqxb/2+JSLgpieMJQ1cf0IZAM= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1772061296; h=Content-Type:Content-Transfer-Encoding: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:Cc; bh=q6Q5twDVx+EMyTGURjeIurHbeB+x9YVAYczCagCNOKI=; b=APLY3l3dGjVHPs1wSdeab/GrgiMJRDhkjlLkbLvHQiGOjVAjP08JYorAQF0q2diP5kyFWuGf7ufkrCkmlX6gmbqfywcSATfZsNth/tqc7xGtgSm9VjHCgkXPLUA8MfdZiouCz8+v3tD59/hCg6R6dxbjOHQvR+5s7lZNiB2P0bg= 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 1772061296818455.8478994471926; Wed, 25 Feb 2026 15:14:56 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1vvO5I-0004fl-NT; Wed, 25 Feb 2026 18:14:24 -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 1vvO5H-0004fZ-HY for qemu-devel@nongnu.org; Wed, 25 Feb 2026 18:14:23 -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 1vvO5F-0002Yb-T1 for qemu-devel@nongnu.org; Wed, 25 Feb 2026 18:14:23 -0500 Received: by mail-wm1-x336.google.com with SMTP id 5b1f17b1804b1-480706554beso3653835e9.1 for ; Wed, 25 Feb 2026 15:14:21 -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-483c3b3474dsm4795205e9.1.2026.02.25.15.14.19 for (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Wed, 25 Feb 2026 15:14:19 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1772061260; x=1772666060; 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=q6Q5twDVx+EMyTGURjeIurHbeB+x9YVAYczCagCNOKI=; b=bla0pk1WOy+H9pdwxFSCxcWWfxa1a1Z8HCRVaa558BX7wQSOxICln+wRaUM9ogn46D OZnb1vV5/Fg59apmYiD/3tPtXgXA6JtTdk3hnPQp5HmY4OQx98/DIdeoUwd9QDbRdEk2 SefDf+fas6wF8PtIT0kZOn8RQPq7VDyzJExBql+RDdWKya/9SPU88jZVRRsgiqa7zz4L 2HS1qjkLNIddCQnU2V/Sq4G8IPOtmEpXff/FSvLS/V4NSrhqv/M/EerDUW5TSPxA1dmY EqzA/Sc/iUu4uwbtJmobWzkB61jzFBlMB8wtPEUURfPxsaIvT4ANQuhxSOhIn/Ae1BLh og3A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1772061260; x=1772666060; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-gg:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to; bh=q6Q5twDVx+EMyTGURjeIurHbeB+x9YVAYczCagCNOKI=; b=LcQD2cinP/7uMCq2hjZoVX7MBlfZ6KhudpbfY7RSKEid0NfqtFeXU6GIsgW0Fb+t9n Suz1W3TH5kKJAw+2idYd5Bl2J+VtbIU23f9adEwB31m9B7oMF5eULRWX/p4r/IqVlww8 PraPAv+Uvx4+Lk35/dW1PXWyeW0ZBUw/SvnpKnIiGW9Uw/9uW0XSoRHUnwVevgQl4zKP rxF1SRHwW+XwcRNi3TFfWc3SseRDeOjCYlvIuVI8Xmn/NMOmr4un+WD0aYWVEfgIfkhw cUBeeZQK8TvbV5ABAGkJyKv3lArgpGs9gFLyvHFLnr0Sl53QMFO13GXas/inLtRQa9hX +MAw== X-Gm-Message-State: AOJu0YylD+o2jhuCZPkA72RxGOe0c/8YbA8oEJUolMZfHBmofbATSRa4 6c3yDlxpovCKiUkYT3x9P28DZkBKcNETGs7R6ZCFwIdp0urYzquj/6J8dQ1HFrIlQMcCfxoMsu2 ZdNhqrfw= X-Gm-Gg: ATEYQzxBqYbC7uye42kgAOXDFUYZ4yisB/bcnoQjI56kO2e5MKKcm4B2pMw7YcSQHEZ b9KukBLLFBuBfBsjTzJ5e6gB0x9AkzvHKahNFDDBB6GSn/RC4yvP230/aOmEwTzWo1yCjL19I8Z M96qHBea087gIekAC4QQHU4emPh4K1YejV3iuWMfFQ1CJP0hjMC9OKL10NIba5XVR14niH2ikMw QLEWTV5nqBzrKWG3sBoqwcFwYHnvToXJCpCJ+kL598c2mwrHIWrBiW10OQZtpSw+cRPkEfb1obY /pnilYO+L92rrS6D+TtPNIN+4VV3hMkLF7FHyuX1G/4Ht2jiFGco+5t0IHqtXvOXPlO7zN9GsG8 zn9dIkOL+lD6+RP90Y/5HDqCUxdAJ33s8iNWCEziGfYJPVBgWtemYu2U1FDNlZR7J/h++44ttfp MhuVq4/jpNx5hEiCPTr/gBI447OY1YdTsy/XXBfTPhUnN78HYAlrzC1SJb1nbrkaMTLnGgcIqf X-Received: by 2002:a05:600c:6815:b0:47e:e946:3a72 with SMTP id 5b1f17b1804b1-483c21a10c5mr36598535e9.27.1772061259860; Wed, 25 Feb 2026 15:14:19 -0800 (PST) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PULL 01/70] target/hppa: Define PA[20|1X] physical address space size Date: Thu, 26 Feb 2026 00:13:01 +0100 Message-ID: <20260225231411.96482-2-philmd@linaro.org> X-Mailer: git-send-email 2.52.0 In-Reply-To: <20260225231411.96482-1-philmd@linaro.org> References: <20260225231411.96482-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=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: 1772061298430158500 From: Anton Johansson When converting virtual to physical addresses, TARGET_PHYS_ADDR_SPACE_BITS is used under PA-RISC 2.0, and an explicit cast to uint32_t is used under PA-RISC 1.X. Replace the former with a more specific macro limited to mem_helper.c, and make the latter conversion explicit by defining the size of the physical address space for PA-RISC 1.X. Note: while 44 bits should be used for the 64-bit address space running a C3700, 40 bits is still chosen as this is expected by the SeaBIOS functional test. Reviewed-by: Richard Henderson Signed-off-by: Anton Johansson Message-ID: <20260218-phys_addr-v6-1-a603bf363218@rev.ng> Signed-off-by: Philippe Mathieu-Daud=C3=A9 --- target/hppa/cpu.h | 1 + target/hppa/mem_helper.c | 32 +++++++++++++++++++++++++++----- 2 files changed, 28 insertions(+), 5 deletions(-) diff --git a/target/hppa/cpu.h b/target/hppa/cpu.h index 012e54f8f6f..092e647ccf5 100644 --- a/target/hppa/cpu.h +++ b/target/hppa/cpu.h @@ -336,6 +336,7 @@ static inline vaddr hppa_form_gva(CPUHPPAState *env, ui= nt64_t spc, return hppa_form_gva_mask(env->gva_offset_mask, spc, off); } =20 +hwaddr hppa_abs_to_phys_pa1x(vaddr addr); hwaddr hppa_abs_to_phys_pa2_w0(vaddr addr); hwaddr hppa_abs_to_phys_pa2_w1(vaddr addr); =20 diff --git a/target/hppa/mem_helper.c b/target/hppa/mem_helper.c index cce82e65999..9199d1e06ab 100644 --- a/target/hppa/mem_helper.c +++ b/target/hppa/mem_helper.c @@ -29,6 +29,28 @@ #include "hw/core/cpu.h" #include "trace.h" =20 +/* + * 64-bit (PA-RISC 2.0) machines are assumed to run PA-8700, and 32-bit + * machines 7300LC. This should give 44 and 32 bits of physical address + * space respectively. + * + * CPU model Physical address space bits + * PA-7000--7300LC 32 + * PA-8000--8600 40 + * PA-8700--8900 44 + * + * FIXME: However, the SeaBIOS firmware that is that tested against + * uses 40-bit physical addresses, despite supposedly running a C3700 + * with a PA-8700 cpu, so use 40-bits for 64-bit. + */ +#define HPPA_PHYS_ADDR_SPACE_BITS_PA20 40 +#define HPPA_PHYS_ADDR_SPACE_BITS_PA1X 32 + +hwaddr hppa_abs_to_phys_pa1x(vaddr addr) +{ + return extract64(addr, 0, HPPA_PHYS_ADDR_SPACE_BITS_PA1X); +} + hwaddr hppa_abs_to_phys_pa2_w1(vaddr addr) { /* @@ -42,8 +64,8 @@ hwaddr hppa_abs_to_phys_pa2_w1(vaddr addr) * Since the supported physical address space is below 54 bits, the * H-8 algorithm is moot and all that is left is to truncate. */ - QEMU_BUILD_BUG_ON(TARGET_PHYS_ADDR_SPACE_BITS > 54); - return sextract64(addr, 0, TARGET_PHYS_ADDR_SPACE_BITS); + QEMU_BUILD_BUG_ON(HPPA_PHYS_ADDR_SPACE_BITS_PA20 > 54); + return sextract64(addr, 0, HPPA_PHYS_ADDR_SPACE_BITS_PA20); } =20 hwaddr hppa_abs_to_phys_pa2_w0(vaddr addr) @@ -67,7 +89,7 @@ hwaddr hppa_abs_to_phys_pa2_w0(vaddr addr) * is what can be seen on physical machines too. */ addr =3D (uint32_t)addr; - addr |=3D -1ull << (TARGET_PHYS_ADDR_SPACE_BITS - 4); + addr |=3D -1ull << (HPPA_PHYS_ADDR_SPACE_BITS_PA20 - 4); } return addr; } @@ -217,7 +239,7 @@ int hppa_get_physical_address(CPUHPPAState *env, vaddr = addr, int mmu_idx, if (hppa_is_pa20(env)) { phys =3D hppa_abs_to_phys_pa2_w0(addr); } else { - phys =3D (uint32_t)addr; + phys =3D hppa_abs_to_phys_pa1x(addr); } break; default: @@ -558,7 +580,7 @@ static void itlbt_pa20(CPUHPPAState *env, target_ulong = r1, /* Align per the page size. */ ent->pa &=3D TARGET_PAGE_MASK << mask_shift; /* Ignore the bits beyond physical address space. */ - ent->pa =3D sextract64(ent->pa, 0, TARGET_PHYS_ADDR_SPACE_BITS); + ent->pa =3D sextract64(ent->pa, 0, HPPA_PHYS_ADDR_SPACE_BITS_PA20); =20 ent->t =3D extract64(r2, 61, 1); ent->d =3D extract64(r2, 60, 1); --=20 2.52.0 From nobody Thu Apr 16 20:57:20 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=1772061342; cv=none; d=zohomail.com; s=zohoarc; b=DdCln753Kp1cPB/4TUg+jPmhJ2Uhis6Y89+KDLaxxmZ73ixC1IJGiwofoKOqiOBCuNsONOFXL0zT418N6Du9dYnWJXKRFDI1FzKXBz9aYxp46fmYHT1G3coUlSvT+klmVHDmCqpT/LMB+O2Vuo2V+98gBezdnzUHx2vPBk6NeGA= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1772061342; h=Content-Type:Content-Transfer-Encoding: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:Cc; bh=+EFWR+yGZeveVEqBfwc2eMPoR02jwfsAg8piyqcFPQc=; b=fCrTqx8SM5idB0KEuDm1KW304Jd4ueILWeQDnrV6eZ60AGHDZ+r6Q63etOuCpn/L3Enbzc72FDG72cE0yhx8S4f4e/JQWxVfsR0U0TXzYpdgTzms20P1N5DZwOcI2WAmYIfWodrm2RG3YJvppbrs54dNXhsS+v1ilX90hdaXoxc= 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 1772061342121316.26817884926356; Wed, 25 Feb 2026 15:15:42 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1vvO5Q-0004hB-4b; Wed, 25 Feb 2026 18:14:32 -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 1vvO5N-0004ge-UF for qemu-devel@nongnu.org; Wed, 25 Feb 2026 18:14:29 -0500 Received: from mail-wm1-x32a.google.com ([2a00:1450:4864:20::32a]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1vvO5M-0002Yw-G4 for qemu-devel@nongnu.org; Wed, 25 Feb 2026 18:14:29 -0500 Received: by mail-wm1-x32a.google.com with SMTP id 5b1f17b1804b1-4833115090dso2886975e9.3 for ; Wed, 25 Feb 2026 15:14:27 -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-483c3b84023sm3783345e9.12.2026.02.25.15.14.25 for (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Wed, 25 Feb 2026 15:14:25 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1772061266; x=1772666066; 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=+EFWR+yGZeveVEqBfwc2eMPoR02jwfsAg8piyqcFPQc=; b=xc5UEMfJ1RqDcikC8PVmCBe9DlD/8bVoTOIvJVfxtwJ9OZlcTn9uvSvUTahHs9Klu/ sLLgvR0R2+yhA5TZY00mkxfrgjihJlfj2FZNj9bnpLd20Fhk6EybrwllW8NDgAiy8UsK jIKOBHen/x8pihd5JYBXUUam5t32gW7izwwccQt3HP98YMRIEyyL1By9fyJqplazT/xI R6m6j1erYSxbOQLvABs9YxJY8yM0bEyFDTS/EKxzINxFKIXPleF7EC0amUOk/XW6092z yQGH0/RfS9ZMHzd3eH4cWAcrRmet6X6MuC4v6XzFb5CxWQ8CT0hmKcc0lXaxt+fmd11h egBA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1772061266; x=1772666066; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-gg:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to; bh=+EFWR+yGZeveVEqBfwc2eMPoR02jwfsAg8piyqcFPQc=; b=P5/tsZHJ7r4sw1cV3oxZX7nOmuOGsBwYJXacId+vLhTVyDTaKuKienfwNXW3Oev7GU l9wXjnaNUMfLur4mxXWFnpRSIGvz8XMcrvfwL2dDF++J0fllrJzqfepYKxkbvbQ2Hk76 Tr34Qgnh3gIOl6t1GsXO9v0lzGEEN6UMiy4iNVzF8eBRA78CqcD7xkoj3txQFYLzgIdZ 1ONI6EFrPPZvIAMvzsNL4kCK5np1Wh7e036zgBHZhm7D/jHL0hKlWVO2MBl3BXX3uZM5 vhpl/orOUbnKmV0m2LNXZtbDxdpUeF3V0R3SkRuVmba5S0wE3fow3GaHHgXuk37+V4/C R0WA== X-Gm-Message-State: AOJu0Yy8jyuY5FxFR1Dafpb8NEK+Df9Nwjde6t7BZ420Uz5auH3uXoTV 2HJbRoTb0rXeIPvc+Ua8QtMPXfnU/TaT5vxXGQZVT9zon10s/dn7Ut4/6XH12+br3+4tGDxZeto U0xUXKfE= X-Gm-Gg: ATEYQzwZDOfcEoEuaB7M5udJIYr0OD2Km87pQD85tITnZWgcyh4GkgGUtJAzDpTo/4+ s5qgjYZDWch8JezjwcOWe0wwqxNIZ94BRRPbH8C8BFnSa1fgvsvisu5tiOhavB7p2uRBZpINodf QwEN4Ax6UfMkfv+7efnmXSTumXG1nYWXC9TVcik1eaSCnw1VwRJcKSZksy+yBSTxaqKRRB2/n1Q 8aNh/on7K1oWDp+juuUuKrkOLUL6ryQBpH8zh0vPB55Bb515jZ16hx9PHBxvrjLyYdi5h3Zjtz9 a0Wkic0JG4YPfyGVZ6YOVXYjBoP3UPWQYq6Jb6H+kgu9N1g2FkIq9Uru2RC64rokmH3MU0/R9M1 IZw7vK8f1w/cggRFCa90PndgmhK7HGFlGbhFeH3zr+8ANQs3stJF0wpSc+9l4tG8ChKnbmQ+sIn gNx30LU7Cfm6TtjIxG9fQWIArS6YHjnmCw8gOljsWy8q8NKHk9l/EuhmEOWbX3kuf+VJEkJUUP X-Received: by 2002:a05:600c:34d2:b0:47a:935f:61a0 with SMTP id 5b1f17b1804b1-483c3c70913mr2098465e9.0.1772061266322; Wed, 25 Feb 2026 15:14:26 -0800 (PST) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PULL 02/70] hw/hppa: Use hppa_abs_to_phys_pa1x() Date: Thu, 26 Feb 2026 00:13:02 +0100 Message-ID: <20260225231411.96482-3-philmd@linaro.org> X-Mailer: git-send-email 2.52.0 In-Reply-To: <20260225231411.96482-1-philmd@linaro.org> References: <20260225231411.96482-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::32a; envelope-from=philmd@linaro.org; helo=mail-wm1-x32a.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: 1772061344412158500 From: Anton Johansson Makes the physical address space conversion for 32 bit machines more explicit, using the translation function defined in mem_helper.c. Reviewed-by: Richard Henderson Signed-off-by: Anton Johansson Message-ID: <20260218-phys_addr-v6-2-a603bf363218@rev.ng> Signed-off-by: Philippe Mathieu-Daud=C3=A9 --- hw/hppa/machine.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/hppa/machine.c b/hw/hppa/machine.c index 2cf4239a430..f55e84529f6 100644 --- a/hw/hppa/machine.c +++ b/hw/hppa/machine.c @@ -181,7 +181,7 @@ static uint64_t linux_kernel_virt_to_phys(void *opaque,= uint64_t addr) =20 static uint64_t translate_pa10(void *dummy, uint64_t addr) { - return (uint32_t)addr; + return hppa_abs_to_phys_pa1x(addr); } =20 static uint64_t translate_pa20(void *dummy, uint64_t addr) --=20 2.52.0 From nobody Thu Apr 16 20:57:20 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=1772061358; cv=none; d=zohomail.com; s=zohoarc; b=brWskodkG0+x8a2zQCz/zXGyS/7fFVfPB9EQYQoncpGHqoUQ/hryhaLXBKv5HXVh3zHyH74HXF+HqEXMcta52Lo3MN/wr0S16+n/SBqyLn99N07AfcRyjturQwvO/7lSMa/xKHa41//O2DctZVj892rCwUIlNEepICZtkCQCT0E= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1772061358; h=Content-Type:Content-Transfer-Encoding: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:Cc; bh=72MRBAv6Zx8+rZkBnJ5ANfwGHRs2IvhvjHTGTLXrFcY=; b=Gh5u3pfNkhZYLD61lo2PP3ZtXWsmC6UGHyDRC+2b9tpsIktlr/ZHDhP8AwqL3EJIzoHBSFi/cjxRsS3ly4YA5+0v/eG6zOsCVtudWDHGaru+e+r9facacSZ1w7W4++suFSPmwMIsgyOPQvZUOV8JArCxO6itEwTAXzxKfmUz3nM= 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 1772061358906387.02247833581725; Wed, 25 Feb 2026 15:15:58 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1vvO5W-0004hy-LN; Wed, 25 Feb 2026 18:14:38 -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 1vvO5V-0004hm-Dt for qemu-devel@nongnu.org; Wed, 25 Feb 2026 18:14:37 -0500 Received: from mail-wr1-x42e.google.com ([2a00:1450:4864:20::42e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1vvO5T-0002ZN-Si for qemu-devel@nongnu.org; Wed, 25 Feb 2026 18:14:37 -0500 Received: by mail-wr1-x42e.google.com with SMTP id ffacd0b85a97d-436e87589e8so194799f8f.3 for ; Wed, 25 Feb 2026 15:14:35 -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-43970d4cc81sm36348225f8f.26.2026.02.25.15.14.32 for (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Wed, 25 Feb 2026 15:14:33 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1772061274; x=1772666074; 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=72MRBAv6Zx8+rZkBnJ5ANfwGHRs2IvhvjHTGTLXrFcY=; b=Yq0hvVkWJmWViP6raUSrK2b6V9EiHQtcbMADDLENkaA5DeY8mp3fRS3eJb7e2RIlFN YRRJE0Q1avn4EaallfCFng8xjhhL2eFNMzGqcUEpQLIZfMkc9L16H2eParTOlYbl5qab Ar9CMFDi+ZvsUZCtqGi7ZPH3O6I4qCOGd1F+AszTgtRrnByK5kbcask+8oMQpx+vSZtL EuzA5vFAFYbwu1EJEfXOimO7SCXxL52nyzLj5qIzKuy2gZn5KT4CVY3/hi6YsZiIybxb jDXsTbAvhPHjgktxuWMoOd77ppW0tiUim+DvBOae89uLFq1EXO8CJGx6IBpQmyIU7S5a /gbg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1772061274; x=1772666074; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-gg:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to; bh=72MRBAv6Zx8+rZkBnJ5ANfwGHRs2IvhvjHTGTLXrFcY=; b=SjOCKb1relREfyYHPbaXDhQa12P7d9CH66PS1nwqVn7qJsAHv5cZqystgNGmotYGnG +9AC7NBu+DTrDmU/GbNOaZS8BcUM8TyccVZiKKX+QeUTT38SKGmA7zBSyEjudRvu166J udEYpKbDRJ69I831Lfs0yusxuRBiTIa67ZUHabzNSfPNPRBl/YLRintk9e1juzp/5zHU ptmVCoKjiboIufuwQLviVMyvy33kzjCkiLOKA2YCVvujkBo1N1G7nelSZ+k9Q0N058Ie vWi7J4B7OTCBXbDv4bKpsoCv26o8JjigbjOGV3IXu6mZ8Pc/QvrelcqzvG0h4YruNoQr s6bA== X-Gm-Message-State: AOJu0YyBSES1t5IHGj72lExc8n0Ei0N35NjnqAjjJx0IqnOAagdxmP0Q L9pf7piJOe7nWnu8qak/D6dSwHfTXIJYi17baWvSQhrEr6whNxwzN4PPo6MAyGmMdt+Iw6v/eM3 K5vpERuY= X-Gm-Gg: ATEYQzzXS8Ls8FK0e10i0WpHvxxZmNff4H5e82fGgF4d1++ID9607goo07Cr2GPaAUC K6sAThGUw4CZwlOkhfHF7GdGPLikB8IhGnFYzNFyOJEPIvm4M+rwLBdmPG0tlBu9uvQTkgCfOsq XS51ycoWZIdMm9OSMvWZlpzeFwmiFJL9ykZ9ISLtoss8uS2xSE/ZRfLbaeveFwdsSJwzDZYLLWW 1HBKZloVziDpKaNGnz7fs0L1oMtEljVy/Af57OhBcg167r/9TLuJbF3li+0ZkrjdouyhfkQyOmY H9SLZ41+Y5WtBfgH9Wfk287Fc/Fy8Rx0MDOj6Lv40v/AF2TKXRb93u9wK3diOGnun+l1ghweRj3 UgRLctuv/carBDEI1kHJ9awzxI6oVCyDRx3GY+l9zBGPrv2muKITO8WsngeTAl+roPlduCzw/G7 bwChtsZuxxpbz3ELwEKyM8otHsMlO3cWKeQRr63w2e6w5RupuB8gwqGEQFB6hnTNOmoUx5tCcV X-Received: by 2002:a05:6000:40c9:b0:439:953c:2d77 with SMTP id ffacd0b85a97d-439953c2f90mr3159432f8f.43.1772061273733; Wed, 25 Feb 2026 15:14:33 -0800 (PST) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PULL 03/70] target/i386: Drop physical address range checks Date: Thu, 26 Feb 2026 00:13:03 +0100 Message-ID: <20260225231411.96482-4-philmd@linaro.org> X-Mailer: git-send-email 2.52.0 In-Reply-To: <20260225231411.96482-1-philmd@linaro.org> References: <20260225231411.96482-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::42e; envelope-from=philmd@linaro.org; helo=mail-wr1-x42e.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: 1772061360450158501 From: Anton Johansson Since TARGET_PHYS_ADDR_SPACE_BITS is now fixed to 64 bits for all targets we can remove range checks on cpu->phys_bits and TCG_PHYS_ADDR_BITS. Reviewed-by: Richard Henderson Signed-off-by: Anton Johansson Message-ID: <20260218-phys_addr-v6-3-a603bf363218@rev.ng> Signed-off-by: Philippe Mathieu-Daud=C3=A9 --- target/i386/tcg/helper-tcg.h | 2 -- target/i386/cpu.c | 9 +++------ target/i386/kvm/kvm.c | 3 +-- 3 files changed, 4 insertions(+), 10 deletions(-) diff --git a/target/i386/tcg/helper-tcg.h b/target/i386/tcg/helper-tcg.h index e41cbda407a..f4b2ff740d5 100644 --- a/target/i386/tcg/helper-tcg.h +++ b/target/i386/tcg/helper-tcg.h @@ -31,8 +31,6 @@ # define TCG_PHYS_ADDR_BITS 36 #endif =20 -QEMU_BUILD_BUG_ON(TCG_PHYS_ADDR_BITS > TARGET_PHYS_ADDR_SPACE_BITS); - /** * x86_cpu_do_interrupt: * @cpu: vCPU the interrupt is to be handled by. diff --git a/target/i386/cpu.c b/target/i386/cpu.c index eaa01438c1b..9b9ed2d1e38 100644 --- a/target/i386/cpu.c +++ b/target/i386/cpu.c @@ -9941,12 +9941,9 @@ static void x86_cpu_realizefn(DeviceState *dev, Erro= r **errp) * accel-specific code in cpu_exec_realizefn. */ if (env->features[FEAT_8000_0001_EDX] & CPUID_EXT2_LM) { - if (cpu->phys_bits && - (cpu->phys_bits > TARGET_PHYS_ADDR_SPACE_BITS || - cpu->phys_bits < 32)) { - error_setg(errp, "phys-bits should be between 32 and %u " - " (but is %u)", - TARGET_PHYS_ADDR_SPACE_BITS, cpu->phys_bits); + if (cpu->phys_bits && cpu->phys_bits < 32) { + error_setg(errp, "phys-bits should be at least 32" + " (but is %u)", cpu->phys_bits); return; } /* diff --git a/target/i386/kvm/kvm.c b/target/i386/kvm/kvm.c index 9f1a4d4cbb2..3b66ec8c42b 100644 --- a/target/i386/kvm/kvm.c +++ b/target/i386/kvm/kvm.c @@ -4983,8 +4983,7 @@ static int kvm_get_msrs(X86CPU *cpu) */ =20 if (cpu->fill_mtrr_mask) { - QEMU_BUILD_BUG_ON(TARGET_PHYS_ADDR_SPACE_BITS > 52); - assert(cpu->phys_bits <=3D TARGET_PHYS_ADDR_SPACE_BITS); + assert(cpu->phys_bits <=3D 52); mtrr_top_bits =3D MAKE_64BIT_MASK(cpu->phys_bits, 52 - cpu->phys_b= its); } else { mtrr_top_bits =3D 0; --=20 2.52.0 From nobody Thu Apr 16 20:57:20 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=1772061297; cv=none; d=zohomail.com; s=zohoarc; b=maPxahLG55xEmaAX/0471mbBYeFFLP69bPQUZsSxv6xjzLxjvOPbB3idOwIJLuV0uaorwpZAuiw1bY3R2UsdUzzXTvvToM4tXhVpMqk3mVl/d/Gz5KQw0hKVVJXR9zg9TqqvAY/R8X6hS8ZUQHg4DvdyLlnJ8zqO92ta5NfMdoI= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1772061297; h=Content-Type:Content-Transfer-Encoding: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:Cc; bh=deo9j952hjn8CALNTXXj3DLgNFYLnocA5bqBRKwzs1I=; b=PqJErRwzW4rnTL49iBWpUAdCVO+Rne4V4fshy7NwLAEzBhBw/nnW1LpE5OVHh7qhcjodO8HIfbt0XTXLsWdXsrnOSI+aL2nm+OvWBB4RY+ERLSBIO5bqnFkJgTTlc923SaNxQ17/Wdbe6V6XbK4BB3hKD7dS0ziN5DdcrhpRVDg= 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 1772061296816200.53274248327818; Wed, 25 Feb 2026 15:14:56 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1vvO5e-0004ja-2j; Wed, 25 Feb 2026 18:14:46 -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 1vvO5c-0004jC-4a for qemu-devel@nongnu.org; Wed, 25 Feb 2026 18:14:44 -0500 Received: from mail-wm1-x32c.google.com ([2a00:1450:4864:20::32c]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1vvO5a-0002Zb-Bk for qemu-devel@nongnu.org; Wed, 25 Feb 2026 18:14:43 -0500 Received: by mail-wm1-x32c.google.com with SMTP id 5b1f17b1804b1-4806f3fc50bso3283165e9.0 for ; Wed, 25 Feb 2026 15:14:41 -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-43970d4cc81sm36348814f8f.26.2026.02.25.15.14.39 for (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Wed, 25 Feb 2026 15:14:39 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1772061280; x=1772666080; 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=deo9j952hjn8CALNTXXj3DLgNFYLnocA5bqBRKwzs1I=; b=tcnggh0q9OuseyRuaTcNFVc9vv3hEH1TVaidmGS8Y+uTzF0Ei0uo+x/J7fHBTsMQXW 8ySyRp+BqXFN7JsKuRDctr76qEwHUAxMb4WT8L7sPPO7YhyRU8JSEZbEbD2Mi4nHSZlf lJYSXGGfO9JYjUiws5YeL0TrNr5LKJnA9rrsUaIEjlntS8xtSyeHzzUzE1iFjsVwOAUx Yrf45D0w13BXIYEqVEaaolHk7r+btgfiC8PkLfQVUQIq1lIFt5AsNssYBKUgdlUZ3YXo kMpeQAbm6GA7wvv8oAuVeaHvplyUCdMQegCjUGREI/X7mi/YBdjvscMDcaUweym6rJZK rudw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1772061280; x=1772666080; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-gg:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to; bh=deo9j952hjn8CALNTXXj3DLgNFYLnocA5bqBRKwzs1I=; b=fQKHODA5/551bZ5uk9BAX0LmwYnNsH/HCy+12u8DAl5b8ZWAU/2b1sNq4nl9RimONz Lm4KurNSeyDeta2IniJxc5sflemH3Ap92hfJV4ZGgIoodQNnsom6N2n2tBNXu7GiEdJj EnvQFhf5NBWTibgSzNscWZmY1S3Akm7kgd0mKMsCXux8Lbt/BYUv6Ncof0scpRc52LSc ieCZPD68bBLWAUqlde2MlyyGq1KEjaA7gqZQVjHQ3OxDrlLCyUFC1/WPB9yt1VpvTUYz ky2QzmQIxwT+DMDOPEAXQbY4jyziwUnUy4PEuJ4UAXPZe7+s3G9z4f37lOsXL7N045/Q o3ig== X-Gm-Message-State: AOJu0YxolwMyJnFPaahCCke8HUPW+W9aGkDGN0jOvLT6aayKfoNdLcrK Ie2FZcBXYBjZCEJG+8LHxzjvUUmH+V1NjXom071uuF5RTF7P3dR4vmhUHlmsxIe1VpJrSSQPFPi e5pXHA5w= X-Gm-Gg: ATEYQzzdXvoA5lJQzq9eDqKJ4hhsX69YGx5UPwPEtFuXQABydKZsZARloioxXo7WuD4 P2M/nmBx5pzceYTc6/dnv/Q/AIK2dzm2iUXvQQgYQhthkwTDng6At2mWuM+Cps1i0MxoezEQpIB nZQHelBjcCyqdmfrLDoXjFopW1Am19gBDU+R3DWJzH+J4YPJOn+EaH6kKek7xaoWZxtG69fJBPj fGbJ4K+UbR8zBHKF4Vn6HxJAz+uHUc+tylq6jLOCmZNlOJQl1f9gfVa1ks7Gy8B66BTTbE/MAXl Ld7EZf6okt54A0sXjI16lXJFk42o7m4OzPGQhIBiwyUmzaD1uY/qWsuEokr1XJkDBzY1ojEKcKZ Kj1Er/tgoOVj5tihAuqKOL1oKeXN0V7FYPBvugKDGZ5/PyVM+BLKFNst+S+v8SCxzDQYH+PgvUg bFrnMz7Y/f6JK9weVML1z5qngk5WIzWEThZt1UsiCQbm8zdhnz4VzHBeAzPur9qJACMF0jZ8gy X-Received: by 2002:a05:600d:640f:20b0:477:9b4a:a82 with SMTP id 5b1f17b1804b1-483c252de9bmr23781795e9.35.1772061280341; Wed, 25 Feb 2026 15:14:40 -0800 (PST) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PULL 04/70] target/loongarch: Introduce loongarch_palen_mask() Date: Thu, 26 Feb 2026 00:13:04 +0100 Message-ID: <20260225231411.96482-5-philmd@linaro.org> X-Mailer: git-send-email 2.52.0 In-Reply-To: <20260225231411.96482-1-philmd@linaro.org> References: <20260225231411.96482-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::32c; envelope-from=philmd@linaro.org; helo=mail-wm1-x32c.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_FILL_THIS_FORM_SHORT=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 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: 1772061298478158500 From: Anton Johansson In preparation for dropping TARGET_PHYS_ADDR_SPACE_BITS, define a runtime function to construct a mask from the PALEN cpucfg field. The mask is then used when converting from virtual to physical addresses. Reviewed-by: Richard Henderson Signed-off-by: Anton Johansson Message-ID: <20260218-phys_addr-v6-4-a603bf363218@rev.ng> Signed-off-by: Philippe Mathieu-Daud=C3=A9 --- target/loongarch/cpu-mmu.h | 1 + target/loongarch/internals.h | 1 - target/loongarch/cpu_helper.c | 15 ++++++++++++--- target/loongarch/tcg/tlb_helper.c | 12 ++++++++---- 4 files changed, 21 insertions(+), 8 deletions(-) diff --git a/target/loongarch/cpu-mmu.h b/target/loongarch/cpu-mmu.h index 2259de9d36d..3286accc143 100644 --- a/target/loongarch/cpu-mmu.h +++ b/target/loongarch/cpu-mmu.h @@ -98,5 +98,6 @@ TLBRet loongarch_ptw(CPULoongArchState *env, MMUContext *= context, void get_dir_base_width(CPULoongArchState *env, uint64_t *dir_base, uint64_t *dir_width, unsigned int level); hwaddr loongarch_cpu_get_phys_page_debug(CPUState *cpu, vaddr addr); +uint64_t loongarch_palen_mask(CPULoongArchState *env); =20 #endif /* LOONGARCH_CPU_MMU_H */ diff --git a/target/loongarch/internals.h b/target/loongarch/internals.h index 8793bd9df65..e01dbed40f6 100644 --- a/target/loongarch/internals.h +++ b/target/loongarch/internals.h @@ -13,7 +13,6 @@ #define FCMP_UN 0b0100 /* unordered */ #define FCMP_GT 0b1000 /* fp0 > fp1 */ =20 -#define TARGET_PHYS_MASK MAKE_64BIT_MASK(0, TARGET_PHYS_ADDR_SPACE_BITS) #define TARGET_VIRT_MASK MAKE_64BIT_MASK(0, TARGET_VIRT_ADDR_SPACE_BITS) =20 void loongarch_translate_init(void); diff --git a/target/loongarch/cpu_helper.c b/target/loongarch/cpu_helper.c index 51ad9ff2b46..60441687667 100644 --- a/target/loongarch/cpu_helper.c +++ b/target/loongarch/cpu_helper.c @@ -147,6 +147,7 @@ TLBRet loongarch_ptw(CPULoongArchState *env, MMUContext= *context, { CPUState *cs =3D env_cpu(env); hwaddr index =3D 0, phys =3D 0; + uint64_t palen_mask =3D loongarch_palen_mask(env); uint64_t dir_base, dir_width; uint64_t base, pte; int level; @@ -154,13 +155,14 @@ TLBRet loongarch_ptw(CPULoongArchState *env, MMUConte= xt *context, TLBRet ret; MemTxResult ret1; =20 + address =3D context->addr; if ((address >> 63) & 0x1) { base =3D env->CSR_PGDH; } else { base =3D env->CSR_PGDL; } - base &=3D TARGET_PHYS_MASK; + base &=3D palen_mask; =20 for (level =3D 4; level >=3D 0; level--) { get_dir_base_width(env, &dir_base, &dir_width, level); @@ -181,7 +183,7 @@ TLBRet loongarch_ptw(CPULoongArchState *env, MMUContext= *context, break; } else { /* Discard high bits with page directory table */ - base &=3D TARGET_PHYS_MASK; + base &=3D palen_mask; } } } @@ -315,7 +317,7 @@ TLBRet get_physical_address(CPULoongArchState *env, MMU= Context *context, /* Check PG and DA */ address =3D context->addr; if (da & !pg) { - context->physical =3D address & TARGET_PHYS_MASK; + context->physical =3D address & loongarch_palen_mask(env); context->prot =3D PAGE_READ | PAGE_WRITE | PAGE_EXEC; context->mmu_index =3D MMU_DA_IDX; return TLBRET_MATCH; @@ -364,3 +366,10 @@ hwaddr loongarch_cpu_get_phys_page_debug(CPUState *cs,= vaddr addr) } return context.physical; } + +uint64_t loongarch_palen_mask(CPULoongArchState *env) +{ + /* PALEN stores physical address bits - 1 */ + uint64_t phys_bits =3D FIELD_EX32(env->cpucfg[1], CPUCFG1, PALEN) + 1; + return MAKE_64BIT_MASK(0, phys_bits); +} diff --git a/target/loongarch/tcg/tlb_helper.c b/target/loongarch/tcg/tlb_h= elper.c index b6e9a3a3c7f..c1dc77a8f88 100644 --- a/target/loongarch/tcg/tlb_helper.c +++ b/target/loongarch/tcg/tlb_helper.c @@ -692,8 +692,10 @@ target_ulong helper_lddir(CPULoongArchState *env, targ= et_ulong base, CPUState *cs =3D env_cpu(env); uint64_t badvaddr; hwaddr index, phys; + uint64_t palen_mask =3D loongarch_palen_mask(env); uint64_t dir_base, dir_width; =20 + if (unlikely((level =3D=3D 0) || (level > 4))) { qemu_log_mask(LOG_GUEST_ERROR, "Attepted LDDIR with level %u\n", level); @@ -715,11 +717,11 @@ target_ulong helper_lddir(CPULoongArchState *env, tar= get_ulong base, } =20 badvaddr =3D env->CSR_TLBRBADV; - base =3D base & TARGET_PHYS_MASK; + base =3D base & palen_mask; get_dir_base_width(env, &dir_base, &dir_width, level); index =3D (badvaddr >> dir_base) & ((1 << dir_width) - 1); phys =3D base | index << 3; - return ldq_le_phys(cs->as, phys) & TARGET_PHYS_MASK; + return ldq_le_phys(cs->as, phys) & palen_mask; } =20 void helper_ldpte(CPULoongArchState *env, target_ulong base, target_ulong = odd, @@ -730,9 +732,11 @@ void helper_ldpte(CPULoongArchState *env, target_ulong= base, target_ulong odd, uint64_t badv; uint64_t ptbase =3D FIELD_EX64(env->CSR_PWCL, CSR_PWCL, PTBASE); uint64_t ptwidth =3D FIELD_EX64(env->CSR_PWCL, CSR_PWCL, PTWIDTH); + uint64_t palen_mask =3D loongarch_palen_mask(env); uint64_t dir_base, dir_width; uint8_t ps; =20 + /* * The parameter "base" has only two types, * one is the page table base address, @@ -740,7 +744,7 @@ void helper_ldpte(CPULoongArchState *env, target_ulong = base, target_ulong odd, * and the other is the huge page entry, * whose bit 6 should be 1. */ - base =3D base & TARGET_PHYS_MASK; + base =3D base & palen_mask; if (FIELD_EX64(base, TLBENTRY, HUGE)) { /* * Gets the huge page level and Gets huge page size. @@ -781,7 +785,7 @@ void helper_ldpte(CPULoongArchState *env, target_ulong = base, target_ulong odd, ptoffset0 =3D ptindex << 3; ptoffset1 =3D (ptindex + 1) << 3; phys =3D base | (odd ? ptoffset1 : ptoffset0); - tmp0 =3D ldq_le_phys(cs->as, phys) & TARGET_PHYS_MASK; + tmp0 =3D ldq_le_phys(cs->as, phys) & palen_mask; ps =3D ptbase; } =20 --=20 2.52.0 From nobody Thu Apr 16 20:57:20 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=1772061299; cv=none; d=zohomail.com; s=zohoarc; b=WhIAbcQIqQLNFmXhR3PNdhEw7lhzSVM7E0zvCT5aGgz/Uc3t/hW2G1phOBmV5898Tl3FQaNCBEJ6sRx4c2sHgEk2YPjxtID0aLiYfuzFR/mi9cixNXzUeYYr3QGrY43aJ6HUv4BhH90pvUss8TrzNHlv2bzna1D0R2cAKNqD2z8= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1772061299; h=Content-Type:Content-Transfer-Encoding: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:Cc; bh=sAQRekBqnyK/EC0T/BHUhyfWFZckIqsnxlQCebdjSa8=; b=EyLfROZdC9kzanyJeD1uoWZ270poXJLj+kB/nHYMfibpUXjgeNjI5dVHyrYxsb8cgXPSymDjlaGX01q8qh8Ah8AiV2bmWWKrwUbygI75c9AFWsmVlPv1HgLOV2qGsQqC7l6I/gPUoQhirlcFhb/sOLBMi6vdEo4BjvFfidQucwo= 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 1772061299823942.1395667473105; Wed, 25 Feb 2026 15:14:59 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1vvO5m-0004km-5N; Wed, 25 Feb 2026 18:14:54 -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 1vvO5k-0004kQ-6n for qemu-devel@nongnu.org; Wed, 25 Feb 2026 18:14:52 -0500 Received: from mail-wm1-x32b.google.com ([2a00:1450:4864:20::32b]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1vvO5h-0002Zp-HU for qemu-devel@nongnu.org; Wed, 25 Feb 2026 18:14:51 -0500 Received: by mail-wm1-x32b.google.com with SMTP id 5b1f17b1804b1-4806ce0f97bso2362885e9.0 for ; Wed, 25 Feb 2026 15:14: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 5b1f17b1804b1-483bd70e692sm98330635e9.7.2026.02.25.15.14.46 for (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Wed, 25 Feb 2026 15:14:46 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1772061287; x=1772666087; 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=sAQRekBqnyK/EC0T/BHUhyfWFZckIqsnxlQCebdjSa8=; b=ZJA8eH2Lh02gppzykXb8ATfNmaNv4txeCWYsFYc6kl3SUPzCP9Eq5lyUNM/C0nvYlr BuT6mZBSKOiddV7bRefZRX+zdcxTdHNKQESfu3SyTubsJGGTEa+sgt9nCu6CmhjgR2ht FEvZ7SSFLqTB9Bd8G5qJw+JwZszFMPCe5P+Bn/uukb2vMRRqOV03gqx49POCxKs9feax Te4o6w/sKzSmCffLtvz5z49vRvvElotqIF3xzy/ip/ncJPooEddgsfzruqhzO/Ujxc1I 3TfyyTl3w45W8pmDKACywDfGqtR7z6pIyxeO8t4uanAD+fK4IsEpHHQZVU/GH/u5Vg9s lZOQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1772061287; x=1772666087; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-gg:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to; bh=sAQRekBqnyK/EC0T/BHUhyfWFZckIqsnxlQCebdjSa8=; b=XRhP3HyxvVKTy4Fh997G7pTZ2bo/Aw4eeIoM+68VuTB9aQ4wS+Ahdqyq+C+hOlZM1G /0akK0P6x9fzaiEFrFEKumrbxZdeZr6R8b+1PLNlHYL0jRFW29D71u2u0ScLF2BYbPpY MbF0mJSvUNuORi2AljYujmmwe3DELgQVnMg0KbFOHmxIQ3q2u3uPP/DHPjTPq5bhmRVc 3/1CIVGY+ysc8eubhi7fLW8YC3UtBIdXVol0WQNyiDeTXQtuTu4SjRljbS2mhyoUhAcf q17YDIC7vli1NfpAiF7W6kZE3KC1Hta9UW7QAQ5/TcIjgBsingtqRWXRrofFAXo8IzDD biNg== X-Gm-Message-State: AOJu0Yx3RUyl/OVPF86YwAIrndtZdTChpfLCAlQ++iOw0AJpiwph91aH Qpgc7GMzXPsRquk7SbfiWRIcbh+L63YywCr+lTGHyPwvfDpBGsWn2ox2ddMnQag/FiKU/m/G5l8 HCVr4VS8= X-Gm-Gg: ATEYQzxAoFBYmsb3Cb/pNPg4cDn7a3mynjEL4l7rX7+P58htef/SCYvfepHuC1dbtQm T1//A9B94y6O4gbEBJzIa+neIGH40q70iodIZpkCP3wOlwq07LO3UlNxKO4MJR2ofVfZ1FtegHh fNQJok4EnMjfjby/kUbFN97MDA2exWjpB/27gOj13hAc4CX1Vl9kTc4LDI745bCdFsAHP2+D8SD uGuRDT90Pu6FCb/9DM3sQ35kZI/d/RRK6nzToeTJFYbSBh/a2Kqshx3hxxg5OCB8uMt9JSTyhEq lxPyCfMsyjVXZ0rc/MoN5jb5FBb0/jUDC+P1KgsvTbdgci+TXPbCSCDeYySLzBvIAd4szniRW5n 6fnDlsBvL19Um9FwEvKMyhh2c+obyS8T1+lQtlewr5JG3mFEfu51i7KRWv18TBTvZM2tTIEMT4P W4uAcX6QoXF9R87fq3eqxOzIX4uBgFec/qjyHoiyteU2uAnlOwXvzh9nTYABkfp5KGuuXtljkV X-Received: by 2002:a05:600c:a009:b0:47e:e970:b4e4 with SMTP id 5b1f17b1804b1-483c3df5a16mr954445e9.29.1772061287554; Wed, 25 Feb 2026 15:14:47 -0800 (PST) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PULL 05/70] hw/loongarch: Use loongarch_palen_mask() Date: Thu, 26 Feb 2026 00:13:05 +0100 Message-ID: <20260225231411.96482-6-philmd@linaro.org> X-Mailer: git-send-email 2.52.0 In-Reply-To: <20260225231411.96482-1-philmd@linaro.org> References: <20260225231411.96482-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::32b; envelope-from=philmd@linaro.org; helo=mail-wm1-x32b.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: 1772061302073158500 From: Anton Johansson Replaces remaining uses of TARGET_PHYS_ADDR_SPACE_BITS with runtime calls to loongarch_palen_mask() to fetch the physical address mask from the cpucfg PALEN field. Reviewed-by: Richard Henderson Signed-off-by: Anton Johansson Message-ID: <20260218-phys_addr-v6-5-a603bf363218@rev.ng> Signed-off-by: Philippe Mathieu-Daud=C3=A9 --- include/hw/loongarch/boot.h | 3 ++- hw/loongarch/boot.c | 28 ++++++++++++++++------------ hw/loongarch/virt.c | 5 ++++- 3 files changed, 22 insertions(+), 14 deletions(-) diff --git a/include/hw/loongarch/boot.h b/include/hw/loongarch/boot.h index 9819f7fbe30..4984322f75e 100644 --- a/include/hw/loongarch/boot.h +++ b/include/hw/loongarch/boot.h @@ -113,6 +113,7 @@ struct memmap_entry { uint32_t reserved; }; =20 -void loongarch_load_kernel(MachineState *ms, struct loongarch_boot_info *i= nfo); +void loongarch_load_kernel(MachineState *ms, struct loongarch_boot_info *i= nfo, + uint64_t phys_addr_mask); =20 #endif /* HW_LOONGARCH_BOOT_H */ diff --git a/hw/loongarch/boot.c b/hw/loongarch/boot.c index 711d5ffbbc0..ef8eae237cb 100644 --- a/hw/loongarch/boot.c +++ b/hw/loongarch/boot.c @@ -217,10 +217,12 @@ static void init_cmdline(struct loongarch_boot_info *= info, void *p, void *start) =20 static uint64_t cpu_loongarch_virt_to_phys(void *opaque, uint64_t addr) { - return addr & MAKE_64BIT_MASK(0, TARGET_PHYS_ADDR_SPACE_BITS); + uint64_t *phys_addr_mask =3D opaque; + return addr & *phys_addr_mask; } =20 static int64_t load_loongarch_linux_image(const char *filename, + uint64_t phys_addr_mask, uint64_t *kernel_entry, uint64_t *kernel_low, uint64_t *kernel_high) @@ -251,10 +253,8 @@ static int64_t load_loongarch_linux_image(const char *= filename, } =20 /* Early kernel versions may have those fields in virtual address */ - *kernel_entry =3D extract64(le64_to_cpu(hdr->kernel_entry), - 0, TARGET_PHYS_ADDR_SPACE_BITS); - *kernel_low =3D extract64(le64_to_cpu(hdr->load_offset), - 0, TARGET_PHYS_ADDR_SPACE_BITS); + *kernel_entry =3D le64_to_cpu(hdr->kernel_entry) & phys_addr_mask; + *kernel_low =3D le64_to_cpu(hdr->load_offset) & phys_addr_mask; *kernel_high =3D *kernel_low + size; =20 rom_add_blob_fixed(filename, buffer, size, *kernel_low); @@ -303,19 +303,21 @@ static ram_addr_t alloc_initrd_memory(struct loongarc= h_boot_info *info, exit(1); } =20 -static int64_t load_kernel_info(struct loongarch_boot_info *info) +static int64_t load_kernel_info(struct loongarch_boot_info *info, + uint64_t phys_addr_mask) { uint64_t kernel_entry, kernel_low, kernel_high, initrd_offset =3D 0; ssize_t kernel_size; =20 kernel_size =3D load_elf(info->kernel_filename, NULL, - cpu_loongarch_virt_to_phys, NULL, + cpu_loongarch_virt_to_phys, &phys_addr_mask, &kernel_entry, &kernel_low, &kernel_high, NULL, ELFDATA2LSB, EM_LOONGARCH, 1, 0); - kernel_entry =3D cpu_loongarch_virt_to_phys(NULL, kernel_entry); + kernel_entry =3D cpu_loongarch_virt_to_phys(&phys_addr_mask, kernel_en= try); if (kernel_size < 0) { kernel_size =3D load_loongarch_linux_image(info->kernel_filename, + phys_addr_mask, &kernel_entry, &kernel_lo= w, &kernel_high); } @@ -395,14 +397,15 @@ static void init_boot_rom(MachineState *ms, } =20 static void loongarch_direct_kernel_boot(MachineState *ms, - struct loongarch_boot_info *info) + struct loongarch_boot_info *info, + uint64_t phys_addr_mask) { void *p, *bp; int64_t kernel_addr =3D VIRT_FLASH0_BASE; uint64_t *data; =20 if (info->kernel_filename) { - kernel_addr =3D load_kernel_info(info); + kernel_addr =3D load_kernel_info(info, phys_addr_mask); } else { if (!qtest_enabled()) { warn_report("No kernel provided, booting from flash drive."); @@ -429,7 +432,8 @@ static void loongarch_direct_kernel_boot(MachineState *= ms, g_free(bp); } =20 -void loongarch_load_kernel(MachineState *ms, struct loongarch_boot_info *i= nfo) +void loongarch_load_kernel(MachineState *ms, struct loongarch_boot_info *i= nfo, + uint64_t phys_addr_mask) { LoongArchVirtMachineState *lvms =3D LOONGARCH_VIRT_MACHINE(ms); =20 @@ -440,6 +444,6 @@ void loongarch_load_kernel(MachineState *ms, struct loo= ngarch_boot_info *info) if (lvms->bios_loaded) { loongarch_firmware_boot(lvms, info); } else { - loongarch_direct_kernel_boot(ms, info); + loongarch_direct_kernel_boot(ms, info, phys_addr_mask); } } diff --git a/hw/loongarch/virt.c b/hw/loongarch/virt.c index a75968e4c95..9e26c25c23c 100644 --- a/hw/loongarch/virt.c +++ b/hw/loongarch/virt.c @@ -34,6 +34,7 @@ #include "hw/misc/unimp.h" #include "hw/loongarch/fw_cfg.h" #include "target/loongarch/cpu.h" +#include "target/loongarch/cpu-mmu.h" #include "hw/firmware/smbios.h" #include "qapi/qapi-visit-common.h" #include "hw/acpi/generic_event_device.h" @@ -928,6 +929,7 @@ static void virt_init(MachineState *machine) hwaddr base, size, ram_size =3D machine->ram_size; MachineClass *mc =3D MACHINE_GET_CLASS(machine); Object *cpuobj; + uint64_t phys_addr_mask =3D 0; =20 if (!cpu_model) { cpu_model =3D LOONGARCH_CPU_TYPE_NAME("la464"); @@ -1017,7 +1019,8 @@ static void virt_init(MachineState *machine) qemu_register_powerdown_notifier(&lvms->powerdown_notifier); =20 lvms->bootinfo.ram_size =3D ram_size; - loongarch_load_kernel(machine, &lvms->bootinfo); + phys_addr_mask =3D loongarch_palen_mask(&LOONGARCH_CPU(first_cpu)->env= ); + loongarch_load_kernel(machine, &lvms->bootinfo, phys_addr_mask); } =20 static void virt_get_acpi(Object *obj, Visitor *v, const char *name, --=20 2.52.0 From nobody Thu Apr 16 20:57:20 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=1772061354; cv=none; d=zohomail.com; s=zohoarc; b=Y383Q2cTC2DRvgwN9IaJ9C6co3a8xZctTbB9utxqYkZrktrSyWky7tKugJaH7ueqn0gdjUikNtpUKekHhaj3iPndKItfwYLG39nTAjP/592ZUFe1kPI4uohlH3beEze6QNMdTdLOcsUbkkHpbTlF39aFWixuJgcxowTkd6YQQtM= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1772061354; h=Content-Type:Content-Transfer-Encoding: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:Cc; bh=bv1YTmDeCuzjnJPBd8zZSE5aw4rUhX2lPhGkqOCY6/I=; b=TThi60nVctXuNAijkjYHUEFmhfSRaRyNdYXXMEy802954CN1FK+P7sAYUyGC9x0LDiDfukeQUx5DblyHA89fYAR6nEYU8M1vZwQkgQdfbCUcOMfCce6SvdTZymDtSXT7NVhSfunuLTLlQ7dNEomEJddtB8ZCNxmV+zfTHpdpmNI= 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 1772061354782968.3541052399291; Wed, 25 Feb 2026 15:15:54 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1vvO5r-0004uu-Jn; Wed, 25 Feb 2026 18:14:59 -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 1vvO5p-0004tf-QM for qemu-devel@nongnu.org; Wed, 25 Feb 2026 18:14:57 -0500 Received: from mail-wm1-x331.google.com ([2a00:1450:4864:20::331]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1vvO5n-0002a5-UP for qemu-devel@nongnu.org; Wed, 25 Feb 2026 18:14:57 -0500 Received: by mail-wm1-x331.google.com with SMTP id 5b1f17b1804b1-4806cc07ce7so3155145e9.1 for ; Wed, 25 Feb 2026 15:14:55 -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-483bfba9a5esm54135155e9.4.2026.02.25.15.14.53 for (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Wed, 25 Feb 2026 15:14:53 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1772061294; x=1772666094; 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=bv1YTmDeCuzjnJPBd8zZSE5aw4rUhX2lPhGkqOCY6/I=; b=vyT85OnZCVpVNDbS/OK+cp2Djwql89gKvreb6Pmy2NENUgSHsd7uAdUwxt4kKKg0oU PpFRkXDVNCPmpBROCGdmfyxZdce6iW2nyngApxw+gKjDkkpZRM9UErcvfUTmT0T8+EU2 uUjr6YeWWFXWMxzGz1QpRiZsJEpM3DimYdInW41wLSzvd+Y0vmMx1Ku5gvIQIN/IFPg8 lkrJ3npGwQek2Qa56yuXtd3a+ErEhisgJ+KIgMin9ZmJ0+69e2nVzpyy4c2k+78USdkR C/t5V6TsjwvCbN14DfZR/MT2PHT0+grV6Qdoarb01aaWchij6ePdkrFVP2JwGw7yt8tZ k1NA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1772061294; x=1772666094; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-gg:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to; bh=bv1YTmDeCuzjnJPBd8zZSE5aw4rUhX2lPhGkqOCY6/I=; b=gGER9X6MszucLUbgq1kYUK/Fs8dj2qeEO/gnlMtGQj8NLLfT90k38GOwkD6ohgizO1 iuPr0kpWgo8YCYnVSfSXfL4UhzolDzg+y6JGnImH8Sm9DMF50C8j0TwqUmOi1ApaaUIC uQaL1fEcIh0hSOXJ968+1+BhCDgss2trFpzuIe1FewPBSU7+RsU9elPL6wpyMRfuHzVq eTacAJhsk621onPfRYn8fFUB3H1oxBEGYRRKBMyaREdr4Dkc6tppN0P2QL9uBaS8LMTa EmEqOKQvfwAX3XV5Zcy6eJv2DZT+k6rjo4AdgxwP3FG2/z1Ma29FS0Qrn1hH5u8zVVDW qqeA== X-Gm-Message-State: AOJu0Yyz1qPNKaWSQQEeRRvAbuwRzqjAc7Cg1/nOoy5OBC4eXdJhOqnX 56FMD2DRdiE31mHzBGDHswL3oavJWiInAn7bmt+1UtvgsGpIWEh1TrTqmsJVrlTQhm+nqsgkZ6A sWABL27g= X-Gm-Gg: ATEYQzxfny3moaN0IqRvK9APzjeWagA8ruW4QNcQFqRoXPngBB1zyfZz2fqRtY2FXIJ vcJkDX1hz8UHuNI165JilSrJbmvZFoCbnrU5xurjBIhRrVwFuegNhBqmSoiEagTkBXO3zuOAE0B nUeZo5sSw4BnCObeNVzW9CVeyDXT0G1Sk/pNTCbSQAXyjqFjjk82iI1oGkUPyp8CWYfDsLwOHqM HksbpCm0n4JaThVUEL94iqm67eRHD6clQuRbVF6OIvwZ/qnDLxLHO1e243bqsl9iRNKzZMbbK7Z ry8fyQLcy1jVUusHPbBbxANJg+YzR2+6W8Hmgyer3LO1gSQcgOLW77GQw0YHHlTXWZSU8gwDHNc 6ISPoejjwLu0lFJVr3CqJ+0BDBIznAP/64s08kp8WzFt263sYxkJpvEjoWEHClOpgWAq3g3pIea FMdLFLUU8aK5mJxLFlcfpQqZLexpDyDKxKVSF4vTWB6xQ9bJFbw3kR7KCsYZlN7uw+YtZ4a+nHI 1JfGnJZnyc= X-Received: by 2002:a05:600c:3e0e:b0:477:8985:4036 with SMTP id 5b1f17b1804b1-483c3db2184mr1485875e9.1.1772061294042; Wed, 25 Feb 2026 15:14:54 -0800 (PST) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PULL 06/70] hw/riscv: Set IOMMU PAS via property Date: Thu, 26 Feb 2026 00:13:06 +0100 Message-ID: <20260225231411.96482-7-philmd@linaro.org> X-Mailer: git-send-email 2.52.0 In-Reply-To: <20260225231411.96482-1-philmd@linaro.org> References: <20260225231411.96482-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::331; envelope-from=philmd@linaro.org; helo=mail-wm1-x331.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: 1772061356483158500 From: Anton Johansson Replaces the only remaining use of TARGET_PHYS_ADDR_SPACE_BITS for RISCV with a property RISCVIOMMUState::pas_bits that gets written to the capabilities field upon device realization. This write needs to happen at realize-time to ensure the property has been set. For the virt machine and sysbus device, pas_bits is set by virt_machine_init() to either 34 or 56 bits, retaining previous behaviour. However, for the PCI device we do not have access to the CPU state, and instead use the maximum riscv64 value of 56 bits. Reviewed-by: Richard Henderson Signed-off-by: Anton Johansson Reviewed-by: Chao Liu Message-ID: <20260218-phys_addr-v6-6-a603bf363218@rev.ng> Signed-off-by: Philippe Mathieu-Daud=C3=A9 --- hw/riscv/riscv-iommu.h | 1 + hw/riscv/riscv-iommu-pci.c | 3 +++ hw/riscv/riscv-iommu.c | 8 ++++---- hw/riscv/virt.c | 7 +++++++ 4 files changed, 15 insertions(+), 4 deletions(-) diff --git a/hw/riscv/riscv-iommu.h b/hw/riscv/riscv-iommu.h index 2dabd86941b..2a9f6fccd52 100644 --- a/hw/riscv/riscv-iommu.h +++ b/hw/riscv/riscv-iommu.h @@ -34,6 +34,7 @@ struct RISCVIOMMUState { /*< public >*/ uint32_t version; /* Reported interface version number */ uint32_t pid_bits; /* process identifier width */ + uint32_t pas_bits; /* physical address bits */ uint32_t bus; /* PCI bus mapping for non-root endpoints */ =20 uint64_t cap; /* IOMMU supported capabilities */ diff --git a/hw/riscv/riscv-iommu-pci.c b/hw/riscv/riscv-iommu-pci.c index 5f7d3592047..14dd5f3857e 100644 --- a/hw/riscv/riscv-iommu-pci.c +++ b/hw/riscv/riscv-iommu-pci.c @@ -158,6 +158,9 @@ static void riscv_iommu_pci_init(Object *obj) =20 iommu->icvec_avail_vectors =3D RISCV_IOMMU_PCI_ICVEC_VECTORS; riscv_iommu_set_cap_igs(iommu, RISCV_IOMMU_CAP_IGS_MSI); + + /* Report maximum physical address size of riscv64 */ + iommu->pas_bits =3D 56; } =20 static const Property riscv_iommu_pci_properties[] =3D { diff --git a/hw/riscv/riscv-iommu.c b/hw/riscv/riscv-iommu.c index b46b337375a..98345b1280b 100644 --- a/hw/riscv/riscv-iommu.c +++ b/hw/riscv/riscv-iommu.c @@ -2453,10 +2453,6 @@ static void riscv_iommu_instance_init(Object *obj) /* Enable translation debug interface */ s->cap =3D RISCV_IOMMU_CAP_DBG; =20 - /* Report QEMU target physical address space limits */ - s->cap =3D set_field(s->cap, RISCV_IOMMU_CAP_PAS, - TARGET_PHYS_ADDR_SPACE_BITS); - /* TODO: method to report supported PID bits */ s->pid_bits =3D 8; /* restricted to size of MemTxAttrs.pid */ s->cap |=3D RISCV_IOMMU_CAP_PD8; @@ -2487,6 +2483,9 @@ static void riscv_iommu_realize(DeviceState *dev, Err= or **errp) { RISCVIOMMUState *s =3D RISCV_IOMMU(dev); =20 + /* Report QEMU target physical address space limits. */ + s->cap =3D set_field(s->cap, RISCV_IOMMU_CAP_PAS, s->pas_bits); + s->cap |=3D s->version & RISCV_IOMMU_CAP_VERSION; if (s->enable_msi) { s->cap |=3D RISCV_IOMMU_CAP_MSI_FLAT | RISCV_IOMMU_CAP_MSI_MRIF; @@ -2645,6 +2644,7 @@ void riscv_iommu_reset(RISCVIOMMUState *s) static const Property riscv_iommu_properties[] =3D { DEFINE_PROP_UINT32("version", RISCVIOMMUState, version, RISCV_IOMMU_SPEC_DOT_VER), + DEFINE_PROP_UINT32("pas-bits", RISCVIOMMUState, pas_bits, 0), DEFINE_PROP_UINT32("bus", RISCVIOMMUState, bus, 0x0), DEFINE_PROP_UINT32("ioatc-limit", RISCVIOMMUState, iot_limit, LIMIT_CACHE_IOT), diff --git a/hw/riscv/virt.c b/hw/riscv/virt.c index 07e66b39364..bbce2fb6671 100644 --- a/hw/riscv/virt.c +++ b/hw/riscv/virt.c @@ -1739,6 +1739,13 @@ static void virt_machine_init(MachineState *machine) object_property_set_link(OBJECT(iommu_sys), "irqchip", OBJECT(mmio_irqchip), &error_fatal); + /* + * For riscv64 use a physical address size of 56 bits (44 bit PPN), + * and for riscv32 use 34 bits (22 bit PPN). + */ + object_property_set_uint(OBJECT(iommu_sys), "pas-bits", + riscv_is_32bit(&s->soc[0]) ? 34 : 56, + &error_fatal); =20 sysbus_realize_and_unref(SYS_BUS_DEVICE(iommu_sys), &error_fatal); } --=20 2.52.0 From nobody Thu Apr 16 20:57:20 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=1772061319; cv=none; d=zohomail.com; s=zohoarc; b=nln0mxIXl2aVk3Uq6nK0sud60FDsJ6ZY3AvEP0gnsVrDpyuZpVvZl6Zdh6tly1aw6VLxCDH36YB4Z1qC++48xrwDzwuXFBf7mnPtobh6VOQi0DSUhppHFbfJulN1X9IBTMwWUVPhfaluIwwNflbw2teadoFlbo8NhpxtYVt7EBg= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1772061319; h=Content-Type:Content-Transfer-Encoding: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:Cc; bh=AOnr4qaJdaK1kJiZweSuzTjxuUU2NRSI0QvsVn5psy8=; b=ZReiagRy3SFHMwbd6CzxCDM66aDmHDDwImOTfqZRnPhH/cFz/tIr+fev4xgXsFJ2RtFvI8T3xSoHf0MTeQIPw9l1n02Mk6hzeeeEQF62WDwKu+S70KuBVCu3bTMxleddSvXPqupE2HbQPOJEQnHrsB3tzctauwa1Ep+lL6SVRMw= 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 1772061319854640.1267418853614; Wed, 25 Feb 2026 15:15:19 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1vvO5z-00050x-OS; Wed, 25 Feb 2026 18:15:07 -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 1vvO5x-00050T-Sq for qemu-devel@nongnu.org; Wed, 25 Feb 2026 18:15:05 -0500 Received: from mail-wr1-x42b.google.com ([2a00:1450:4864:20::42b]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1vvO5v-0002at-Fr for qemu-devel@nongnu.org; Wed, 25 Feb 2026 18:15:05 -0500 Received: by mail-wr1-x42b.google.com with SMTP id ffacd0b85a97d-43767807cf3so146201f8f.1 for ; Wed, 25 Feb 2026 15:15:03 -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-4398a292babsm13296868f8f.37.2026.02.25.15.14.59 for (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Wed, 25 Feb 2026 15:15:00 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1772061301; x=1772666101; 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=AOnr4qaJdaK1kJiZweSuzTjxuUU2NRSI0QvsVn5psy8=; b=FEoGVmZQ8SyEbjevNkWj3Mqxem2W7kWVfTvanuguTALqIPgP047eFPyJdEKcNEqbd8 C7K+Wjm4/afVRlYRPWFZVFpLht0YYut1hsudS9B2SNRtLl93aVGm8wtqK4Mxwq+O3T75 FtRXQSsp/EQFYAOR27Y6LmYnJMxwKIb1NzFVrjXrKw8nDmgbPIx/uWJCRPTlbxf34/LU VmVA8MtnWSkxPTEnb34nmvVZlXOn5P+r9lfyBpaydIIZM0TByXcGLVu19tbe5wB3EWUD SqtSjW+vJqdawgLNdww1HEslCfO1R0nCraYol9DiNvwD+hwKKZNdLnRaKBbNNuE+AIDI ZaVg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1772061301; x=1772666101; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-gg:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to; bh=AOnr4qaJdaK1kJiZweSuzTjxuUU2NRSI0QvsVn5psy8=; b=sfPDUKlawRIBMTfszRu8ytWtyMXT5ru7dQQuJNTsC87/CovA2ekL1ozPk1NYlH+6Mu jS1HptO83/RQS+NpiiaSM5EkSisRw3tmpJO3fzbP2Qm/M6+mTS8DghwDqzpJ9flXagks Ffpwml+ISVGjbbATjWXYstkH7+CQvKcYWyQ7rsa7Y7svjCjge6lcPQo/ASeWhXTeYIRK Gy6gD8nC+AiQC+j5ZuM/cIHnsQwOSj6ZzxBVdDppZcZ+Z7uhpmlziknsAqhx9R9vl1w4 jf1panr2nlsTGAuCO20afWK7/dw8BURHZmTO407jsRLLsw2lczGFxu4RV2I58D8I62lM eRzA== X-Gm-Message-State: AOJu0YzXI8/4GS73RJVHbubk0XZCjS4DL0k4WQxWo/CSlwN2bzE3tPQ6 jRfUhU7W9s0COTm/uPjjVDGKBIZPXhzgkb4hqhohbcLmixn7yEekuysFrZJVoTCujXE/rrANIqh 2Li5xq6U= X-Gm-Gg: ATEYQzzh3ZgE+7w3pbCOmlfHG8oif4fKRzrVU/Ls83LFxqgUwmHM6umphpMdbJI3Dz+ uI/tDYhnonlVL6glrioMvqW2cyG4oPWS50ZwG/zBJO4kZimIoFzBK6MPBgTtEwvZIKQ6IxNg9g7 0Qmmq+MiI4vmX+5r9MBY9OkZXa5ZcL/B82w9UbnnLFcmTmuxtMl6WPd5HtUaXq9qIORmkKyTRPt UGHNxuwKRzMC+8Ta5g97KnkwY2c+XXzmwCOfmYYdhGNJq7DLmDdldytYHM1rlVbugf8O93EhhvH mk/yGwLXfgC9S/yrkI3r+gFXwMRl3XJwEyD+5tnsxF0sJTmGCn5ujlRYAHNsbF75ftUzjLdfi0c oFJVQozdRRB6IrZ1pY0NQWubIZF9E7jQWd+SBtHwLUvNQ/02F0WswCtMTE8iIsclpsFUF+McOMq zIoRwmtRWhk0bJJkqY0ISwy1cOl3GHt5t79hOz3lWsnpKLZJjwVom5YOTUjIXzjzAr4hOsCJo8 X-Received: by 2002:a5d:5d85:0:b0:430:f742:fbc7 with SMTP id ffacd0b85a97d-439942aa2bcmr4199223f8f.14.1772061301333; Wed, 25 Feb 2026 15:15:01 -0800 (PST) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PULL 07/70] exec: Drop TARGET_PHYS_ADDR_SPACE_BITS Date: Thu, 26 Feb 2026 00:13:07 +0100 Message-ID: <20260225231411.96482-8-philmd@linaro.org> X-Mailer: git-send-email 2.52.0 In-Reply-To: <20260225231411.96482-1-philmd@linaro.org> References: <20260225231411.96482-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::42b; envelope-from=philmd@linaro.org; helo=mail-wr1-x42b.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: 1772061320457158500 From: Anton Johansson The macro is no longer in use and can safely be dropped. Reviewed-by: Richard Henderson Reviewed-by: Brian Cain Signed-off-by: Anton Johansson Message-ID: <20260218-phys_addr-v6-7-a603bf363218@rev.ng> [PMD: Keep TARGET_PHYS_ADDR_SPACE_BITS poisoned] Signed-off-by: Philippe Mathieu-Daud=C3=A9 --- include/exec/cpu-defs.h | 3 --- target/alpha/cpu-param.h | 3 --- target/arm/cpu-param.h | 2 -- target/avr/cpu-param.h | 1 - target/hexagon/cpu-param.h | 1 - target/hppa/cpu-param.h | 3 --- target/i386/cpu-param.h | 2 -- target/loongarch/cpu-param.h | 1 - target/m68k/cpu-param.h | 1 - target/microblaze/cpu-param.h | 2 -- target/mips/cpu-param.h | 2 -- target/or1k/cpu-param.h | 1 - target/ppc/cpu-param.h | 7 ------- target/riscv/cpu-param.h | 2 -- target/rx/cpu-param.h | 1 - target/s390x/cpu-param.h | 1 - target/sh4/cpu-param.h | 1 - target/sparc/cpu-param.h | 2 -- target/tricore/cpu-param.h | 1 - target/xtensa/cpu-param.h | 1 - 20 files changed, 38 deletions(-) diff --git a/include/exec/cpu-defs.h b/include/exec/cpu-defs.h index e01acb7c906..141b5a99292 100644 --- a/include/exec/cpu-defs.h +++ b/include/exec/cpu-defs.h @@ -28,9 +28,6 @@ #ifndef TARGET_LONG_BITS # error TARGET_LONG_BITS must be defined in cpu-param.h #endif -#ifndef TARGET_PHYS_ADDR_SPACE_BITS -# error TARGET_PHYS_ADDR_SPACE_BITS must be defined in cpu-param.h -#endif #ifndef TARGET_VIRT_ADDR_SPACE_BITS # error TARGET_VIRT_ADDR_SPACE_BITS must be defined in cpu-param.h #endif diff --git a/target/alpha/cpu-param.h b/target/alpha/cpu-param.h index c9da620ab3e..f87b36fe873 100644 --- a/target/alpha/cpu-param.h +++ b/target/alpha/cpu-param.h @@ -8,9 +8,6 @@ #ifndef ALPHA_CPU_PARAM_H #define ALPHA_CPU_PARAM_H =20 -/* ??? EV4 has 34 phys addr bits, EV5 has 40, EV6 has 44. */ -#define TARGET_PHYS_ADDR_SPACE_BITS 44 - #ifdef CONFIG_USER_ONLY /* * Allow user-only to vary page size. Real hardware allows only 8k and 64= k, diff --git a/target/arm/cpu-param.h b/target/arm/cpu-param.h index 7de0099cbfa..f67e7b34606 100644 --- a/target/arm/cpu-param.h +++ b/target/arm/cpu-param.h @@ -9,10 +9,8 @@ #define ARM_CPU_PARAM_H =20 #ifdef TARGET_AARCH64 -# define TARGET_PHYS_ADDR_SPACE_BITS 52 # define TARGET_VIRT_ADDR_SPACE_BITS 52 #else -# define TARGET_PHYS_ADDR_SPACE_BITS 40 # define TARGET_VIRT_ADDR_SPACE_BITS 32 #endif =20 diff --git a/target/avr/cpu-param.h b/target/avr/cpu-param.h index ea7887919a7..130768db51f 100644 --- a/target/avr/cpu-param.h +++ b/target/avr/cpu-param.h @@ -22,7 +22,6 @@ #define AVR_CPU_PARAM_H =20 #define TARGET_PAGE_BITS 10 -#define TARGET_PHYS_ADDR_SPACE_BITS 24 #define TARGET_VIRT_ADDR_SPACE_BITS 24 =20 #endif diff --git a/target/hexagon/cpu-param.h b/target/hexagon/cpu-param.h index 45ee7b46409..1f0f22a7968 100644 --- a/target/hexagon/cpu-param.h +++ b/target/hexagon/cpu-param.h @@ -20,7 +20,6 @@ =20 #define TARGET_PAGE_BITS 16 /* 64K pages */ =20 -#define TARGET_PHYS_ADDR_SPACE_BITS 36 #define TARGET_VIRT_ADDR_SPACE_BITS 32 =20 #endif diff --git a/target/hppa/cpu-param.h b/target/hppa/cpu-param.h index e0b2c7c9157..3763bca1252 100644 --- a/target/hppa/cpu-param.h +++ b/target/hppa/cpu-param.h @@ -9,11 +9,8 @@ #define HPPA_CPU_PARAM_H =20 #if defined(CONFIG_USER_ONLY) && defined(TARGET_ABI32) -# define TARGET_PHYS_ADDR_SPACE_BITS 32 # define TARGET_VIRT_ADDR_SPACE_BITS 32 #else -/* ??? PA-8000 through 8600 have 40 bits; PA-8700 and 8900 have 44 bits. */ -# define TARGET_PHYS_ADDR_SPACE_BITS 40 # define TARGET_VIRT_ADDR_SPACE_BITS 64 #endif =20 diff --git a/target/i386/cpu-param.h b/target/i386/cpu-param.h index 909bc027923..5915ef6266c 100644 --- a/target/i386/cpu-param.h +++ b/target/i386/cpu-param.h @@ -9,7 +9,6 @@ #define I386_CPU_PARAM_H =20 #ifdef TARGET_X86_64 -# define TARGET_PHYS_ADDR_SPACE_BITS 52 /* * ??? This is really 48 bits, sign-extended, but the only thing * accessible to userland with bit 48 set is the VSYSCALL, and that @@ -17,7 +16,6 @@ */ # define TARGET_VIRT_ADDR_SPACE_BITS 47 #else -# define TARGET_PHYS_ADDR_SPACE_BITS 36 # define TARGET_VIRT_ADDR_SPACE_BITS 32 #endif #define TARGET_PAGE_BITS 12 diff --git a/target/loongarch/cpu-param.h b/target/loongarch/cpu-param.h index 071567712b3..3bcf77b3755 100644 --- a/target/loongarch/cpu-param.h +++ b/target/loongarch/cpu-param.h @@ -8,7 +8,6 @@ #ifndef LOONGARCH_CPU_PARAM_H #define LOONGARCH_CPU_PARAM_H =20 -#define TARGET_PHYS_ADDR_SPACE_BITS 48 #define TARGET_VIRT_ADDR_SPACE_BITS 48 =20 #define TARGET_PAGE_BITS 12 diff --git a/target/m68k/cpu-param.h b/target/m68k/cpu-param.h index 7afbf6d302d..59e04d85ff9 100644 --- a/target/m68k/cpu-param.h +++ b/target/m68k/cpu-param.h @@ -14,7 +14,6 @@ * use the smallest one */ #define TARGET_PAGE_BITS 12 -#define TARGET_PHYS_ADDR_SPACE_BITS 32 #define TARGET_VIRT_ADDR_SPACE_BITS 32 =20 #endif diff --git a/target/microblaze/cpu-param.h b/target/microblaze/cpu-param.h index 6a0714bb3d7..0b13f219c2a 100644 --- a/target/microblaze/cpu-param.h +++ b/target/microblaze/cpu-param.h @@ -17,10 +17,8 @@ * of address space. */ #ifdef CONFIG_USER_ONLY -#define TARGET_PHYS_ADDR_SPACE_BITS 32 #define TARGET_VIRT_ADDR_SPACE_BITS 32 #else -#define TARGET_PHYS_ADDR_SPACE_BITS 64 #define TARGET_VIRT_ADDR_SPACE_BITS 64 #endif =20 diff --git a/target/mips/cpu-param.h b/target/mips/cpu-param.h index a71e7383d24..122193b0db3 100644 --- a/target/mips/cpu-param.h +++ b/target/mips/cpu-param.h @@ -8,10 +8,8 @@ #define MIPS_CPU_PARAM_H =20 #ifdef TARGET_ABI_MIPSN64 -#define TARGET_PHYS_ADDR_SPACE_BITS 48 #define TARGET_VIRT_ADDR_SPACE_BITS 48 #else -#define TARGET_PHYS_ADDR_SPACE_BITS 40 # ifdef CONFIG_USER_ONLY # define TARGET_VIRT_ADDR_SPACE_BITS 31 # else diff --git a/target/or1k/cpu-param.h b/target/or1k/cpu-param.h index 3011bf5fcca..1ff89d523f1 100644 --- a/target/or1k/cpu-param.h +++ b/target/or1k/cpu-param.h @@ -9,7 +9,6 @@ #define OPENRISC_CPU_PARAM_H =20 #define TARGET_PAGE_BITS 13 -#define TARGET_PHYS_ADDR_SPACE_BITS 32 #define TARGET_VIRT_ADDR_SPACE_BITS 32 =20 #endif diff --git a/target/ppc/cpu-param.h b/target/ppc/cpu-param.h index ca7602d8983..5e211d10b0b 100644 --- a/target/ppc/cpu-param.h +++ b/target/ppc/cpu-param.h @@ -9,12 +9,6 @@ #define PPC_CPU_PARAM_H =20 #ifdef TARGET_PPC64 -/* - * Note that the official physical address space bits is 62-M where M - * is implementation dependent. I've not looked up M for the set of - * cpus we emulate at the system level. - */ -#define TARGET_PHYS_ADDR_SPACE_BITS 62 /* * Note that the PPC environment architecture talks about 80 bit virtual * addresses, with segmentation. Obviously that's not all visible to a @@ -26,7 +20,6 @@ # define TARGET_VIRT_ADDR_SPACE_BITS 64 # endif #else -# define TARGET_PHYS_ADDR_SPACE_BITS 36 # define TARGET_VIRT_ADDR_SPACE_BITS 32 #endif =20 diff --git a/target/riscv/cpu-param.h b/target/riscv/cpu-param.h index 039e877891a..ddb76a5300f 100644 --- a/target/riscv/cpu-param.h +++ b/target/riscv/cpu-param.h @@ -9,10 +9,8 @@ #define RISCV_CPU_PARAM_H =20 #if defined(TARGET_RISCV64) -# define TARGET_PHYS_ADDR_SPACE_BITS 56 /* 44-bit PPN */ # define TARGET_VIRT_ADDR_SPACE_BITS 48 /* sv48 */ #elif defined(TARGET_RISCV32) -# define TARGET_PHYS_ADDR_SPACE_BITS 34 /* 22-bit PPN */ # define TARGET_VIRT_ADDR_SPACE_BITS 32 /* sv32 */ #endif #define TARGET_PAGE_BITS 12 /* 4 KiB Pages */ diff --git a/target/rx/cpu-param.h b/target/rx/cpu-param.h index ef1970a09e9..3806f41b2fe 100644 --- a/target/rx/cpu-param.h +++ b/target/rx/cpu-param.h @@ -21,7 +21,6 @@ =20 #define TARGET_PAGE_BITS 12 =20 -#define TARGET_PHYS_ADDR_SPACE_BITS 32 #define TARGET_VIRT_ADDR_SPACE_BITS 32 =20 #endif diff --git a/target/s390x/cpu-param.h b/target/s390x/cpu-param.h index a5f798eeae7..caef5a0e5c8 100644 --- a/target/s390x/cpu-param.h +++ b/target/s390x/cpu-param.h @@ -9,7 +9,6 @@ #define S390_CPU_PARAM_H =20 #define TARGET_PAGE_BITS 12 -#define TARGET_PHYS_ADDR_SPACE_BITS 64 #define TARGET_VIRT_ADDR_SPACE_BITS 64 =20 #endif diff --git a/target/sh4/cpu-param.h b/target/sh4/cpu-param.h index 2b6e11dd0ac..c3b8114e538 100644 --- a/target/sh4/cpu-param.h +++ b/target/sh4/cpu-param.h @@ -9,7 +9,6 @@ #define SH4_CPU_PARAM_H =20 #define TARGET_PAGE_BITS 12 /* 4k */ -#define TARGET_PHYS_ADDR_SPACE_BITS 32 #ifdef CONFIG_USER_ONLY # define TARGET_VIRT_ADDR_SPACE_BITS 31 #else diff --git a/target/sparc/cpu-param.h b/target/sparc/cpu-param.h index 6e8e2a51469..7ec4ac84dbb 100644 --- a/target/sparc/cpu-param.h +++ b/target/sparc/cpu-param.h @@ -9,7 +9,6 @@ =20 #ifdef TARGET_SPARC64 # define TARGET_PAGE_BITS 13 /* 8k */ -# define TARGET_PHYS_ADDR_SPACE_BITS 41 # ifdef TARGET_ABI32 # define TARGET_VIRT_ADDR_SPACE_BITS 32 # else @@ -17,7 +16,6 @@ # endif #else # define TARGET_PAGE_BITS 12 /* 4k */ -# define TARGET_PHYS_ADDR_SPACE_BITS 36 # define TARGET_VIRT_ADDR_SPACE_BITS 32 #endif =20 diff --git a/target/tricore/cpu-param.h b/target/tricore/cpu-param.h index 790242ef3d2..7a5f67fe15e 100644 --- a/target/tricore/cpu-param.h +++ b/target/tricore/cpu-param.h @@ -9,7 +9,6 @@ #define TRICORE_CPU_PARAM_H =20 #define TARGET_PAGE_BITS 14 -#define TARGET_PHYS_ADDR_SPACE_BITS 32 #define TARGET_VIRT_ADDR_SPACE_BITS 32 =20 #endif diff --git a/target/xtensa/cpu-param.h b/target/xtensa/cpu-param.h index 06d85218b84..1a9cdcefb49 100644 --- a/target/xtensa/cpu-param.h +++ b/target/xtensa/cpu-param.h @@ -9,7 +9,6 @@ #define XTENSA_CPU_PARAM_H =20 #define TARGET_PAGE_BITS 12 -#define TARGET_PHYS_ADDR_SPACE_BITS 32 #ifdef CONFIG_USER_ONLY #define TARGET_VIRT_ADDR_SPACE_BITS 30 #else --=20 2.52.0 From nobody Thu Apr 16 20:57:20 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=1772061440; cv=none; d=zohomail.com; s=zohoarc; b=cHnsbaR+8Szo236mOiqQ6jiI615NM+byp1VDiH19W139QL0/qxzYcZw3JGftC/K6iIxl4rRvqk53hXFhCkh8ArwpW2zoTufLIdSgcSiEklKAErh9zauSnj8bPQiRuhHzB2l5GGui08I9dpthnAMYXvsOzOxVsSd79v5LJw23k60= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1772061440; h=Content-Type:Content-Transfer-Encoding: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:Cc; bh=NZbo8084LvFt6DRJ0xDf9VJEW+VJ0Qd7W0M/EfR1IrA=; b=F+R9S/ZMAFn2/b1bW4lA98pd9EHJxQyDAQXpGtXipX2xxUVSPf/vTk3+Jcm41X/tcoA+6Gf4ciwv4TvJoPMIe6+XO7JGpbZWgBHeAOVAwhx+XxgnCnvpYLyKig8/7Az0pOsmShX4FrqwrzwGgq2eSBoXZC8yVXXJwLV9Km004eE= 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 1772061440901246.40353163994564; Wed, 25 Feb 2026 15:17:20 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1vvO6A-0005BH-80; Wed, 25 Feb 2026 18:15:18 -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 1vvO63-00055X-FJ for qemu-devel@nongnu.org; Wed, 25 Feb 2026 18:15:12 -0500 Received: from mail-wm1-x332.google.com ([2a00:1450:4864:20::332]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1vvO61-0002mB-R9 for qemu-devel@nongnu.org; Wed, 25 Feb 2026 18:15:11 -0500 Received: by mail-wm1-x332.google.com with SMTP id 5b1f17b1804b1-482f454be5bso13403975e9.0 for ; Wed, 25 Feb 2026 15:15:09 -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-483c3addb3asm4443415e9.0.2026.02.25.15.15.07 for (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Wed, 25 Feb 2026 15:15:07 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1772061308; x=1772666108; 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=NZbo8084LvFt6DRJ0xDf9VJEW+VJ0Qd7W0M/EfR1IrA=; b=T0BCGYYNWm4Q/FklFR2BGowpjbjcKmBRPZVw1J9/OduvVkP5RuXlj+3AwOic93mPVL STet/6ZZDCzXEjpj/pNSthtHXpBBon60V3pxjg5pLwKaki5pTtWJKZDccpKuEbXvvdoL yl6Kpp9FXokFn+3NDJbEbNyBvKxcyEGpoxPdZEsrFWR7bI1ApPAq5UV38NJeOyoMJX1h Ez5VqxF3CQw/DksxzgHUsndx/l7LAnlgk8Vnwjhccpr9ND7NaSyLZPF5KeFkulVFzLny 7PUpnqtxiQDN0VQjn7K+ex49mHrjFlW+C7841J0hL/xwopeKAQ/2YN6GrJ6/KyU5afub YMsA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1772061308; x=1772666108; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-gg:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to; bh=NZbo8084LvFt6DRJ0xDf9VJEW+VJ0Qd7W0M/EfR1IrA=; b=STqgivta7BTpUICET84KwxQdRMAfGwrswRUQomTdHAF/HZqbxwmmchqLkzACDlO+aH GZwLjS7AFkMQsB0dSgnnz/bP3crZ1aeuomWSyXuq/6jiUQyqWCY1pzsaJ7eHj5G85Uzn ZF5isBAtF/pg4qXuMC/K1/KGISBg2ObNrvBb9eOT7VMYAcup6yO0dazYbyytwxzpWHDL jqnBmNA+axTdqjdSTrN9aqRZfBm5bTe0ygTIudNrqxTyf3ep/LjSMKo1sFsYHrGMggVP ZomysNvioMk3oAuE4m33lGWyPJMCfc0KTWPBneBGDkarakbRfvfzpuSYrIZvKmZCeOzO NzZA== X-Gm-Message-State: AOJu0Yw3hO+m8Fvq6ihR7vDGgU+sYziwubD+pYruIJ8uW8DmpbobE1cH 03VBHdTl/xI3OTo2VR5bg4gO8ryZ6o9lv2JoZEXgls6K/TmZOQhuMAAHDrZGWoouFKfkuJEmCcc elUPbA/g= X-Gm-Gg: ATEYQzz1BbJywzHsCTAq4k3+j/oHRzPJqZTplY4C27FWJC/v0LGVJZ7V4PePLavYQga chNRKvvE5G9t9ZEa8+b3PLnhBv7pXaWi4UDkdCUeRJVCEz+NiGwGi9OOXUnhWb8SUjW/j4FY1/r I67U9jGOY6qpTC0PKXioPwqUJbH/Pvl3Go1hNgAPPMMaq/ns3p6GVTRl7/vV5JbjmNXHD5QD4cR DcECfaEyTalRoVr91CwWiPCRVwHduRZmly4LBeuqqQdgGVTH35rrGg/vOn7ayfczUkn/1J/5LLt igz32ArQR5HKEjG1lxfB9xC9RyD8gNLcqFEhi/l7+iOYCmk7UZRCkehNvX/y+3uRJY5AxOGWLAW p4ZAg0Z4ZpUE+jH6LpbpJuZu5qlu0vTgs4LLvvKcrXVLHD5jeHnDUz0WgbFH37t2icDv8tmb+Ds g6XqkE8k4kEfTMdQbSo1gIAlUpM6YecrOxOQbLLUBsKRBkq8svkAMhcDh2lYG/t7b4TL4eJGHz X-Received: by 2002:a05:600c:5289:b0:483:7b99:131d with SMTP id 5b1f17b1804b1-483c33d6b0fmr13614715e9.16.1772061307784; Wed, 25 Feb 2026 15:15:07 -0800 (PST) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PULL 08/70] target/ppc: Move user_only_helper.c to target_user_arch[] source set Date: Thu, 26 Feb 2026 00:13:08 +0100 Message-ID: <20260225231411.96482-9-philmd@linaro.org> X-Mailer: git-send-email 2.52.0 In-Reply-To: <20260225231411.96482-1-philmd@linaro.org> References: <20260225231411.96482-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::332; envelope-from=philmd@linaro.org; helo=mail-wm1-x332.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: 1772061442693158500 Since commit 46369b50ee3 ("meson: Introduce meson_user_arch source set for arch-specific user-mode") using target_user_arch[] is preferred because clearer, and no need to filter on CONFIG_USER_ONLY. Reviewed-by: Pierrick Bouvier Signed-off-by: Philippe Mathieu-Daud=C3=A9 Message-ID: <20260219191955.83815-2-philmd@linaro.org> --- target/ppc/meson.build | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/target/ppc/meson.build b/target/ppc/meson.build index 8eed1fa40ca..b0d708bb519 100644 --- a/target/ppc/meson.build +++ b/target/ppc/meson.build @@ -31,7 +31,10 @@ gen =3D [ ] ppc_ss.add(when: 'CONFIG_TCG', if_true: gen) =20 -ppc_ss.add(when: 'CONFIG_USER_ONLY', if_true: files('user_only_helper.c')) +ppc_user_ss =3D ss.source_set() +ppc_user_ss.add(files( + 'user_only_helper.c', +)) =20 ppc_system_ss =3D ss.source_set() ppc_system_ss.add(files( @@ -57,4 +60,5 @@ ppc_system_ss.add(when: 'TARGET_PPC64', if_true: files( )) =20 target_arch +=3D {'ppc': ppc_ss} +target_user_arch +=3D {'ppc': ppc_user_ss} target_system_arch +=3D {'ppc': ppc_system_ss} --=20 2.52.0 From nobody Thu Apr 16 20:57:20 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=1772061372; cv=none; d=zohomail.com; s=zohoarc; b=P6lhBNNUF/zuuVf15bMDNizus61abTCWXSNFjGH7zthGKkMX3i5Ti3jcTQTn3Qe8i+vb9jd7fvBLL5b3ExnL+oCOJLj5nHZ9vxENZ7asznbUXdxKDqrfB31H88LcHmbJ45Sxx2aPRcrSxz+ADggIPwF4gvyaustC2ZrbKCZHC1I= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1772061372; h=Content-Type:Content-Transfer-Encoding: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:Cc; bh=EM47/YJFZDKPoa7DcAX8k/MOHo1afw3n6fjicCOcopM=; b=hS/azBH+J2JtWsssReBRfbL3dntdPoh41PWpM695Hew5A9JQ3nM9zR0P41Fu1/CrvTWqUa2OivSYvVoRCYjn4ia1pL8BBxpJUPfAktyR0rUNN+7ovFUJ1n3azHvdoLVKT8sYjvi40OMHBPony0px57M2Kv9eGSvp21GsnfEHa3k= 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 1772061372129162.92785448424218; Wed, 25 Feb 2026 15:16:12 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1vvO6H-0005WO-KC; Wed, 25 Feb 2026 18:15:25 -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 1vvO6E-0005PV-Pa for qemu-devel@nongnu.org; Wed, 25 Feb 2026 18:15:23 -0500 Received: from mail-wm1-x32f.google.com ([2a00:1450:4864:20::32f]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1vvO69-0002mM-4V for qemu-devel@nongnu.org; Wed, 25 Feb 2026 18:15:19 -0500 Received: by mail-wm1-x32f.google.com with SMTP id 5b1f17b1804b1-48069a48629so2848675e9.0 for ; Wed, 25 Feb 2026 15:15:16 -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-483bfbb6d16sm30045995e9.5.2026.02.25.15.15.13 for (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Wed, 25 Feb 2026 15:15:13 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1772061315; x=1772666115; 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=EM47/YJFZDKPoa7DcAX8k/MOHo1afw3n6fjicCOcopM=; b=vzqOYYdx7QWGXaaw/YES2si16wJMrY61p9HBoHV4Z0j2EpLABMiRMwH+pfMmn+7+gi funzF/OFBa2KzPr47y0+7AJFH8rX1zs6fCVvfJjqyPeLhXwQkqxpD32XtFFCDNQAQYX3 M46jCmS0iEbOPYbu5cSPa2nU88kNNR+Qkp/G+j7pGNa/MHoTyvQ/TOnmB/xsgPQrHmxj 3oQeXCyZE9mJzOuVfL2RivSJeBMiME/XexNpPtL4IUDi/k4RBswYab9/YSDlbkOu6Z3D KlEoEocI94UU+W6UIxUV6+n3UJHv542kEW1X95jB6D36qt8esAR0GOT7gKaxyDJEWWYo NiQg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1772061315; x=1772666115; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-gg:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to; bh=EM47/YJFZDKPoa7DcAX8k/MOHo1afw3n6fjicCOcopM=; b=Ca4SBNSmlMpfr6KDaoLuhTMRfgRlO9klbzpJjUOC8Pc77R7ewu0/VAExsOvIBYxhLt LUsZ7WYRAQqHL52q4MiddGA2QeUXWht7tRUK7KtTa9wlORKsCAEg01P4C7PDQMt5sjtV nTUsV7xEbkheECNtdM0PRNRnKEOBVzuANP1FLLb5gyAvQRn+T5xr8Z5CoTkgo+dZzus6 kCzsoxICZC7/X8kGQVOvdPPka5EssM8cxXgwIv48nQbSaiCdsJjc7EOfwVYTgROscBZb e6etimMuieLxQ4Jhcw70l70/H8QKRAC8uBJfSRwiItmqLdpHVpGqzlMi3p9eAjtuau2R 49NQ== X-Gm-Message-State: AOJu0YyvwHDRBcelM+SWImPIwQsrEIDOm/zgi2Vu3KVKBhrdzGbYwRvs Y1hdQ1d8EcrMk/D67ZIWdCaoTXxI6DpnktGD3x5V3mrdw2ghJI17c345AwsC6qpauzKgcEAXonr gzuNyYo8= X-Gm-Gg: ATEYQzzHCDpXvb6FawnntVHnjmCSO2GWry5z3XtCGHSaotk5AuQsJt4fr7rRhPkA0Sr vZIGlGWi87EPAK5w26Jbuc6fkm8wftwYLHlTj80Yemul/FKsguKf2JQCoO9BphoGFW3wuBBrNul 7NlAkjIC2hSHk01VYSS2L8Zd+HGnKNJL/0FQdHxPbVcg4WuYpXVyCqA+/m+IQCyzeCRJ4N0E6hk 00wV/tT+ho+iHiRcobeviXfxMfj4w7rlzAqWVvPYllysmvWySFdh3PLbv8sQ0UlUwLYJ9QVFLY1 q2Ok0H7eDxuSh+IUo6Z+YHdWga/aALhYaob67WHBCR6q556miTnVZUqRmtvweRlfcY4xCoECGY1 t8qM1IMfWUCY0fag3zO2Nv48PpT8t5F+e/A8AfMlOHx9CuiajRdttOIwuMgYkENeWCW6Vtqu7pC 3mY8QsQeddNk7F4LIJUhD+28ZlCCNgSXQL7C/T415dF29CQsFB6CCkOCWvfVVo9OWXNuCN4CTw X-Received: by 2002:a05:600c:620c:b0:483:43d8:8d68 with SMTP id 5b1f17b1804b1-483a95f8988mr277904665e9.28.1772061314986; Wed, 25 Feb 2026 15:15:14 -0800 (PST) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PULL 09/70] target/ppc: Remove PPC_DEBUG_SPR left-over comment Date: Thu, 26 Feb 2026 00:13:09 +0100 Message-ID: <20260225231411.96482-10-philmd@linaro.org> X-Mailer: git-send-email 2.52.0 In-Reply-To: <20260225231411.96482-1-philmd@linaro.org> References: <20260225231411.96482-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::32f; envelope-from=philmd@linaro.org; helo=mail-wm1-x32f.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: 1772061372434158500 The PPC_DEBUG_SPR definition was fully removed in commit 61135639821 ("target/ppc: Clean up _spr_register et al"). Reviewed-by: Pierrick Bouvier Signed-off-by: Philippe Mathieu-Daud=C3=A9 Message-ID: <20260219191955.83815-3-philmd@linaro.org> --- target/ppc/cpu_init.c | 1 - 1 file changed, 1 deletion(-) diff --git a/target/ppc/cpu_init.c b/target/ppc/cpu_init.c index c36fd118a99..c809c1f4d89 100644 --- a/target/ppc/cpu_init.c +++ b/target/ppc/cpu_init.c @@ -52,7 +52,6 @@ #endif =20 #include "cpu_init.h" -/* #define PPC_DEBUG_SPR */ /* #define USE_APPLE_GDB */ =20 static const Property powerpc_cpu_properties[] =3D { --=20 2.52.0 From nobody Thu Apr 16 20:57:20 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=1772061338; cv=none; d=zohomail.com; s=zohoarc; b=cQkZQyKf99OqAE5azpl9kxYDpkHvkIbyn1iwScUDxe1MIhKiYI8h5hQEW/1fia7JFiNY7OyOgoUmdVJsFvbbJ8mlw60D5AaOCfupQ2RciWh+Uufii9Bj3HqhiLrOrSXtPL8C9sx7CBzhPTBY4JpfgeoZzbvT8/T2pNdxTsZPjIQ= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1772061338; h=Content-Type:Content-Transfer-Encoding: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:Cc; bh=ochzk25lzH1ImDnhbj8ucTrQgzHw3TTu+SZR7L/V3nE=; b=f6a9tt4cp6wGNyBWre8wy1Or/amlMKV5XdmAr2QWnKg7rpEhi1p3qcCau/EVCGW8phDiz4cQk1hgY4rYYl/vP3jNgYpfSGnX3VwsKSUmaXHdxNwjniZKEsR3D1WsMiJ9gSkUkHQ5QXhM5TDFqCypg4aXl1SFLyx+gMzNiATM7S8= 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 1772061338079745.7918491546792; Wed, 25 Feb 2026 15:15:38 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1vvO6M-0005pN-Mq; Wed, 25 Feb 2026 18:15:30 -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 1vvO6I-0005aR-Ib for qemu-devel@nongnu.org; Wed, 25 Feb 2026 18:15:27 -0500 Received: from mail-wm1-x32c.google.com ([2a00:1450:4864:20::32c]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1vvO6G-0002mb-DV for qemu-devel@nongnu.org; Wed, 25 Feb 2026 18:15:25 -0500 Received: by mail-wm1-x32c.google.com with SMTP id 5b1f17b1804b1-483703e4b08so1939195e9.1 for ; Wed, 25 Feb 2026 15:15: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 5b1f17b1804b1-483bfccad8esm21484675e9.22.2026.02.25.15.15.20 for (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Wed, 25 Feb 2026 15:15:21 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1772061321; x=1772666121; 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=ochzk25lzH1ImDnhbj8ucTrQgzHw3TTu+SZR7L/V3nE=; b=QZ1KcTROcKJ+rCPMIm5tq+134oYvYFV2y6wPzP7oYEEaELwyW7nnRFIzoolLR+0HDa ZISDwh0tciadcgAUUydY2uU9i1JCNdtlZv06GPn53SBp1ewPJeMbz7z/dGdjEWdRYm56 WIgSMssFCzIn7raAEtbL03wDm+ufvEs4bXxtYZg/5VkUVAeT/t21i7tqAv/De28HgO2C 8PYeXvErAE5DjolXZVZIKs+gCt4u/kMGkvrQWs2KX7qkE2TEJTNwaHrL7OTayTYpGBhr UejHFS+4RmP8RyRIr4vMnojHPW6PMMx0IgZQsZpGCUd9FnIHL0CnHzP+gycyj8NndIdQ 3n4Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1772061321; x=1772666121; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-gg:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to; bh=ochzk25lzH1ImDnhbj8ucTrQgzHw3TTu+SZR7L/V3nE=; b=Rx7rM3a394UWmq0IDOmVOGdGELpoEAZwrEInkj1+bIIpaPHHaiq2fiHztkdw8Fk4UK 3Fl3/v9Rb2euPdpaGDFlgZUumogZIoUJ4MVgHXZ6iGY62OXRjPLIMH532ntF/yiNQDom DumNZ597r7pOfv1Dl5BHtriCOcq89TkgyOgy2jgBLt4Zes9kTXDMp0oEQC+CEgTrMYMP FLOvoCcM7RnMKBchgUJwJrdmS0mz1B2b5x3bFk/cwo+Znc4OZibH44GUvtLq0eYn91eH N8vuiepimtsivc6X8w4IqOIcZ69pKrIGbjwX1BDPaSvHzSZYUMwWa95AHWPd9GftoVP+ lMmA== X-Gm-Message-State: AOJu0Yzd+XvWePC0mJ12s6Wpwg7AzcNzfhDvaF7u3uxsEtzW8IiHoQOU xUojTPKm5SyVmn2xmI3Or0isvmees4mij4bA190jK2NdiDo9dDC091jc5QqcO1kkWdmYmGx5Gj4 0hEzWqhM= X-Gm-Gg: ATEYQzxUFHstQquAu7newA5KD4MuHI8b7cxEddaxVhgnGtgHEL9cQd1nAS/HAJTeToU PSMqrWkUJwLy06aPIAnhKV8HYG+aLNrtVi5143BnZx6Lb//t2LBqT8O92X6t9Auh5ozLiyu/8dE S03CtXNWvrCNusswG8897y2tPBo+7EWwHa3Z4Ya2yTQTLGHOT9xBAn6pdOU/23ekylSS1lLA+Zq RdhQbzpI8zvjJzTlg8Ya/mHVW+q/1bsFj4G580Hr9f+RVcspA/+MnUFl+bpwF4QG1Ns8DTHMbSU LnA8YxD5JBkaOEtp6CtWOU5vIIsSZ9EdMmtfMs+s7eRFKa+kQF17Rj4BlqbXFIgk7yqgGxc4swL AtH1v1sRwSbK/Gch3DlsY/eVuSAkUKBRTlhNJG67i5VSLL+peZWMvrNu9o0GM4bou3FptnloN78 ffGQX6365Qe2Tlc3xf0hwZzYNbctrwwMHgfRhoK7uc5CWJZe8rvTLa/Ljjq2+xS+OrH5f6iGVV X-Received: by 2002:a05:600c:5583:b0:47d:52ef:c572 with SMTP id 5b1f17b1804b1-483c33c1d04mr10824785e9.1.1772061321493; Wed, 25 Feb 2026 15:15:21 -0800 (PST) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PULL 10/70] target/i386: Inline GDB_FORCE_64 definition Date: Thu, 26 Feb 2026 00:13:10 +0100 Message-ID: <20260225231411.96482-11-philmd@linaro.org> X-Mailer: git-send-email 2.52.0 In-Reply-To: <20260225231411.96482-1-philmd@linaro.org> References: <20260225231411.96482-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::32c; envelope-from=philmd@linaro.org; helo=mail-wm1-x32c.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: 1772061338425158500 Directly checking TARGET_LONG_BITS allows to remove GDB_FORCE_64. Reviewed-by: Pierrick Bouvier Signed-off-by: Philippe Mathieu-Daud=C3=A9 Message-ID: <20260219191955.83815-4-philmd@linaro.org> --- target/i386/gdbstub.c | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/target/i386/gdbstub.c b/target/i386/gdbstub.c index be41601cffc..291d56b8e13 100644 --- a/target/i386/gdbstub.c +++ b/target/i386/gdbstub.c @@ -79,15 +79,9 @@ static const int gpr_map32[8] =3D { 0, 1, 2, 3, 4, 5, 6,= 7 }; #define IDX_CTL_CR8_REG (IDX_CTL_REGS + 4) #define IDX_CTL_EFER_REG (IDX_CTL_REGS + 5) =20 -#ifdef TARGET_X86_64 -#define GDB_FORCE_64 1 -#else -#define GDB_FORCE_64 0 -#endif - static int gdb_read_reg_cs64(uint32_t hflags, GByteArray *buf, target_ulon= g val) { - if ((hflags & HF_CS64_MASK) || GDB_FORCE_64) { + if ((hflags & HF_CS64_MASK) || TARGET_LONG_BITS =3D=3D 64) { return gdb_get_reg64(buf, val); } return gdb_get_reg32(buf, val); --=20 2.52.0 From nobody Thu Apr 16 20:57:20 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=1772061354; cv=none; d=zohomail.com; s=zohoarc; b=cHL85+4XvlQO1xuufdGHEzFodtVSXqKAOhH5l+tluYbpR7NIEHssmAaPDIPyEXL4wTGTMOuQI4QVQIq9B+lZom9VV+50LLPQb8eSSr6Bzcb619pPesR7jB7GyvZdbL9bPT9XeBmW6uHpniukICDMQUkGalBl7WswRVQTqn/kpZI= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1772061354; h=Content-Type:Content-Transfer-Encoding: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:Cc; bh=kX0Uvz1Dx40n3H3Asawwjw5H6+gWbvG6un6Zwo2v/I0=; b=cedWvh729Niv9AGwE7U339+D20SYk6LSyxCCkLFOkuFrGjZfK3qYtxWzdfrghI6/UlUQJ8TD//2Mi4oifNiO0IwJMVQkkoKJpRCBu+KJ15SE4iJebpGZ0ddsmO0XgVYD31HgTXtfafEKDvSxw9q09A+L5qZ2kD9M9NaMs5kBQLY= 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 177206135425772.22059272897832; Wed, 25 Feb 2026 15:15:54 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1vvO6S-0006Lv-I6; Wed, 25 Feb 2026 18:15:36 -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 1vvO6P-00064t-Ej for qemu-devel@nongnu.org; Wed, 25 Feb 2026 18:15:33 -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 1vvO6M-0002nF-UQ for qemu-devel@nongnu.org; Wed, 25 Feb 2026 18:15:33 -0500 Received: by mail-wm1-x32d.google.com with SMTP id 5b1f17b1804b1-480706554beso3662205e9.1 for ; Wed, 25 Feb 2026 15:15:30 -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-483bfcbf789sm20667015e9.17.2026.02.25.15.15.27 for (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Wed, 25 Feb 2026 15:15:28 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1772061329; x=1772666129; 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=kX0Uvz1Dx40n3H3Asawwjw5H6+gWbvG6un6Zwo2v/I0=; b=UaJNSpn49ilqQ71VbvryAZluGt4PKEjAAyF+YaeQI5QNE8TBEDl83D+LEH+Qfz5gL+ lza/s8SMU3/a3yFMCO695+QFfP1KaoHtqfH0DR5tCmV3JXjJADMD0MUFiQIQ0JUYxXAc XT9hYd7fuhqqcmeUzt5TjWpBCO2WKyJ2aVyFSP3xXvwFMY8p7/CtbXUsvKT4E+chMzuP oyboTjDI/trpRM6Wb7wh7uGTdzZdJdb4ATijtXDRdT+ZUd/yMCkQX5hi0GpfBHonm0R3 nc8+AEuRarj9lzryaBedgnoi+TOJw7q2JaYmfg/XfgUE+A0FOu5wrSLW9bqfmFQi4am/ P5rA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1772061329; x=1772666129; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-gg:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to; bh=kX0Uvz1Dx40n3H3Asawwjw5H6+gWbvG6un6Zwo2v/I0=; b=jvziBufwVeO/af51tYJvFEgabr46EUMXFR67Ywzg/th8dqm/IWmH7nqBz6euCgArfo vkO3YLBeQY0MGPmuhMEtJAEmBF/j0prXn2gNDCukmVFOtg06oKp2SeRqmbBVg05yfsrU C4LwS7GK2N+cLUWpFhBPoTVShWuUfYmZ/AKd2OFHppiKPTS75hS340hqrnkrDL4opo0x 0fOXBEVcImqjfqjJWK9okt+MiEJRuZA+LvTkMrkIkj/bbT2IBevbNTDERnKH+VM+lTLQ AZZuCkxopLHguFhKfITn73d0RBaL0+PLqyDaod4mWJi2JxKprDmUJZc0x4wjSn51kMNe CilQ== X-Gm-Message-State: AOJu0YxZTSf7+VWXj8MfRzy8gb3P0pJS0e7EAcP/RzhLM/A4kuoApQgs PKokXqi1Vx0gAbbamL/AHn0lH1WIJKjpRBFaz+pq7k/B3Qszgw2wKV2/h55g0SPifLyzuQCax1M jkISsGj0= X-Gm-Gg: ATEYQzxg4vCce4i/93F1YJUbH7T3xnLnPwPpC4CcE9ztpqqRLfWZqCuZi2TdW5GzHT+ FRCXN4wPEaptbJUq5xKgMYMfHaBz/4i4fp7zgTOh1+U83SGesuTJCCtTpRawbqBoGubhc8w1SYP R1F+51Fzg/jcMQ8Wi9qulMz6glfz+L51hd0uo0ABykGG7AeTZAbOnT07w5WqWPBW6/CfuvVhsZ0 heEu/Hh71P/kmSY76yUun49wN4K3hAyFYOQ0ZMd4Y9G6Tt9gIHK3tOWReW/RKow/oELYcAseqff XaA+5xsICOS/XwhTdDdh4VDDcRoSXwJkRjphJ4MiNWD1Vk2U+b1hQm8ULzEQ8A+QDk1oFCuib03 RdmK0xccnNtpu5RE0NqRmxCX7GkRG+3fMyLRfMQRhmLcmhSph6TEFXcYiIi803c6JIuvKXlQCOi W/sr5Wh3b+iupXyhMOz3lSSGZ1ta+Ykfgixab/07nDxIYHDnhPUGfEhgl9/zDx16c7ZvUdLJiP X-Received: by 2002:a05:600c:37ca:b0:477:58af:a91d with SMTP id 5b1f17b1804b1-483c216ab34mr35057475e9.5.1772061328936; Wed, 25 Feb 2026 15:15:28 -0800 (PST) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PULL 11/70] target/avr: Fix typo in gdb-xml feature name Date: Thu, 26 Feb 2026 00:13:11 +0100 Message-ID: <20260225231411.96482-12-philmd@linaro.org> X-Mailer: git-send-email 2.52.0 In-Reply-To: <20260225231411.96482-1-philmd@linaro.org> References: <20260225231411.96482-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=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: 1772061356362158500 While GDB doesn't provide an official XML for the gdbstub protocol, it is still better to name it 'avr' instead of 'riscv'. Fixes: 12b35405476 ("target/avr: CPU class: Add GDB support") Reviewed-by: Pierrick Bouvier Signed-off-by: Philippe Mathieu-Daud=C3=A9 Message-ID: <20260219191955.83815-5-philmd@linaro.org> --- gdb-xml/avr-cpu.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gdb-xml/avr-cpu.xml b/gdb-xml/avr-cpu.xml index c4747f5b40e..926cf053210 100644 --- a/gdb-xml/avr-cpu.xml +++ b/gdb-xml/avr-cpu.xml @@ -10,7 +10,7 @@ register descriptions. --> =20 - + --=20 2.52.0 From nobody Thu Apr 16 20:57:20 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=1772061370; cv=none; d=zohomail.com; s=zohoarc; b=ST/BgGnejnl8TRsCLc3SLHANIdSPRflpWWu1gI09ol9hKgCqu367TcwqbpNzbOhMEJt0sVxyVVG1tFFsZp41fGUHsFlXbsP76sopNI2RHGKt1TJx7V1YD387eChK3uJkjc8mlny2+UZct9UMOTK2WAi+++U0xP79zJqOCzW37jw= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1772061370; h=Content-Type:Content-Transfer-Encoding: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:Cc; bh=mgh3pXx3/FXyu63G+DeVDmfrgJg//6Ux80N4glwlmy4=; b=JurFIa71HwCHZEWT+BFoSiwPABg6aV1goWTt7S9uw6nn79x/nEdr0hAg17y5l5m0Jq5BcXgzVUbxypeo2hqpf9YcDc8NVVWQHQiRWjb6FblC0D6658sJfe5eShvt1rpY5KzIwWwVrN7M69nk3ZtpgNUcahLIjdbXbh8hRhxY+EI= 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 1772061370474434.38887041325165; Wed, 25 Feb 2026 15:16:10 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1vvO6o-0006zw-37; Wed, 25 Feb 2026 18:15:59 -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 1vvO6V-0006h9-PF for qemu-devel@nongnu.org; Wed, 25 Feb 2026 18:15:39 -0500 Received: from mail-wr1-x444.google.com ([2a00:1450:4864:20::444]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1vvO6T-0002nX-WF for qemu-devel@nongnu.org; Wed, 25 Feb 2026 18:15:39 -0500 Received: by mail-wr1-x444.google.com with SMTP id ffacd0b85a97d-43767807da6so148727f8f.2 for ; Wed, 25 Feb 2026 15:15:37 -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-43970d4c982sm36934910f8f.31.2026.02.25.15.15.34 for (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Wed, 25 Feb 2026 15:15:34 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1772061335; x=1772666135; 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=mgh3pXx3/FXyu63G+DeVDmfrgJg//6Ux80N4glwlmy4=; b=QgtRles+SnU/LmZswTMolNARJvOtuITTHWrlcjGKHHaN4CTeUnHdumLZQVy3TxmISX Kw3wk9dQZUrj7UGl126go/tO/bi56i36Js4AH/xyseczMmodhn7MZahvxNyA3aYrHbPI ZWUtkp7r8zUQoCo4D16+9kst3kBlwCQ67Bpcv17J3TQ5mqzjANknTzM/MA2TOj44oYca Cr1GHUc4TWbA5NokbsOD8x+ZpputTZrf+B8FWgsYLaf2vQL5EtMDz/Z7JTu9PeFt2kFU ngD+IIW0tHR3rV88Gi7qwyAPo9hd6VtXXfo7u8g/UoddcYCxeFpZDFTt8dcgUp/GmqmG iDiQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1772061335; x=1772666135; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-gg:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to; bh=mgh3pXx3/FXyu63G+DeVDmfrgJg//6Ux80N4glwlmy4=; b=hf2gVzdpUZr2EvkidNQvbHcte1fnHg5C1jHsc3AIgCZ/MRn5+fIlLu0uz6M1FosZNT pwN/TzoBJSBQ5hCvjYDSttRgKwHUMIUSDC1naMfF+tEXK3+o7x0B0FLcjU+QWE0f3AMJ iWlouaklq4X8f7BIcCozG5QU1jBoSvI+215UuNpI0j9zf8XpUnWZVl4YLbMDnk6ETj1h iXfm5ejLTGleLLOzFkos2QdYVT8nYtUAwitgEJGJNGeC+Ih6O9ohtsAkKHgTeo82xmnb I9KJUFt8OO5caOlNFZO4/nZ6rz9NmhmJ3+jZz7g76AJeIkhxqbnfxsEAEqy6zZoQNPi/ x0tQ== X-Gm-Message-State: AOJu0YwEtFgdQ0/REuFVni4xYkRlFfTpDClun3wOz+TY2YILaa3ZjGS2 j1+fqmU1O5gxuZywzcQ9tHG686gEyqsWZma12dtmoMP7b582QAeSFJglCp8IZ0m2ssXT6zwOi55 e6oHUx7nZVA== X-Gm-Gg: ATEYQzwj2ZcmaNE6R+RGxMAIFmrdwntCZ/LPohpBoITPupGDI1VJFcPL/DrUybWdh+Q NYVktl2rQu0fG+KH8qplNEsiaDMOm88NW6+2Ky51xp+U171emhldALBKZkYDVn831gomwU+rKZ8 8qdmgNjwARGBJANM3AsYR2Sp4VuuJ8XeHVchHejXlALzByWBm2aNdm6kIvrUzUZiIOXVWOFmi2q 1Yw7Qk+JCsropkMNcCp2WdA4GmT8yCPeAA7PITOkGiVmUgkKTlZMfJMwDKOTnLzFKNsh0dwJXM6 PcHbcGgQQd4QQDvuUExcNE86f7AT+Zghk5gjLwvzmlceSdAZPd+Dxs3mZRMv829tBgtH+f4e0K5 18cCaVETAeVvqYSDR8h4GImF3sMPt2QXOvzG7002bzTG7Vlx0Ea7GR1ymlr8n7YNMWPttqzZiAv i/QbSM47jJfheLTr6T56K4bYx1tuDr7NBoN28/yS2LQw17e93Cx+4AR5HHgTpRJ99n/8oMiGkc X-Received: by 2002:a05:6000:290f:b0:436:2f66:5d1a with SMTP id ffacd0b85a97d-43997eda5d9mr616441f8f.8.1772061335463; Wed, 25 Feb 2026 15:15:35 -0800 (PST) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PULL 12/70] target/alpha: Document gdbstub register indexes Date: Thu, 26 Feb 2026 00:13:12 +0100 Message-ID: <20260225231411.96482-13-philmd@linaro.org> X-Mailer: git-send-email 2.52.0 In-Reply-To: <20260225231411.96482-1-philmd@linaro.org> References: <20260225231411.96482-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::444; envelope-from=philmd@linaro.org; helo=mail-wr1-x444.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: 1772061372501158500 Follow GDB XML comments. Re-order switch cases for clarity. Reviewed-by: Pierrick Bouvier Signed-off-by: Philippe Mathieu-Daud=C3=A9 Message-ID: <20260219191955.83815-6-philmd@linaro.org> --- target/alpha/gdbstub.c | 25 ++++++++++++------------- 1 file changed, 12 insertions(+), 13 deletions(-) diff --git a/target/alpha/gdbstub.c b/target/alpha/gdbstub.c index a7110e8d1eb..7722eb46806 100644 --- a/target/alpha/gdbstub.c +++ b/target/alpha/gdbstub.c @@ -31,6 +31,9 @@ int alpha_cpu_gdb_read_register(CPUState *cs, GByteArray = *mem_buf, int n) case 0 ... 30: val =3D cpu_alpha_load_gr(env, n); break; + case 31: /* zero register */ + val =3D 0; + break; case 32 ... 62: d.d =3D env->fir[n - 32]; val =3D d.ll; @@ -41,15 +44,12 @@ int alpha_cpu_gdb_read_register(CPUState *cs, GByteArra= y *mem_buf, int n) case 64: val =3D env->pc; break; - case 66: - val =3D env->unique; - break; - case 31: - case 65: - /* 31 really is the zero register; 65 is unassigned in the - gdb protocol, but is still required to occupy 8 bytes. */ + case 65: /* former Virtual Register (reserved as unassigned) */ val =3D 0; break; + case 66: /* PALcode Memory Slot */ + val =3D env->unique; + break; default: return 0; } @@ -66,6 +66,8 @@ int alpha_cpu_gdb_write_register(CPUState *cs, uint8_t *m= em_buf, int n) case 0 ... 30: cpu_alpha_store_gr(env, n, tmp); break; + case 31: /* zero register */ + break; case 32 ... 62: d.ll =3D tmp; env->fir[n - 32] =3D d.d; @@ -76,13 +78,10 @@ int alpha_cpu_gdb_write_register(CPUState *cs, uint8_t = *mem_buf, int n) case 64: env->pc =3D tmp; break; - case 66: - env->unique =3D tmp; + case 65: /* former Virtual Register (reserved as unassigned) */ break; - case 31: - case 65: - /* 31 really is the zero register; 65 is unassigned in the - gdb protocol, but is still required to occupy 8 bytes. */ + case 66: /* PALcode Memory Slot */ + env->unique =3D tmp; break; default: return 0; --=20 2.52.0 From nobody Thu Apr 16 20:57:20 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=1772061408; cv=none; d=zohomail.com; s=zohoarc; b=UiH82Jxndn+cgMIUgokrOceQqbGLoh2htpRi6dcCn7lzOXL/V407tScH1ueU2hwIViGJ0wQNJNEZu5bsbCrrqsl3aWjE8w1xHhojl48Erg99435ypW7+9a4FM4FE9nbZ9O1ACk99D0u26FArM/Ha+thw18P5indnIOY1ZZlnuZA= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1772061408; h=Content-Type:Content-Transfer-Encoding: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:Cc; bh=NGQ7lLB0920PRZOLFmWc26SlHIRfD26FcVLJos8aUeA=; b=DJfbPQ3x32U8ISHM8QTSQ+7n3s4dxIHfyUKzRw0XTtlydrBHIaWVjqYPkGcBWigjEaTHK34SoSIl9jYNqLa+u37FCkp1pUDsPhIbIiUDLUDsBRbXzqREHMI2sZsG4COHa862wKtINxSS/ui3eY58M3ja4fI4EO3aVjuSUReRHdY= 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 1772061408219263.1052951758252; Wed, 25 Feb 2026 15:16:48 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1vvO7U-0007lw-Eq; Wed, 25 Feb 2026 18:16:42 -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 1vvO6c-0006sp-HA for qemu-devel@nongnu.org; Wed, 25 Feb 2026 18:15:50 -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 1vvO6a-0002nu-A2 for qemu-devel@nongnu.org; Wed, 25 Feb 2026 18:15:46 -0500 Received: by mail-wm1-x335.google.com with SMTP id 5b1f17b1804b1-4836f363ad2so3051285e9.1 for ; Wed, 25 Feb 2026 15:15: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 5b1f17b1804b1-483c3b44207sm4134555e9.7.2026.02.25.15.15.41 for (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Wed, 25 Feb 2026 15:15:41 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1772061342; x=1772666142; 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=NGQ7lLB0920PRZOLFmWc26SlHIRfD26FcVLJos8aUeA=; b=QsCRIMJsHU8wlbRjSllNsb4XC4kOvHkUjeHWw7t8govXxTAQ4pMh6EyYDfMw/bH+z/ wrFnwOfOUTAd7Z8TAFUMtP35HD+9BjSXBUjGdfzWw+kIzgyZYEcNII26zlQ58gY9YKqm 3GgM7EZ93Vbpvl2hOwMBeKoBOkafgfdhlzskhGKd0YBFuOyb0ERjLeY8akNqC1gy25kv Jkty7+80jYAZa+nJ3ScwK3ppFn8K4Pd6oEOc8QRT6fDkEPSxHeJE5piMzLu9hImhJzU+ 17oiaRE658imCMIpgvtTYjpaYJChH56lsYQlKmTz0H7jmCBDwQeyd1GAd0k0Gx5uNYL/ +SDA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1772061342; x=1772666142; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-gg:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to; bh=NGQ7lLB0920PRZOLFmWc26SlHIRfD26FcVLJos8aUeA=; b=jPDzoQutW9Iz7pf9iApXGakM4gOyDOoogjoFB5kQeClueJbzcbQDRsOQDrtPJxAV4Z 7tL4o22e85aWsIcOqSFBimdr6BJqgukyU3p//ZCPtNcmjEcAdg+EjZ4ZnvjPksbvx1oj 4qHUPADhev+OEBufbEeoXuQoW5eGGrnTyl/ZloQp7YA1hEI23PyS+kLVp4D9ovkAol0e Jz/NCM36LBoGMugP3R59+CxTkV8ha60YcTuSF4oSS6wmorb+yiGnGuoIZVYiPdZKeKj+ fQlUQ2T/nv9KL/wmt1oYTkeWtWIsjYtra5KemMzNokWs4OOVequ+x8+/JOwy1SbnKsit fCiw== X-Gm-Message-State: AOJu0YyRK8qDYcvhULoVwT9GfdySf9HAxSh4QoKLh9IJ1bmxaeyd7Hhr +qufHewBUULplaAIUKKvzW4NvOc49iGVn+aX6RAVbXku6i58LDf6flxZ54QUqeJM0E48pt5HEI4 o6fuJVFc= X-Gm-Gg: ATEYQzwdzW53bIf2L6Xn8Q6ppCVrpJFcPBqmhjRrriFZ0wzHRKNP0GnI72q3w2JGNAp 8vZkYQCkqC2D21MNgsjOeY4ALqK5vL4DLOAME0fMqOs4a118wf5Eic+LbOgPYPi+6uW0WG6w4Yu An7kKli4qpWUynouh5OOL93QbUvv/xAz6lqy1j3fe4CXf6SxVAvNE7nLGQB8hZ3VU/CGB5rz14v kcxGSleV2n0FP8M4EWrPyzv9H36O5OpyL62z6xrea9q1EILGWOmU+nn3/PMUMgmeIzDwFhKpkSb 1G8hp1n51sh0OrcB53BS3e7n0q2+NSIGS1Wdas5H+D6ht6QABzWsUoBQ5FSM8xC9aI6udaFRfK1 jNFn2n6xM76E49G8qZ2/1f4VtJrQSKfrDLlvVUjkoO0efp5xQr4t+rVzn8+uom0XNWSEpyBChzx CxsIwiLCCpV5xfkR49VYLvhfEx15KxNa4p2/AlBydsAOd++xQZ2hCnG45c/QU+m8ys+spTljX3 X-Received: by 2002:a05:600c:3e05:b0:483:6fc6:1e20 with SMTP id 5b1f17b1804b1-483a95b5410mr298016075e9.9.1772061341984; Wed, 25 Feb 2026 15:15:41 -0800 (PST) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PULL 13/70] target/riscv: Extract monitor-related code to monitor.c Date: Thu, 26 Feb 2026 00:13:13 +0100 Message-ID: <20260225231411.96482-14-philmd@linaro.org> X-Mailer: git-send-email 2.52.0 In-Reply-To: <20260225231411.96482-1-philmd@linaro.org> References: <20260225231411.96482-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: 1772061408763158500 Keep riscv-qmp-cmds.c for QMP, use monitor.c for HMP. Reviewed-by: Daniel Henrique Barboza Reviewed-by: Pierrick Bouvier Signed-off-by: Philippe Mathieu-Daud=C3=A9 Message-ID: <20260219191955.83815-7-philmd@linaro.org> --- target/riscv/monitor.c | 148 +++++++++++++++++++++++++++++++++ target/riscv/riscv-qmp-cmds.c | 150 ---------------------------------- 2 files changed, 148 insertions(+), 150 deletions(-) diff --git a/target/riscv/monitor.c b/target/riscv/monitor.c index 478fd392ac6..ccb7eb44d02 100644 --- a/target/riscv/monitor.c +++ b/target/riscv/monitor.c @@ -19,6 +19,8 @@ */ =20 #include "qemu/osdep.h" +#include "qemu/ctype.h" +#include "qemu/qemu-print.h" #include "cpu.h" #include "cpu_bits.h" #include "monitor/monitor.h" @@ -241,3 +243,149 @@ void hmp_info_mem(Monitor *mon, const QDict *qdict) =20 mem_info_svxx(mon, env); } + +/* + * We have way too many potential CSRs and regs being added + * regularly to register them in a static array. + * + * Declare an empty array instead, making get_monitor_def() use + * the target_get_monitor_def() API directly. + */ +const MonitorDef monitor_defs[] =3D { { } }; +const MonitorDef *target_monitor_defs(void) +{ + return monitor_defs; +} + +static bool reg_is_ulong_integer(CPURISCVState *env, const char *name, + target_ulong *val, bool is_gprh) +{ + const char * const *reg_names; + target_ulong *vals; + + if (is_gprh) { + reg_names =3D riscv_int_regnamesh; + vals =3D env->gprh; + } else { + reg_names =3D riscv_int_regnames; + vals =3D env->gpr; + } + + for (int i =3D 0; i < 32; i++) { + g_auto(GStrv) reg_name =3D g_strsplit(reg_names[i], "/", 2); + + g_assert(reg_name[0]); + g_assert(reg_name[1]); + + if (g_ascii_strcasecmp(reg_name[0], name) =3D=3D 0 || + g_ascii_strcasecmp(reg_name[1], name) =3D=3D 0) { + *val =3D vals[i]; + return true; + } + } + + return false; +} + +static bool reg_is_u64_fpu(CPURISCVState *env, const char *name, uint64_t = *val) +{ + if (qemu_tolower(name[0]) !=3D 'f') { + return false; + } + + for (int i =3D 0; i < 32; i++) { + g_auto(GStrv) reg_name =3D g_strsplit(riscv_fpr_regnames[i], "/", = 2); + + g_assert(reg_name[0]); + g_assert(reg_name[1]); + + if (g_ascii_strcasecmp(reg_name[0], name) =3D=3D 0 || + g_ascii_strcasecmp(reg_name[1], name) =3D=3D 0) { + *val =3D env->fpr[i]; + return true; + } + } + + return false; +} + +static bool reg_is_vreg(const char *name) +{ + if (qemu_tolower(name[0]) !=3D 'v' || strlen(name) > 3) { + return false; + } + + for (int i =3D 0; i < 32; i++) { + if (strcasecmp(name, riscv_rvv_regnames[i]) =3D=3D 0) { + return true; + } + } + + return false; +} + +int target_get_monitor_def(CPUState *cs, const char *name, uint64_t *pval) +{ + CPURISCVState *env =3D &RISCV_CPU(cs)->env; + target_ulong val =3D 0; + uint64_t val64 =3D 0; + int i; + + if (reg_is_ulong_integer(env, name, &val, false) || + reg_is_ulong_integer(env, name, &val, true)) { + *pval =3D val; + return 0; + } + + if (reg_is_u64_fpu(env, name, &val64)) { + *pval =3D val64; + return 0; + } + + if (reg_is_vreg(name)) { + if (!riscv_cpu_cfg(env)->ext_zve32x) { + return -EINVAL; + } + + qemu_printf("Unable to print the value of vector " + "vreg '%s' from this API\n", name); + + /* + * We're returning 0 because returning -EINVAL triggers + * an 'unknown register' message in exp_unary() later, + * which feels ankward after our own error message. + */ + *pval =3D 0; + return 0; + } + + for (i =3D 0; i < ARRAY_SIZE(csr_ops); i++) { + RISCVException res; + int csrno =3D i; + + /* + * Early skip when possible since we're going + * through a lot of NULL entries. + */ + if (csr_ops[csrno].predicate =3D=3D NULL) { + continue; + } + + if (strcasecmp(csr_ops[csrno].name, name) !=3D 0) { + continue; + } + + res =3D riscv_csrrw_debug(env, csrno, &val, 0, 0); + + /* + * Rely on the smode, hmode, etc, predicates within csr.c + * to do the filtering of the registers that are present. + */ + if (res =3D=3D RISCV_EXCP_NONE) { + *pval =3D val; + return 0; + } + } + + return -EINVAL; +} diff --git a/target/riscv/riscv-qmp-cmds.c b/target/riscv/riscv-qmp-cmds.c index d5e9bec0f86..8a1856c50e0 100644 --- a/target/riscv/riscv-qmp-cmds.c +++ b/target/riscv/riscv-qmp-cmds.c @@ -31,10 +31,6 @@ #include "qapi/qobject-input-visitor.h" #include "qapi/visitor.h" #include "qom/qom-qobject.h" -#include "qemu/ctype.h" -#include "qemu/qemu-print.h" -#include "monitor/hmp.h" -#include "monitor/hmp-target.h" #include "system/kvm.h" #include "system/tcg.h" #include "cpu-qom.h" @@ -244,149 +240,3 @@ CpuModelExpansionInfo *qmp_query_cpu_model_expansion(= CpuModelExpansionType type, =20 return expansion_info; } - -/* - * We have way too many potential CSRs and regs being added - * regularly to register them in a static array. - * - * Declare an empty array instead, making get_monitor_def() use - * the target_get_monitor_def() API directly. - */ -const MonitorDef monitor_defs[] =3D { { } }; -const MonitorDef *target_monitor_defs(void) -{ - return monitor_defs; -} - -static bool reg_is_ulong_integer(CPURISCVState *env, const char *name, - target_ulong *val, bool is_gprh) -{ - const char * const *reg_names; - target_ulong *vals; - - if (is_gprh) { - reg_names =3D riscv_int_regnamesh; - vals =3D env->gprh; - } else { - reg_names =3D riscv_int_regnames; - vals =3D env->gpr; - } - - for (int i =3D 0; i < 32; i++) { - g_auto(GStrv) reg_name =3D g_strsplit(reg_names[i], "/", 2); - - g_assert(reg_name[0]); - g_assert(reg_name[1]); - - if (g_ascii_strcasecmp(reg_name[0], name) =3D=3D 0 || - g_ascii_strcasecmp(reg_name[1], name) =3D=3D 0) { - *val =3D vals[i]; - return true; - } - } - - return false; -} - -static bool reg_is_u64_fpu(CPURISCVState *env, const char *name, uint64_t = *val) -{ - if (qemu_tolower(name[0]) !=3D 'f') { - return false; - } - - for (int i =3D 0; i < 32; i++) { - g_auto(GStrv) reg_name =3D g_strsplit(riscv_fpr_regnames[i], "/", = 2); - - g_assert(reg_name[0]); - g_assert(reg_name[1]); - - if (g_ascii_strcasecmp(reg_name[0], name) =3D=3D 0 || - g_ascii_strcasecmp(reg_name[1], name) =3D=3D 0) { - *val =3D env->fpr[i]; - return true; - } - } - - return false; -} - -static bool reg_is_vreg(const char *name) -{ - if (qemu_tolower(name[0]) !=3D 'v' || strlen(name) > 3) { - return false; - } - - for (int i =3D 0; i < 32; i++) { - if (strcasecmp(name, riscv_rvv_regnames[i]) =3D=3D 0) { - return true; - } - } - - return false; -} - -int target_get_monitor_def(CPUState *cs, const char *name, uint64_t *pval) -{ - CPURISCVState *env =3D &RISCV_CPU(cs)->env; - target_ulong val =3D 0; - uint64_t val64 =3D 0; - int i; - - if (reg_is_ulong_integer(env, name, &val, false) || - reg_is_ulong_integer(env, name, &val, true)) { - *pval =3D val; - return 0; - } - - if (reg_is_u64_fpu(env, name, &val64)) { - *pval =3D val64; - return 0; - } - - if (reg_is_vreg(name)) { - if (!riscv_cpu_cfg(env)->ext_zve32x) { - return -EINVAL; - } - - qemu_printf("Unable to print the value of vector " - "vreg '%s' from this API\n", name); - - /* - * We're returning 0 because returning -EINVAL triggers - * an 'unknown register' message in exp_unary() later, - * which feels ankward after our own error message. - */ - *pval =3D 0; - return 0; - } - - for (i =3D 0; i < ARRAY_SIZE(csr_ops); i++) { - RISCVException res; - int csrno =3D i; - - /* - * Early skip when possible since we're going - * through a lot of NULL entries. - */ - if (csr_ops[csrno].predicate =3D=3D NULL) { - continue; - } - - if (strcasecmp(csr_ops[csrno].name, name) !=3D 0) { - continue; - } - - res =3D riscv_csrrw_debug(env, csrno, &val, 0, 0); - - /* - * Rely on the smode, hmode, etc, predicates within csr.c - * to do the filtering of the registers that are present. - */ - if (res =3D=3D RISCV_EXCP_NONE) { - *pval =3D val; - return 0; - } - } - - return -EINVAL; -} --=20 2.52.0 From nobody Thu Apr 16 20:57:20 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=1772061409; cv=none; d=zohomail.com; s=zohoarc; b=Fd0Jq5iliq46fUE9mEN6q34unL7NLCZ6UnL/WMxUSK8EjCTUfGm2xR7XdpqV0lld5Q2HUd6UUFisb9OyABzkH88mnovQ630wC9xxFIVdsEGlHEVX2vXGNAgDizf4Hb9iJnnHL5wCyjkBJmOVQKbeM9E23DfZkH2Sq1o/Noa+GKg= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1772061409; h=Content-Type:Content-Transfer-Encoding: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:Cc; bh=POgXyEQXCHWOdszOoXS0Dye8v44XC8apxb0vXmXayLs=; b=NbUdrKRYngMy6euoG8P/GPIG4CplgEOQfDHxmE/5k47YgxJkuRypiUMBICz8L/m4QTtLy0i5gXkKsMrBlE7fDM4z95x+nRH4L8WOxm1CSvIqMQzbzOjA0eBZuRsI2GWVKvqxV05N5g5DMuyr8QiedZK0QsKsohjlzFLBuWLAArI= 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 1772061409500419.2132024988872; Wed, 25 Feb 2026 15:16:49 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1vvO7M-0007fs-AH; Wed, 25 Feb 2026 18:16:38 -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 1vvO6h-0006zE-UW for qemu-devel@nongnu.org; Wed, 25 Feb 2026 18:15:52 -0500 Received: from mail-wm1-x341.google.com ([2a00:1450:4864:20::341]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1vvO6g-0002oN-FE for qemu-devel@nongnu.org; Wed, 25 Feb 2026 18:15:51 -0500 Received: by mail-wm1-x341.google.com with SMTP id 5b1f17b1804b1-4836f363d0dso2324255e9.3 for ; Wed, 25 Feb 2026 15:15:50 -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-43970bfa015sm37057042f8f.8.2026.02.25.15.15.47 for (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Wed, 25 Feb 2026 15:15:48 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1772061349; x=1772666149; 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=POgXyEQXCHWOdszOoXS0Dye8v44XC8apxb0vXmXayLs=; b=geWKs6uQdsVtwl+QzFH6Pa0Hn99j/MT2oBiaqnkrizm6mu/Yr3fqH+KsHNh2WLefn6 Y+vf4JfY3Q6lCMoAc1cuGjPp+EgKjivFg+8O/vxAp4d3XVo7CbPMtWcQRdvLDWG9tfqt LFsHpavlZS8ulJw7wFYyRHzOoL/Ib1fERORKgxfxqtwiRu1OLxo/cUuvVZNpgqYflUUp Zu/oelnOl9p3VxoMrVcFVmRvqpUYmvEqV727qmJHcHOGSdeCuOzuEFTFQ9QaVPHG4t0J zTYM9lFQk3VHsosnUuKU3yGGy/tNfxVd1CC09d9jJ63FEFB0CaEI4IbCZ0wub7p5DQEA S8ZA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1772061349; x=1772666149; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-gg:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to; bh=POgXyEQXCHWOdszOoXS0Dye8v44XC8apxb0vXmXayLs=; b=T6/euuhh+wAaIpcJGZeA+asGkFqRF4ZC2+PixWVnkZ3WtquwRMJLRj4SzZaT/m3jIz zqV+Xgvg6IayQC2ZtDo/AWTRQl43W0f8ZGOdZ1oe4EU28cR/DXt1UyQ2NI9iegT+GreF 4pmID0mP2EP2a8/58EKyXHKboSdWnv9rtNPEnW9KUnXA7jdwl6Mc3V7Y5VA3UdwyGeYV dYGvBen3nPrnGttWIbD2a4bzgKDJIaYaE+PhU9bA0cgnn3T+O7G51PafcM8sdPKXKFm5 m9SuNQoY/mfJFdz1S5dII65iHj2hWfmMDtV3xL3OWlnmgX2DwXvM04cPZ/GGpRT16ZR/ 5PQA== X-Gm-Message-State: AOJu0YzDnzncE8+kYROj0KtIMT/ebS4kmqc7F4806rea5G56o8k5dVuU grD5mQTvaHRMPh6bcvYG0ktTCxhzYoJ6d1Kyv5WWr69AnZgTxuoFcHCMAkGZkjEvV2pbph+jqVo 4qHYjqBkAoA== X-Gm-Gg: ATEYQzzbF9cFTQZo6naWhAN0Nmv0b+urWa56NaRxx+pkj7nZc/U6e5yx1LVba+SVqHJ HWO02NgE9IfjQvXO7tXdPogwsbDIYeb/Asu6Rdbx2W7u7GRCggDXHYgdadp6aEiMpSbGXEwi8RB OaTebZG3K0eKfiX4cTL5qbVvTd3qnmJT8upxavtYTKIokcLCt8yFXsqwt3IY/l14snRefg5hrCq jlhsoJFbivbwdqjPIodZf2CQa/xjrGP01tab1ADy4tYIrM6Aw7F7RFwaf026h7owYT9Zh5NBAio PGYFIOZdlBdEBuIUHxwCn6KrXmhDzt48ynQErANlSwlWAhT2VHqSZloj2CyUK0Hhvj7RTp5R2b3 BrXWSFYqyhnRzri7oMqxCQEbSiptG2gXnZ7YJY1lBsetl8q2K1ysid1kBuLPzYdnS1YE1cpsE8C hBUbq3nsE5KdfhanuhQ2f2Z0BwXMClfjAC3maDGobugZ2Z4ja9flYuyUfzZctaCelhRG40lEV9 X-Received: by 2002:a05:6000:2284:b0:436:34e8:e661 with SMTP id ffacd0b85a97d-439942ed0a8mr3919017f8f.31.1772061348611; Wed, 25 Feb 2026 15:15:48 -0800 (PST) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PULL 14/70] target/ppc: Fix CPUClass::gdb_num_core_regs value Date: Thu, 26 Feb 2026 00:13:14 +0100 Message-ID: <20260225231411.96482-15-philmd@linaro.org> X-Mailer: git-send-email 2.52.0 In-Reply-To: <20260225231411.96482-1-philmd@linaro.org> References: <20260225231411.96482-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::341; envelope-from=philmd@linaro.org; helo=mail-wm1-x341.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: 1772061410594158500 Only 70 registers are exposed from GDB XML file (for either 32 / 64-bit variants). Reviewed-by: Pierrick Bouvier Signed-off-by: Philippe Mathieu-Daud=C3=A9 Message-ID: <20260219191955.83815-8-philmd@linaro.org> --- target/ppc/cpu_init.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target/ppc/cpu_init.c b/target/ppc/cpu_init.c index c809c1f4d89..27de8d80204 100644 --- a/target/ppc/cpu_init.c +++ b/target/ppc/cpu_init.c @@ -7553,7 +7553,7 @@ static void ppc_cpu_class_init(ObjectClass *oc, const= void *data) PAGE_WRITE =3D=3D 2 && PAGE_EXEC =3D=3D 4); #endif =20 - cc->gdb_num_core_regs =3D 71; + cc->gdb_num_core_regs =3D 70; #ifdef USE_APPLE_GDB cc->gdb_read_register =3D ppc_cpu_gdb_read_register_apple; cc->gdb_write_register =3D ppc_cpu_gdb_write_register_apple; --=20 2.52.0 From nobody Thu Apr 16 20:57:20 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=1772061435; cv=none; d=zohomail.com; s=zohoarc; b=QjrRWv9nTkEeWWtaXB7LOS/7w/qRtTeugH1nE/mInK2wJkO6rWRrCRnFPtQIxuib/0kt8S20tNXVmL3BOF7S1nBfGpm8oaEU2a9HWBkrqUg0ZMRLK1hodJFKsq6jJ2OcNnvShTpX6fm2CH9+o3LPu6kcsZbLkMt1oxikO1+eOtc= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1772061435; h=Content-Type:Content-Transfer-Encoding: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:Cc; bh=nuDGlu1ravc7wqM1ewnTKp2BLMejuoYcRQ9ew040oao=; b=kgoFitmBWQjU+fUG3ROtWopbvfokC3SKIhpJG6jV0SuI5vrVxvJktKEqSPP8Vbap9cz9daLxDTR3JyxZyjADBWQ4dCWK+73TIRTM19sz3+LtaBbOOEtvvW2WjeZFpn+3XWbTjrpVSebqeapCjU5XvcVWYM4uM7LLK7wI1HRo/1E= 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 177206143521987.91305634476521; Wed, 25 Feb 2026 15:17:15 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1vvO7j-0008Qp-KJ; Wed, 25 Feb 2026 18:16:56 -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 1vvO6q-0007BJ-7f for qemu-devel@nongnu.org; Wed, 25 Feb 2026 18:16:03 -0500 Received: from mail-wm1-x332.google.com ([2a00:1450:4864:20::332]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1vvO6n-0002pF-8O for qemu-devel@nongnu.org; Wed, 25 Feb 2026 18:15:59 -0500 Received: by mail-wm1-x332.google.com with SMTP id 5b1f17b1804b1-4807068eacbso2211355e9.2 for ; Wed, 25 Feb 2026 15:15:56 -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-483bfb29715sm56645705e9.0.2026.02.25.15.15.54 for (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Wed, 25 Feb 2026 15:15:54 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1772061355; x=1772666155; 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=nuDGlu1ravc7wqM1ewnTKp2BLMejuoYcRQ9ew040oao=; b=XhBJWFwohLBJuuKLsR2DWL3pqTzNVrsWpUfQ96hjphGV37/4kZS5iMfdcs/C3zfA4B ILz0JJmBVKl2pC3j+yu6XqWkVZlE2eVvXJHKtBMHKruPF4GxeuC0lGZX1dv1T6MUyp9Q 5Scv1Jw5eVYNhSOoOUUSCgT/PlQtOHMOkQ6Dd95wckfSZxUlTKWWLhicrhQb7302KlTG C9ZUcRkPsS/SF7YNBKcFlLDLKWsnWKKhcgI8sY9OTE4pmdigQy+kjGvbcrqHRUs7HPvb XSrLraKE3xOcknfrwBKSlk6/CfM7bL4r2v54pISC0jKJRaAOjkQ1El/TwtygxEwucjw5 Z1dw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1772061355; x=1772666155; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-gg:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to; bh=nuDGlu1ravc7wqM1ewnTKp2BLMejuoYcRQ9ew040oao=; b=Uw17pVtCVgCP0+VWZMJX+FaawQMm4uUvnCHdPorhHmjA1H7yFdltdVZc1MdvLkumy4 D0xndgp9LSDXXSJjSVl+WyUDgKOaYVtYuJ41meVNb/juH326E5Zq+MptgoMxQS14Rxxw gn2fjwe1X/QFs5DklOkPWXd2OYktDM5Q4mZNZFmhOvsPe4Zv3KvCq7E5ebkxu+qYEgEi YWSYjmRip5Ro9thLvsb0MBi85FirvCsUV63MlW3DIaZLc1Uv0DYTH5w+3x5WbtNnty51 hMtwZb23sX3Z3W2Awcr2a7KplOEp65AtYnT2BT3EQuxzODIDdZs+2iuLcswGxsCJ2Nc0 gHIA== X-Gm-Message-State: AOJu0Yyg0gIBsD3B26zFKbEuA4nuBgiQpA9V5LvpaR5TW32lrioAXWlV 9lwEo7mJG8MJdc6Ud4keK7sGAtRjBk+KttCohUAAOhux+carpV9ILUlEZxSh6CSWSCSMOKMMfGF kQObyStM= X-Gm-Gg: ATEYQzxdpu2kI7rxTJah1HQFEyo3ey6rzwtCRDt8frAKfmI8YdauwHs1ShIGuj2jv4W ww06NJf8IIEYLxBqnmq6ST2EQb7Ru4BHLb4BVsTx5ruSTnfPKXqM2GoMClt0sjdmiI1tOE7ff3N 9a4nhuw/Yk4eVN5GHJmEdWAalBC0RyYSs9k3fEYv28Nk+6O8q+7xL2WVLj7KMGN23D7/D1dG7jU 7jiLAJHTqKfc7M220lF+z0d5LSrhsAaD4D7tFTjl+VqvlJMusQQ44OunNOxmoYFTMWVQirSsPSy /lI9eG7S1wcv8ZFetmO32AIFC0xGo691q7ctp5eCmKP40BtypOZ3lJOo/LLE0OYJ8yyVrrUb5nb 8E/4zWURVYohHl+5smgYMcbBo3TB/Ws6i4WNS4lDth/fLhjMQ7X9k1/UDKGqBcypqG08em+MWO9 +G9Tle8FdX6lH6CCtGdAHlJTwHuB5kdybo1l2jhvdu1VXAiO6cqDE0SMkEeYA2rM3koOjBjuJzC JCDkCPTlsQ= X-Received: by 2002:a05:600d:644e:20b0:483:bf23:1915 with SMTP id 5b1f17b1804b1-483c3db51a4mr1052005e9.2.1772061355131; Wed, 25 Feb 2026 15:15:55 -0800 (PST) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PULL 15/70] target/ppc: Remove dead code depending on USE_APPLE_GDB Date: Thu, 26 Feb 2026 00:13:15 +0100 Message-ID: <20260225231411.96482-16-philmd@linaro.org> X-Mailer: git-send-email 2.52.0 In-Reply-To: <20260225231411.96482-1-philmd@linaro.org> References: <20260225231411.96482-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::332; envelope-from=philmd@linaro.org; helo=mail-wm1-x332.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: 1772061436790158500 We never defined USE_APPLE_GDB, so the code introduced in commit b3cad3abf6d ("PPC: Add support for Apple gdb in gdbstub") is dead since almost 12 years. Remove it. Reviewed-by: Pierrick Bouvier Signed-off-by: Philippe Mathieu-Daud=C3=A9 Message-ID: <20260219191955.83815-9-philmd@linaro.org> --- target/ppc/cpu.h | 2 - target/ppc/cpu_init.c | 7 --- target/ppc/gdbstub.c | 124 ------------------------------------------ 3 files changed, 133 deletions(-) diff --git a/target/ppc/cpu.h b/target/ppc/cpu.h index 49445eb4ca8..d637a50798f 100644 --- a/target/ppc/cpu.h +++ b/target/ppc/cpu.h @@ -1637,9 +1637,7 @@ static inline bool vhyp_cpu_in_nested(PowerPCCPU *cpu) =20 void ppc_cpu_dump_state(CPUState *cpu, FILE *f, int flags); int ppc_cpu_gdb_read_register(CPUState *cpu, GByteArray *buf, int reg); -int ppc_cpu_gdb_read_register_apple(CPUState *cpu, GByteArray *buf, int re= g); int ppc_cpu_gdb_write_register(CPUState *cpu, uint8_t *buf, int reg); -int ppc_cpu_gdb_write_register_apple(CPUState *cpu, uint8_t *buf, int reg); #ifndef CONFIG_USER_ONLY hwaddr ppc_cpu_get_phys_page_debug(CPUState *cpu, vaddr addr); #endif diff --git a/target/ppc/cpu_init.c b/target/ppc/cpu_init.c index 27de8d80204..0b5610d02d5 100644 --- a/target/ppc/cpu_init.c +++ b/target/ppc/cpu_init.c @@ -52,7 +52,6 @@ #endif =20 #include "cpu_init.h" -/* #define USE_APPLE_GDB */ =20 static const Property powerpc_cpu_properties[] =3D { DEFINE_PROP_BOOL("rtas-stopped-state", PowerPCCPU, @@ -7554,12 +7553,6 @@ static void ppc_cpu_class_init(ObjectClass *oc, cons= t void *data) #endif =20 cc->gdb_num_core_regs =3D 70; -#ifdef USE_APPLE_GDB - cc->gdb_read_register =3D ppc_cpu_gdb_read_register_apple; - cc->gdb_write_register =3D ppc_cpu_gdb_write_register_apple; - cc->gdb_num_core_regs =3D 71 + 32; -#endif - cc->gdb_arch_name =3D ppc_gdb_arch_name; #if defined(TARGET_PPC64) cc->gdb_core_xml_file =3D "power64-core.xml"; diff --git a/target/ppc/gdbstub.c b/target/ppc/gdbstub.c index b19c0f1ea9c..ece1e5c9bd7 100644 --- a/target/ppc/gdbstub.c +++ b/target/ppc/gdbstub.c @@ -23,31 +23,6 @@ #include "gdbstub/helpers.h" #include "internal.h" =20 -static int ppc_gdb_register_len_apple(int n) -{ - switch (n) { - case 0 ... 31: - /* gprs */ - return 8; - case 32 ... 63: - /* fprs */ - return 8; - case 64 ... 95: - return 16; - case 64 + 32: /* nip */ - case 65 + 32: /* msr */ - case 67 + 32: /* lr */ - case 68 + 32: /* ctr */ - case 70 + 32: /* fpscr */ - return 8; - case 66 + 32: /* cr */ - case 69 + 32: /* xer */ - return 4; - default: - return 0; - } -} - static int ppc_gdb_register_len(int n) { switch (n) { @@ -149,59 +124,6 @@ int ppc_cpu_gdb_read_register(CPUState *cs, GByteArray= *buf, int n) return r; } =20 -int ppc_cpu_gdb_read_register_apple(CPUState *cs, GByteArray *buf, int n) -{ - CPUPPCState *env =3D cpu_env(cs); - uint8_t *mem_buf; - int r =3D ppc_gdb_register_len_apple(n); - - if (!r) { - return r; - } - - if (n < 32) { - /* gprs */ - gdb_get_reg64(buf, env->gpr[n]); - } else if (n < 64) { - /* fprs */ - gdb_get_reg64(buf, *cpu_fpr_ptr(env, n - 32)); - } else if (n < 96) { - /* Altivec */ - gdb_get_reg64(buf, n - 64); - gdb_get_reg64(buf, 0); - } else { - switch (n) { - case 64 + 32: - gdb_get_reg64(buf, env->nip); - break; - case 65 + 32: - gdb_get_reg64(buf, env->msr); - break; - case 66 + 32: - { - uint32_t cr =3D ppc_get_cr(env); - gdb_get_reg32(buf, cr); - break; - } - case 67 + 32: - gdb_get_reg64(buf, env->lr); - break; - case 68 + 32: - gdb_get_reg64(buf, env->ctr); - break; - case 69 + 32: - gdb_get_reg32(buf, cpu_read_xer(env)); - break; - case 70 + 32: - gdb_get_reg64(buf, env->fpscr); - break; - } - } - mem_buf =3D buf->data + buf->len - r; - ppc_maybe_bswap_register(env, mem_buf, r); - return r; -} - int ppc_cpu_gdb_write_register(CPUState *cs, uint8_t *mem_buf, int n) { CPUPPCState *env =3D cpu_env(cs); @@ -248,52 +170,6 @@ int ppc_cpu_gdb_write_register(CPUState *cs, uint8_t *= mem_buf, int n) } return r; } -int ppc_cpu_gdb_write_register_apple(CPUState *cs, uint8_t *mem_buf, int n) -{ - CPUPPCState *env =3D cpu_env(cs); - int r =3D ppc_gdb_register_len_apple(n); - - if (!r) { - return r; - } - ppc_maybe_bswap_register(env, mem_buf, r); - if (n < 32) { - /* gprs */ - env->gpr[n] =3D ldq_p(mem_buf); - } else if (n < 64) { - /* fprs */ - *cpu_fpr_ptr(env, n - 32) =3D ldq_p(mem_buf); - } else { - switch (n) { - case 64 + 32: - env->nip =3D ldq_p(mem_buf); - break; - case 65 + 32: - ppc_store_msr(env, ldq_p(mem_buf)); - break; - case 66 + 32: - { - uint32_t cr =3D ldl_p(mem_buf); - ppc_set_cr(env, cr); - break; - } - case 67 + 32: - env->lr =3D ldq_p(mem_buf); - break; - case 68 + 32: - env->ctr =3D ldq_p(mem_buf); - break; - case 69 + 32: - cpu_write_xer(env, ldl_p(mem_buf)); - break; - case 70 + 32: - /* fpscr */ - ppc_store_fpscr(env, ldq_p(mem_buf)); - break; - } - } - return r; -} =20 #ifndef CONFIG_USER_ONLY static void gdb_gen_spr_feature(CPUState *cs) --=20 2.52.0 From nobody Thu Apr 16 20:57:20 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=1772061437; cv=none; d=zohomail.com; s=zohoarc; b=h4wv0LynnYWYWiGyh53+r0XLZc1ze7XTML37yyaNcmY2J/pwe22Tx8UZg1QchbPR9yXSSbKGZ89KPsYJ1Fm417xyx1mR9+bMbSS+c/5cjddwFr63W921PoMJDq/XIyjGUVbSg9Iqm7PIn/nBOeCKxQLxoRnfHWjMCPB43qlX4+k= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1772061437; h=Content-Type:Content-Transfer-Encoding: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:Cc; bh=0wTslWdGU4/52F0F1RtcG+lh5cc+cLUvd+EC0K3UAbY=; b=Fz1LPcspxoGrf8Q3P+R2FcRQLYXt4IOPDQB67tBPs813HDa5vNURqTIcecw5RkHBv83YS/Y1i33GvNZjCJfSVGX1Rv3P3SrW64kqJaDtmITgmgSABx3r3XU+D/CCi6B/kdeT/R5IdquSHA6FQyeO/idCypQnnr5Rf8iBRu/XTVA= 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 1772061437486270.0248231978484; Wed, 25 Feb 2026 15:17:17 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1vvO7i-0008Fx-Bu; Wed, 25 Feb 2026 18:16:54 -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 1vvO6u-0007Fe-T6 for qemu-devel@nongnu.org; Wed, 25 Feb 2026 18:16:05 -0500 Received: from mail-wm1-x32b.google.com ([2a00:1450:4864:20::32b]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1vvO6t-0002pe-Ex for qemu-devel@nongnu.org; Wed, 25 Feb 2026 18:16:04 -0500 Received: by mail-wm1-x32b.google.com with SMTP id 5b1f17b1804b1-4836f363d0dso2325285e9.3 for ; Wed, 25 Feb 2026 15:16:03 -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-43992ced321sm4927538f8f.35.2026.02.25.15.16.00 for (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Wed, 25 Feb 2026 15:16:01 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1772061362; x=1772666162; 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=0wTslWdGU4/52F0F1RtcG+lh5cc+cLUvd+EC0K3UAbY=; b=ApZAX6dpGTw6Ky2HqkXI6Z46aZKaCBCcA/G7EIIbcPW1yTtZa5W5hq4rlCBTEtx2IK ZJ5hEIVurLKoyaE4rgdlO28tpiHBVahYyYS1uS7QM2xpFTuMLjquH1NALHBvxo0XV30j rYCLNCUiYL3hrISi/mutslUfo4R6+OszlSB4CkFx98RF68K6lMakr7hw8sARyAt44K1x oVosNny+KWFGAmSsPs/N3PO+lFtYh5fE/MQOtEWUHy7K4xW5gwQlaHTqdY1ZhayzFHtV 6vbdwGvWghiLX34OQB6dUCeVuLobOYxg/5pxP0tnKI8IXMfVPvfZ41j9ZrqiWnEQtKN5 krOg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1772061362; x=1772666162; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-gg:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to; bh=0wTslWdGU4/52F0F1RtcG+lh5cc+cLUvd+EC0K3UAbY=; b=Q5tRbmTwWYjr+PpWozSmMy4qnNbmpKcCn0oS0oFXo4RW4rXqnCvU8mP3GKKAdLKFP2 h5DH/K0wY5unvLO0sxg9qtv/gtSEPlnWB5DLpihOJ7ydJB4H8tYMplNuO4+goPoHF78N lawS1iP3zcPP0n9Qg9NSGmt3tEcC/0JxbTXF0IBQmtPPFdJ055S57CCpNRSr4FaxSacU 96tspAsPYRZ4WmrepxA6koiq3uoSFRUD1OaG5jfty/NFbUgdb3s0yS6mHY9cn+B+yv4v VivlX3SIHf6hMKcVkkEQZ3VA3y2s+U0X1pDOq+7YgxUqZkOyDRM0Jncsb3otD1Ur6BzH 9xwQ== X-Gm-Message-State: AOJu0YzuVZPx1WyHRsGpUj3dtcEdzWqbZO3kkhkFbZX6fqjnG6PakZE7 pBMfv3fJFKGpW+Pxk1RIwhzj2qeD89NaXj/yIbK2wkgc4wlz90TDJ+HtqZ9PUd37AoAy3SCp4cc tg8yOcA0= X-Gm-Gg: ATEYQzzK5Kyd2jtg7KwmiMx7gt/V+2m6HjJ4XXaZWW8k3BwYQDponLkW+QI41Tn0Kd+ zTeayZQzi4rsKX5C1UG32zpIwDutxC6uDl8KShGI5nG+Eq2S2XpwyeFvvo6f41jwiRAJscRijPT Ws+Nme5tP+cKZG3csJDnI3sW678Um5ra/Mf20w4JrvmKMG6xq/5NSGvaxxcBmbMj3+ZsbINlAdp W6Yd7E3hpIXnT8Nn6gqD+ga8qCQpnG8ldf5I7uI8wsIwUNVzolxGLgOkCChLAwwxwKIbF/Tt1BL anv14BobuovDkKIwJDfaTRRaQs7qzNH3R0g8ZyBVZM+WLeRwZHcbY6b6Nrzt/NVzekk64hYsJrm tuhdcG6WCNs5wo2LiGo29cmnlS+atpQuuD0HBN1/LjmXWzhoWDEvoiJKbNQTpEfHaZYfintSsMD woybz43Fm4FHq5t8QYPKdeK5Net0IntL+UunNZRUBNgXwFjPHOJJTuCIZeT87vo88oOHQsnYM5Y 4536StlD3c= X-Received: by 2002:a05:600c:6815:b0:483:7783:537b with SMTP id 5b1f17b1804b1-483c21a54d7mr40631515e9.24.1772061361560; Wed, 25 Feb 2026 15:16:01 -0800 (PST) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PULL 16/70] gdbstub: Make generated compound literal array size explicit Date: Thu, 26 Feb 2026 00:13:16 +0100 Message-ID: <20260225231411.96482-17-philmd@linaro.org> X-Mailer: git-send-email 2.52.0 In-Reply-To: <20260225231411.96482-1-philmd@linaro.org> References: <20260225231411.96482-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::32b; envelope-from=philmd@linaro.org; helo=mail-wm1-x32b.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: 1772061438738158500 GDBFeature::num_regs holds the number of registers, but when using the compound literal construction, if the last array entry is not set, the array will be shorter. Prevent array overrun by making the array length explicit, Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Richard Henderson Reviewed-by: Akihiko Odaki Message-Id: <20260216214332.47639-1-philmd@linaro.org> --- scripts/feature_to_c.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/scripts/feature_to_c.py b/scripts/feature_to_c.py index 807af0e685c..3aa62fb895f 100644 --- a/scripts/feature_to_c.py +++ b/scripts/feature_to_c.py @@ -90,13 +90,16 @@ def writeliteral(indent, bytes): writeliteral(8, read) sys.stdout.write(',\n') writeliteral(8, bytes(feature_name, 'utf-8')) - sys.stdout.write(',\n (const char * const []) {\n') + sys.stdout.write(',\n') + sys.stdout.write(f' (const char * const [{num_regs}]) {{\n') =20 for index, regname in enumerate(regnames): sys.stdout.write(f' [{regnums[index] - base_reg}] =3D\n= ') writeliteral(16, bytes(regname, 'utf-8')) sys.stdout.write(',\n') =20 - sys.stdout.write(f' }},\n {num_regs},\n }},\n') + sys.stdout.write( ' },\n') + sys.stdout.write(f' {num_regs},\n') + sys.stdout.write( ' },\n') =20 sys.stdout.write(' { NULL }\n};\n') --=20 2.52.0 From nobody Thu Apr 16 20:57:20 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=1772061477; cv=none; d=zohomail.com; s=zohoarc; b=W24vC2lyDDEklCxliCWaid8bReUP3pYqLobyinLZWPNQMCLOiB+v3noI2AtG0ejpkMCDK2ehAPAogdD7ZXSDeoBaTook4KqFH+q3xLaxM5rXZ/AGFzQZuZaqB5frMau+vJCEWpO2h6YPHNGr//NHV+a539uxazMGJk0au6hu6Ys= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1772061477; h=Content-Type:Content-Transfer-Encoding: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:Cc; bh=OdmsbI9Au2TUjGLocKfplEKLAz2COL3GTGMnmx6k6OU=; b=JASuBeCYInIIs/m0dot4W2Mh4Yz+4MxFWdhN1dIJBu228aM965Fpyva3SK7Mf/7e9oaSUY8iQyNATUd8QxySRWPmzLSvJvRhIkAADVoRbkF44f9ydyj3YXqN2+ELmcERSZ2C1j6yUhHVVpdAbanIqQ/69l9zkeqBBWUYacl4Z3I= 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 1772061477313333.50138507536826; Wed, 25 Feb 2026 15:17:57 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1vvO85-00016U-C0; Wed, 25 Feb 2026 18:17:17 -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 1vvO72-0007Nd-FQ for qemu-devel@nongnu.org; Wed, 25 Feb 2026 18:16:13 -0500 Received: from mail-wr1-x42c.google.com ([2a00:1450:4864:20::42c]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1vvO70-0002pu-P2 for qemu-devel@nongnu.org; Wed, 25 Feb 2026 18:16:12 -0500 Received: by mail-wr1-x42c.google.com with SMTP id ffacd0b85a97d-436309f1ad7so165331f8f.3 for ; Wed, 25 Feb 2026 15:16:10 -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-43970bf9ff5sm38778227f8f.4.2026.02.25.15.16.07 for (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Wed, 25 Feb 2026 15:16:07 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1772061368; x=1772666168; 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=OdmsbI9Au2TUjGLocKfplEKLAz2COL3GTGMnmx6k6OU=; b=WEDzDTx1yyuuXQfDwVi2lNr5LjB/Oq2K5f11MCsaOpbsZY2hZ1vgBlqoYv1ohv+8qC nJlV4E2yZZPPYsbIZMxkG4hM+zkIIrD886NyWr5SUrBZP9AIbk6dysY/0NGejfkryy6V gD8lMJcutfLBLtQfeUHiur84bBJtDQTVVyFKWNV4U0EgOzmyW1+gM2+DEPImHnr9kzon rfuBcx0mG9jS1LuJQBV7vfjhgv2td1waOiOWZDNyxyUFx9k/4WtkY1dDXQM62Mt4UggK aBlGfE7CFVC3DBQX7plkCzh2Cl1haBvSoCb3pv5dVOZ4gahOMOKYvogIzTFHIGeIow3E laXA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1772061368; x=1772666168; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-gg:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to; bh=OdmsbI9Au2TUjGLocKfplEKLAz2COL3GTGMnmx6k6OU=; b=FtxJg7+1CJ+aGpFn4IaIwHAw8S+nrG8fr8uRTwfwAXaY9igFjxlMiBZp7vTjjWAKwf g68EPI3etUc0v+lXYPja37Yavx1xHSVJQh1rj8zK0si8ZOEj3ZrGP8QyLR0iIA4m0+/J JHrVv2qXLXt1bQTVsk9M7lvGtDxaY/AFnnAoYhKWGTXQ9ghqoRTWG1Kl+yINr4XMY8ka UBVUWPAArKeaEh65cjLEcZOkrmn/BiXVBCbCQeJpJDOLwVvEOsGbSadtoN5YKsX70xgs jyNEXrPYy4ct0UK/w9dMsjpOHPy/y0RzU0Cpw9lMAyFQK5E2TSyj1/8c/JSPyaVVFcuA PsuA== X-Gm-Message-State: AOJu0YyjdRPg1fy+9h8qCZ+wYVCEwvdabY8b9nDSxIYrRYxml7gOB9q+ m06DCjgF04ItzFdKCkMa5rnDOJmP3awES1NKCHyh3Mh5pWxK3znumUNrMTi4zB37dqNMWJx+HOk fiQB28Uo= X-Gm-Gg: ATEYQzzn6SFpMnVbXB7KLFj0rqA4xVqiEsF0n8lsumibgwCxTxmj6/KjOvtZQDRT+oC MXhkNGoj1+Q46bYWSEVXReLK4fYDuFEnoKvKu8RvFN2Un7LBVrV9cf/uLTACnvngsoyd7usS+Ql YrR2zEr/f3H7Gv8Z0zzGUIzEgshMHsiXobvRp+2SR+Cd+Rm0fc2u4YX8EPzCkhuP6PDlj5XrbWx 9HEm3FZSz4k/p+sAFoqq8qCDb8ZFNp+7DD1eWoIvB4ve8+Vez9C9EmCoiZ4IUWxeGaEbvsB5fOy mX/NQV8FLJOXV397EGicJOepJ+keXmJ8dOxzITg4oXMOWIwdH//81licE7o5MtdBpAOTur3QSr+ XMs3kizbt7lWCz44G65/zi2gDentlf3vmyq09F8UbR/g5aaoENawDaETUgqkYwyb7l3IrjFdEcA V1myBH8ZlVizePVgunUwU8twrXwMWOC04sKEG18n+znD/s3XhICl+UOZslBsZBro2phd9ZnGh9 X-Received: by 2002:a05:6000:25c1:b0:437:73a2:2d36 with SMTP id ffacd0b85a97d-439942fba11mr3876734f8f.43.1772061368146; Wed, 25 Feb 2026 15:16:08 -0800 (PST) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PULL 17/70] gdbstub: Always infer gdb_num_core_regs when using XML file Date: Thu, 26 Feb 2026 00:13:17 +0100 Message-ID: <20260225231411.96482-18-philmd@linaro.org> X-Mailer: git-send-email 2.52.0 In-Reply-To: <20260225231411.96482-1-philmd@linaro.org> References: <20260225231411.96482-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::42c; envelope-from=philmd@linaro.org; helo=mail-wr1-x42c.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: 1772061478853158500 Rather correct inferred count over invalid manual one. Reviewed-by: Pierrick Bouvier Signed-off-by: Philippe Mathieu-Daud=C3=A9 Message-ID: <20260219191955.83815-10-philmd@linaro.org> --- include/hw/core/cpu.h | 4 ++-- gdbstub/gdbstub.c | 1 + target/alpha/cpu.c | 1 - target/ppc/cpu_init.c | 2 -- target/sparc/cpu.c | 1 - 5 files changed, 3 insertions(+), 6 deletions(-) diff --git a/include/hw/core/cpu.h b/include/hw/core/cpu.h index 89934b8efe2..7d2f4459d2b 100644 --- a/include/hw/core/cpu.h +++ b/include/hw/core/cpu.h @@ -128,9 +128,9 @@ struct SysemuCPUOps; * @gdb_adjust_breakpoint: Callback for adjusting the address of a * breakpoint. Used by AVR to handle a gdb mis-feature with * its Harvard architecture split code and data. - * @gdb_num_core_regs: Number of core registers accessible to GDB or 0 to = infer - * from @gdb_core_xml_file. * @gdb_core_xml_file: File name for core registers GDB XML description. + * @gdb_num_core_regs: Number of core registers accessible to GDB if no + * @gdb_core_xml_file available (otherwise inferred). * @gdb_get_core_xml_file: Optional callback that returns the file name for * the core registers GDB XML description. The returned value is expected = to * be a simple constant string: the caller will not g_free() it. If this diff --git a/gdbstub/gdbstub.c b/gdbstub/gdbstub.c index b45eb7c7b2b..90f4b95135b 100644 --- a/gdbstub/gdbstub.c +++ b/gdbstub/gdbstub.c @@ -593,6 +593,7 @@ void gdb_init_cpu(CPUState *cpu) gdb_register_feature(cpu, 0, cc->gdb_read_register, cc->gdb_write_register, feature); + assert(!cc->gdb_num_core_regs); cpu->gdb_num_regs =3D cpu->gdb_num_g_regs =3D feature->num_regs; } =20 diff --git a/target/alpha/cpu.c b/target/alpha/cpu.c index 1780db7d1e2..e0e13d31e55 100644 --- a/target/alpha/cpu.c +++ b/target/alpha/cpu.c @@ -295,7 +295,6 @@ static void alpha_cpu_class_init(ObjectClass *oc, const= void *data) cc->disas_set_info =3D alpha_cpu_disas_set_info; =20 cc->tcg_ops =3D &alpha_tcg_ops; - cc->gdb_num_core_regs =3D 67; } =20 #define DEFINE_ALPHA_CPU_TYPE(base_type, cpu_model, initfn) \ diff --git a/target/ppc/cpu_init.c b/target/ppc/cpu_init.c index 0b5610d02d5..3d932a5642b 100644 --- a/target/ppc/cpu_init.c +++ b/target/ppc/cpu_init.c @@ -7551,8 +7551,6 @@ static void ppc_cpu_class_init(ObjectClass *oc, const= void *data) MMU_INST_FETCH =3D=3D 2 && PAGE_READ =3D=3D 1 && PAGE_WRITE =3D=3D 2 && PAGE_EXEC =3D=3D 4); #endif - - cc->gdb_num_core_regs =3D 70; cc->gdb_arch_name =3D ppc_gdb_arch_name; #if defined(TARGET_PPC64) cc->gdb_core_xml_file =3D "power64-core.xml"; diff --git a/target/sparc/cpu.c b/target/sparc/cpu.c index 3991681d1d1..c11d600dc30 100644 --- a/target/sparc/cpu.c +++ b/target/sparc/cpu.c @@ -1092,7 +1092,6 @@ static void sparc_cpu_class_init(ObjectClass *oc, con= st void *data) =20 #if defined(TARGET_SPARC64) && !defined(TARGET_ABI32) cc->gdb_core_xml_file =3D "sparc64-core.xml"; - cc->gdb_num_core_regs =3D 86; #else cc->gdb_num_core_regs =3D 72; #endif --=20 2.52.0 From nobody Thu Apr 16 20:57:20 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=1772061435; cv=none; d=zohomail.com; s=zohoarc; b=ZEEzS49GAhRKRL9ff6O3w7AXy0r1jFH/IXqYMABGtSmj7NsW05ZP6YmpeMsCBC+DdyDBA+DzgzNOcoWIfojH41c5dZKAX8lswmTPs8X0EB2PysxGRnvSymqe1jvUd5IUcKxu5ymqC1cbKmyJoSkN9VauVfCAB/t2mySHaV0YbKM= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1772061435; h=Content-Type:Content-Transfer-Encoding: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:Cc; bh=SfG85GUI03+8GDD7qHcmAPdD+Fc/EBns15jXqib8Sv4=; b=Q5XSwml3WSEN1R7x3AiBe1eyoFf3nDl9VAUQEbvz0vtE62AhdBKS7mNQeDn5vUMoPa3om/hT4y8FfagksjNVbsseye9SvShADwXOkBgDaZJUQ+G1vSE2gbSBLJjXNbIsJTkD8pK7LGbUHgDKDDNY5ZJ8rJ+DqIpQA1QhMEp1Rxg= 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 1772061435412188.59645482153758; Wed, 25 Feb 2026 15:17:15 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1vvO7s-0000BI-AI; Wed, 25 Feb 2026 18:17:06 -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 1vvO78-0007Vj-5P for qemu-devel@nongnu.org; Wed, 25 Feb 2026 18:16:22 -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 1vvO76-0002q9-JM for qemu-devel@nongnu.org; Wed, 25 Feb 2026 18:16:17 -0500 Received: by mail-wm1-x336.google.com with SMTP id 5b1f17b1804b1-483a233819aso2845225e9.3 for ; Wed, 25 Feb 2026 15:16:16 -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-483bd7030b9sm83060585e9.4.2026.02.25.15.16.13 for (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Wed, 25 Feb 2026 15:16:14 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1772061375; x=1772666175; 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=SfG85GUI03+8GDD7qHcmAPdD+Fc/EBns15jXqib8Sv4=; b=aRPls/QzE82FyOKX2bfik1NrQMxJCZRHvtWE+hPirqcmjj2wT9FcSbXBRf2biT8J2Q LOS3EFyaaXLSa6hFCj1qGBU7qc3cgFZd9PlTRdwrh/MBUc/HA+cNtKJ9Gb7AmHFfYGnA GO3873O5hKc/uxweFedoZ55wXzjZeWOlqB63TiTia3sG+kT+nzZjB8+pZUjZ2BrNoT6D sCrkHpCpmmaL/ueZpAttQ+sblvhyDLp3FiDrNrx6ewUuFG2ENqn8An0+vsowzxOg+6Fh lfBGxzX+mHDzlLzzHhAYb8+xgak97upQcWlm8BqgSx4bVmn+uTxvcy9x5Op6n3q/SUFE 0qJg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1772061375; x=1772666175; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-gg:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to; bh=SfG85GUI03+8GDD7qHcmAPdD+Fc/EBns15jXqib8Sv4=; b=a862cUa/P1zd90QGznw4v60cvl4HQDQbecsSMKGYMSjJMU3XRmUE20DNFaJpwbUOjZ Kh5g1fWJgH9VRCEAZzltkedlzeyQ2mSgEQzBFkcD9la0ouEVYsILrHw7TbqYsii5qNU3 MxDrgZuowyq1R01HFfAxQ66dzRirKwg67Jcss3jYkSlkyPlTs1UZJ9vkMtNEEX6g3w5H rdDhu1qg9DXw0aFsbIdafRb1XLjugd4NIfzwXeKiviysZzWrrqg3RNfYSU3VMUIPs20e OLknHpkQpw1wsPHBi/yrYa4RM8KXlKfSXLFScDq6Ez/dI/iOXrWniIBDhxY9QPiZPD83 4C1g== X-Gm-Message-State: AOJu0YyeP61XeK1H4ehfZDOCnyt24ayerwRIfnhVRZxrCkTo1ry68JRX c5MdW15s6UafQIMa7JBO3UNz7P2bSdFf7hnCUQ5zHpGkQwfJeV4ilVRvXBhG8MjxO5mBikUu2XB s4f95caE= X-Gm-Gg: ATEYQzzszoXsIAa82BhrnP4BF7qogKgBd/tkBCkACfoB4waGWcxtvN0Zaw44dZuixDK 97xlOZ/HFRzGg4MUneLbnwaSVijW0i4UWbLvj3BrCYl0EaEe9RlIQ62gMJmZ0LkWEHuNSiTG1ox MwDD6TDgqtCmTt9OiH/NE+GIfSae5NLw/JGE2VC9okGNQl/zQCak0kMqAromdCYmZfsixn0L07G G1DxGWacqiEzIilrdtQn+JHnYAG0St+4LrzyokOdbzXsczfHjI4eRNhSYb6bZjmwEh5OLi+WTrU yaD/eB3k4D0D5yWsgEt6jSmzD1FiVfDWyP0Ba9+LVBwCR8BnCvJ/s6bZ4Cm2IvIz6nqXaAfhLmI HJCUf6fSRz9qhFdVnH3eAPzs28IRNHBimoYv+1xAA6Yi2h3iNQp9/mzihzU5qTrQEY3T3uUds3O G/65iQG/ZZAF3j7zkcxg/vx471JtL/Mnua4Zd7Pd/xVUobl7cyQXnrrqNbWPHi+cDDeOBRFiwt X-Received: by 2002:a05:600c:8b6c:b0:477:6d96:b3e5 with SMTP id 5b1f17b1804b1-483c3da0b4dmr1305165e9.7.1772061374716; Wed, 25 Feb 2026 15:16:14 -0800 (PST) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PULL 18/70] target/sparc: Introduce sparc_cpu_register_gdb_regs() stub Date: Thu, 26 Feb 2026 00:13:18 +0100 Message-ID: <20260225231411.96482-19-philmd@linaro.org> X-Mailer: git-send-email 2.52.0 In-Reply-To: <20260225231411.96482-1-philmd@linaro.org> References: <20260225231411.96482-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=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: 1772061436696158500 Introduce sparc_cpu_register_gdb_regs() which we are going to fill in the next commits. Reviewed-by: Pierrick Bouvier Signed-off-by: Philippe Mathieu-Daud=C3=A9 Message-ID: <20260219191955.83815-11-philmd@linaro.org> --- target/sparc/cpu.h | 1 + target/sparc/cpu.c | 2 ++ target/sparc/gdbstub.c | 9 +++++++++ 3 files changed, 12 insertions(+) diff --git a/target/sparc/cpu.h b/target/sparc/cpu.h index 7169a502432..0139732e4cc 100644 --- a/target/sparc/cpu.h +++ b/target/sparc/cpu.h @@ -586,6 +586,7 @@ hwaddr sparc_cpu_get_phys_page_debug(CPUState *cpu, vad= dr addr); void sparc_cpu_do_interrupt(CPUState *cpu); int sparc_cpu_gdb_read_register(CPUState *cpu, GByteArray *buf, int reg); int sparc_cpu_gdb_write_register(CPUState *cpu, uint8_t *buf, int reg); +void sparc_cpu_register_gdb_regs(CPUState *cs); G_NORETURN void sparc_cpu_do_unaligned_access(CPUState *cpu, vaddr addr, MMUAccessType access_type, int mmu_idx, diff --git a/target/sparc/cpu.c b/target/sparc/cpu.c index c11d600dc30..f688f07445c 100644 --- a/target/sparc/cpu.c +++ b/target/sparc/cpu.c @@ -897,6 +897,8 @@ static void sparc_cpu_realizefn(DeviceState *dev, Error= **errp) return; } =20 + sparc_cpu_register_gdb_regs(cs); + qemu_init_vcpu(cs); =20 scc->parent_realize(dev, errp); diff --git a/target/sparc/gdbstub.c b/target/sparc/gdbstub.c index 134617fb232..79d661fbc10 100644 --- a/target/sparc/gdbstub.c +++ b/target/sparc/gdbstub.c @@ -215,3 +215,12 @@ int sparc_cpu_gdb_write_register(CPUState *cs, uint8_t= *mem_buf, int n) return 8; #endif } + +void sparc_cpu_register_gdb_regs(CPUState *cs) +{ +#if defined(TARGET_ABI32) || !defined(TARGET_SPARC64) + /* Not yet supported */ +#else + /* Not yet supported */ +#endif +} --=20 2.52.0 From nobody Thu Apr 16 20:57:20 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=1772061902; cv=none; d=zohomail.com; s=zohoarc; b=jvunTQPh8Psrnufq+XcDUmlTGOx/H/xdbLbKcvCuUIfrMb0mqJbK8DHLJHFeImr7rrGm34j+ycvhxzoYK4cX1cPa8hU93rdiR9syp+uC4ZOh42ZB1HOBthef2TSGdD4m+93HQQAu2O9vhgEaFyES3CFFTkovmA0QmZo+vRH8WFQ= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1772061902; h=Content-Type:Content-Transfer-Encoding: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:Cc; bh=79YYFz+D1ATPDrAXduKKP2uVEJuaEL+fM5BNyaSmPPU=; b=VWCe8H6mfL9IusszyKSkC4xN/dN9zrJ3Nn44EQ39F+ZregaR1lquu+eVCe/shsREr2nesQWd64O3L6mC0N1kmSCb5+jLVHvHw7g+yfCCt9WIQJzxqMy8r6OLxfiOCgmdMwm0ZSW3gO1tzF4I4d+l3OgC8sMBG1JkChFLxir3YwA= 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 1772061902423378.540195878399; Wed, 25 Feb 2026 15:25:02 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1vvO89-0001Zl-7m; Wed, 25 Feb 2026 18:17:21 -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 1vvO7G-0007fv-Dt for qemu-devel@nongnu.org; Wed, 25 Feb 2026 18:16:30 -0500 Received: from mail-wr1-x441.google.com ([2a00:1450:4864:20::441]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1vvO7D-0002qj-Jz for qemu-devel@nongnu.org; Wed, 25 Feb 2026 18:16:26 -0500 Received: by mail-wr1-x441.google.com with SMTP id ffacd0b85a97d-43945763558so140687f8f.3 for ; Wed, 25 Feb 2026 15:16:23 -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-4398a292babsm13302742f8f.37.2026.02.25.15.16.20 for (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Wed, 25 Feb 2026 15:16:20 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1772061381; x=1772666181; 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=79YYFz+D1ATPDrAXduKKP2uVEJuaEL+fM5BNyaSmPPU=; b=C/rgtJgVV0VIFXFT/Me19ByAgSiSrd8AdZWkxuYksdXYU56ypGUxdHCiQlDlliUp4A vvcgaKp9xwIKslwQLJZhGA/NFZ4J1bHnKYUnhas36EftAM8TjdNpM19PUYIqP+dHEvfz d6+UF6QVgzAR299KeMVB2v3as/Kf//hkv51zCUmY+3VN7zPuScEzhPUn2Y7B2jP1Sgw2 sYWvmanBMkQskqkitNoXEbbVIIKgr2j/Taw1PKeB7vj0fnoPiPc5MsQgEh4ZkNnt8h4D ngKrhhH+cHLaIQRWowAnt3FNaKNYZaDnSkMjB+MfbNxK506/qQHndlJuUAyVuVCz2U4Z jTWg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1772061381; x=1772666181; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-gg:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to; bh=79YYFz+D1ATPDrAXduKKP2uVEJuaEL+fM5BNyaSmPPU=; b=WE0aa/ZykydPUEJ7/utpGqYRCef8GxMF8QHSQnYf7MlQre97tft8aNTj+9zlGjY67M 0f4BXzkwivJgZbMhqlHnHGRxRHc03VBRlZRlWy90FHlIFW8fyJNfvpcKyGHgFNbYxUh1 rvMGnLPa1yYvjI3BBVKG0C2/T+LVQE9lF1PPIPlGFwXZQXyah3OecRtOV2i6HXXg0Qva F5maIPg4P2j1X0b69hkQRbjZWoHvml7Fv121I8ilxCnGigD3PBTftS4c2H7dDbArvJK9 QzSgTOwe6DNAOwy8CLROqHb17/4OSJp5m1peuuvtQCz4pE/m8BkIUwUcUq7+O0gSSj7B G0pg== X-Gm-Message-State: AOJu0YwrwKYwFuZJbi/pj7FzKhzw3UxOeyGy0cDyoBxbwV5DR5N8y8tb fx0Zo0+3ISABcqQkosoxE7ytl+bBw/9zVKW4lG7VWFlV21Mtwf7cl6IGFSdoLmobcft4uHIOVv0 i0otYiKM= X-Gm-Gg: ATEYQzxlgosFPrLevK7q7E3xs+DBl6pzE2hr84005Q0GaBwdZmbti3cCxjOi8euhpN0 9joPkELP3OiIpk08oleXgUL9Ir1uM33GwDUZzi5b5X/6nQlkkjjl0lWGIoQfZdnp6uSajUcpvK7 svjMoc6+UB/AW2VHgpDqTQuSBMjTZMb2zkA7YPaUbrI+MhO6gKhBY/2fmr5dyFqQYh6HclO2AE5 31QDn+ultvG4D68Yz4UbVlnUoxKRgkProI2fV8lQT13cQ65hPPa29xOZM6VEMroPs87zsPECJLe AKZ1eXNkkrd2wSA+hsFboaGChuDkzj1JE7B+Wk/Pp9CICcgbtiBODix3bSLeaZgHUyKFqckVPAi NrMG68vRBGVKU0Dj4k7H3hgBNHRancYdYwlUFXS4A5lWiysgNu8mp+SqUXMEdT9E1J0wc1b2GOU wKKnjyaH8IvW/DGj/TIj0dokfUq6cgzTIYV+ePafU8amgYRF+pbvqpAlXcnI2r2IRM95zpynD6 X-Received: by 2002:a05:6000:2403:b0:431:752:671e with SMTP id ffacd0b85a97d-4396f173e6bmr27280237f8f.15.1772061381379; Wed, 25 Feb 2026 15:16:21 -0800 (PST) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PULL 19/70] target/sparc: Restore 'gdb-xml/sparc64-cp0.xml' Date: Thu, 26 Feb 2026 00:13:19 +0100 Message-ID: <20260225231411.96482-20-philmd@linaro.org> X-Mailer: git-send-email 2.52.0 In-Reply-To: <20260225231411.96482-1-philmd@linaro.org> References: <20260225231411.96482-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::441; envelope-from=philmd@linaro.org; helo=mail-wr1-x441.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: 1772061904831158500 Restore gdb-xml/sparc64-cp0.xml from mainstream binutils, tag 'binutils-2_46', found in the gdb/features/sparc/folder [*]. Extract sparc_cp0_gdb_write_register() out of sparc_cpu_gdb_read_register() and sparc_cp0_gdb_write_register() out of sparc_cpu_gdb_write_register(), taking care to update the register indexes in the switch cases. Register these helpers with a call to gdb_register_coprocessor() in sparc_cpu_register_gdb_regs(). [*] https://sourceware.org/git/?p=3Dbinutils-gdb.git;a=3Dtree;f=3Dgdb/featu= res/sparc;hb=3Drefs/tags/binutils-2_46 Reviewed-by: Pierrick Bouvier Signed-off-by: Philippe Mathieu-Daud=C3=A9 Message-ID: <20260219191955.83815-12-philmd@linaro.org> --- MAINTAINERS | 1 + configs/targets/sparc64-linux-user.mak | 2 +- configs/targets/sparc64-softmmu.mak | 2 +- target/sparc/gdbstub.c | 193 ++++++++++++++----------- gdb-xml/sparc64-core.xml | 7 - gdb-xml/sparc64-cp0.xml | 16 ++ 6 files changed, 131 insertions(+), 90 deletions(-) create mode 100644 gdb-xml/sparc64-cp0.xml diff --git a/MAINTAINERS b/MAINTAINERS index 233d2a5e71f..693b51166f5 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -402,6 +402,7 @@ M: Mark Cave-Ayland M: Artyom Tarasenko S: Maintained F: target/sparc/ +F: gdb-xml/sparc*.xml F: hw/sparc/ F: hw/sparc64/ F: include/hw/sparc/sparc64.h diff --git a/configs/targets/sparc64-linux-user.mak b/configs/targets/sparc= 64-linux-user.mak index 3bbd8495210..930f7e13ab9 100644 --- a/configs/targets/sparc64-linux-user.mak +++ b/configs/targets/sparc64-linux-user.mak @@ -4,6 +4,6 @@ TARGET_ABI_DIR=3Dsparc TARGET_SYSTBL_ABI=3Dcommon,64 TARGET_SYSTBL=3Dsyscall.tbl TARGET_BIG_ENDIAN=3Dy -TARGET_XML_FILES=3Dgdb-xml/sparc64-core.xml +TARGET_XML_FILES=3Dgdb-xml/sparc64-core.xml gdb-xml/sparc64-cp0.xml TARGET_LONG_BITS=3D64 TARGET_NOT_USING_LEGACY_NATIVE_ENDIAN_API=3Dy diff --git a/configs/targets/sparc64-softmmu.mak b/configs/targets/sparc64-= softmmu.mak index 8a0290c2093..22e7f3c94a7 100644 --- a/configs/targets/sparc64-softmmu.mak +++ b/configs/targets/sparc64-softmmu.mak @@ -1,7 +1,7 @@ TARGET_ARCH=3Dsparc64 TARGET_BASE_ARCH=3Dsparc TARGET_BIG_ENDIAN=3Dy -TARGET_XML_FILES=3Dgdb-xml/sparc64-core.xml +TARGET_XML_FILES=3Dgdb-xml/sparc64-core.xml gdb-xml/sparc64-cp0.xml TARGET_LONG_BITS=3D64 TARGET_NOT_USING_LEGACY_LDST_PHYS_API=3Dy TARGET_NOT_USING_LEGACY_NATIVE_ENDIAN_API=3Dy diff --git a/target/sparc/gdbstub.c b/target/sparc/gdbstub.c index 79d661fbc10..bdd759dd0a9 100644 --- a/target/sparc/gdbstub.c +++ b/target/sparc/gdbstub.c @@ -18,6 +18,7 @@ * License along with this library; if not, see . */ #include "qemu/osdep.h" +#include "exec/gdbstub.h" #include "cpu.h" #include "gdbstub/helpers.h" =20 @@ -48,27 +49,6 @@ int sparc_cpu_gdb_read_register(CPUState *cs, GByteArray= *mem_buf, int n) return gdb_get_reg32(mem_buf, env->fpr[(n - 32) / 2].l.upper); } } - /* Y, PSR, WIM, TBR, PC, NPC, FPSR, CPSR */ - switch (n) { - case 64: - return gdb_get_rega(mem_buf, env->y); - case 65: - return gdb_get_rega(mem_buf, cpu_get_psr(env)); - case 66: - return gdb_get_rega(mem_buf, env->wim); - case 67: - return gdb_get_rega(mem_buf, env->tbr); - case 68: - return gdb_get_rega(mem_buf, env->pc); - case 69: - return gdb_get_rega(mem_buf, env->npc); - case 70: - return gdb_get_rega(mem_buf, cpu_get_fsr(env)); - case 71: - return gdb_get_rega(mem_buf, 0); /* csr */ - default: - return gdb_get_rega(mem_buf, 0); - } #else if (n < 64) { /* f0-f31 */ @@ -87,21 +67,51 @@ int sparc_cpu_gdb_read_register(CPUState *cs, GByteArra= y *mem_buf, int n) */ return gdb_get_reg64(mem_buf, env->fpr[(n - 64) + 16].ll); } +#endif + return 0; +} + +__attribute__((unused)) +static int sparc_cp0_gdb_read_register(CPUState *cs, GByteArray *mem_buf, = int n) +{ + CPUSPARCState *env =3D cpu_env(cs); + +#if defined(TARGET_ABI32) || !defined(TARGET_SPARC64) + /* Y, PSR, WIM, TBR, PC, NPC, FPSR, CPSR */ switch (n) { - case 80: + case 0: + return gdb_get_rega(mem_buf, env->y); + case 1: + return gdb_get_rega(mem_buf, cpu_get_psr(env)); + case 2: + return gdb_get_rega(mem_buf, env->wim); + case 3: + return gdb_get_rega(mem_buf, env->tbr); + case 4: + return gdb_get_rega(mem_buf, env->pc); + case 5: + return gdb_get_rega(mem_buf, env->npc); + case 6: + return gdb_get_rega(mem_buf, cpu_get_fsr(env)); + case 7: + return gdb_get_rega(mem_buf, 0); /* csr */ + } +#else + switch (n) { + case 0: return gdb_get_regl(mem_buf, env->pc); - case 81: + case 1: return gdb_get_regl(mem_buf, env->npc); - case 82: + case 2: return gdb_get_regl(mem_buf, (cpu_get_ccr(env) << 32) | ((env->asi & 0xff) << 24) | ((env->pstate & 0xfff) << 8) | cpu_get_cwp64(env)); - case 83: + case 3: return gdb_get_regl(mem_buf, cpu_get_fsr(env)); - case 84: + case 4: return gdb_get_regl(mem_buf, env->fprs); - case 85: + case 5: return gdb_get_regl(mem_buf, env->y); } #endif @@ -138,33 +148,6 @@ int sparc_cpu_gdb_write_register(CPUState *cs, uint8_t= *mem_buf, int n) } else { env->fpr[(n - 32) / 2].l.upper =3D tmp; } - } else { - /* Y, PSR, WIM, TBR, PC, NPC, FPSR, CPSR */ - switch (n) { - case 64: - env->y =3D tmp; - break; - case 65: - cpu_put_psr(env, tmp); - break; - case 66: - env->wim =3D tmp; - break; - case 67: - env->tbr =3D tmp; - break; - case 68: - env->pc =3D tmp; - break; - case 69: - env->npc =3D tmp; - break; - case 70: - cpu_put_fsr(env, tmp); - break; - default: - return 0; - } } return 4; #else @@ -185,32 +168,77 @@ int sparc_cpu_gdb_write_register(CPUState *cs, uint8_= t *mem_buf, int n) * n =3D=3D 79: f62 : env->fpr[31] */ env->fpr[(n - 64) + 16].ll =3D tmp; - } else { - switch (n) { - case 80: - env->pc =3D tmp; - break; - case 81: - env->npc =3D tmp; - break; - case 82: - cpu_put_ccr(env, tmp >> 32); - env->asi =3D (tmp >> 24) & 0xff; - env->pstate =3D (tmp >> 8) & 0xfff; - cpu_put_cwp64(env, tmp & 0xff); - break; - case 83: - cpu_put_fsr(env, tmp); - break; - case 84: - env->fprs =3D tmp; - break; - case 85: - env->y =3D tmp; - break; - default: - return 0; - } + } + return 8; +#endif +} + +__attribute__((unused)) +static int sparc_cp0_gdb_write_register(CPUState *cs, uint8_t *mem_buf, in= t n) +{ + CPUSPARCState *env =3D cpu_env(cs); + +#if defined(TARGET_ABI32) || !defined(TARGET_SPARC64) + uint32_t tmp; + + tmp =3D ldl_p(mem_buf); + + /* Y, PSR, WIM, TBR, PC, NPC, FPSR, CPSR */ + switch (n) { + case 0: + env->y =3D tmp; + break; + case 1: + cpu_put_psr(env, tmp); + break; + case 2: + env->wim =3D tmp; + break; + case 3: + env->tbr =3D tmp; + break; + case 4: + env->pc =3D tmp; + break; + case 5: + env->npc =3D tmp; + break; + case 6: + cpu_put_fsr(env, tmp); + break; + default: + return 0; + } + return 4; +#else + uint64_t tmp; + + tmp =3D ldq_p(mem_buf); + + switch (n) { + case 0: + env->pc =3D tmp; + break; + case 1: + env->npc =3D tmp; + break; + case 2: + cpu_put_ccr(env, tmp >> 32); + env->asi =3D (tmp >> 24) & 0xff; + env->pstate =3D (tmp >> 8) & 0xfff; + cpu_put_cwp64(env, tmp & 0xff); + break; + case 3: + cpu_put_fsr(env, tmp); + break; + case 4: + env->fprs =3D tmp; + break; + case 5: + env->y =3D tmp; + break; + default: + return 0; } return 8; #endif @@ -221,6 +249,9 @@ void sparc_cpu_register_gdb_regs(CPUState *cs) #if defined(TARGET_ABI32) || !defined(TARGET_SPARC64) /* Not yet supported */ #else - /* Not yet supported */ + gdb_register_coprocessor(cs, sparc_cp0_gdb_read_register, + sparc_cp0_gdb_write_register, + gdb_find_static_feature("sparc64-cp0.xml"), + 0); #endif } diff --git a/gdb-xml/sparc64-core.xml b/gdb-xml/sparc64-core.xml index 375b9bb0cc6..1c26d8c01c1 100644 --- a/gdb-xml/sparc64-core.xml +++ b/gdb-xml/sparc64-core.xml @@ -89,11 +89,4 @@ - - - - - - - diff --git a/gdb-xml/sparc64-cp0.xml b/gdb-xml/sparc64-cp0.xml new file mode 100644 index 00000000000..9b938dc7ecc --- /dev/null +++ b/gdb-xml/sparc64-cp0.xml @@ -0,0 +1,16 @@ + + + + + + + + + + + + --=20 2.52.0 From nobody Thu Apr 16 20:57:20 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=1772061438; cv=none; d=zohomail.com; s=zohoarc; b=ZHubDhBb/0jE1zv9faHDaUStBNSs5ewoMdtdC49TaK4iDFJoVnHrbXVnr5YPOE2zqaVAxSZOAcS5V75Mne6y8PR2cgFoNvL2hrJs/snzipF8fDiNzaVH1H4CIxi+e7hIciVqEoQorErF4i6gwJMOTu1kh3isPTqYZyGjkIOL1CY= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1772061438; h=Content-Type:Content-Transfer-Encoding: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:Cc; bh=nYUv30Ewt1AuCX3tb64/hPH2LBRWn+AYEG/qVeMQBTA=; b=afnxUJhpuFtJKag/cqVlqro40+hmBFYiCB8sJ3+BQnLa0V/jnARFK0GlnA7agcQcwfCbMvg7Zex/0tvx6sR2WIDpjJuCS4aQk/ze3I4uAN6SYtXJVaHh1BZ/TDaZj1McLg9CfuEB040X7y/k8Div+f0V+v1Cai+2ytdRivP6H2A= 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 1772061438035301.5309370868831; Wed, 25 Feb 2026 15:17:18 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1vvO82-0000da-4z; Wed, 25 Feb 2026 18:17:14 -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 1vvO7M-0007mm-Q2 for qemu-devel@nongnu.org; Wed, 25 Feb 2026 18:16:38 -0500 Received: from mail-wm1-x344.google.com ([2a00:1450:4864:20::344]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1vvO7K-0002rW-38 for qemu-devel@nongnu.org; Wed, 25 Feb 2026 18:16:32 -0500 Received: by mail-wm1-x344.google.com with SMTP id 5b1f17b1804b1-48379a42f76so2354055e9.0 for ; Wed, 25 Feb 2026 15:16: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 ffacd0b85a97d-43994da2584sm3580808f8f.12.2026.02.25.15.16.27 for (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Wed, 25 Feb 2026 15:16:27 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1772061388; x=1772666188; 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=nYUv30Ewt1AuCX3tb64/hPH2LBRWn+AYEG/qVeMQBTA=; b=BvYS1AG3Ocmght8F2XKIrO1IAZgBzRJasNw6kX0ILeexDomTUCMNmLKAnqGdNKr3Qf tP4sSSgfiG4NsybfMih3eTK2E42isQgripYuq6iCIwkNl5GEeCWxztJYtcQ5H13gNz3s cQR0gjYYAO8USp5XavkU7KT3yKISncWY6xcqbePKrQsQCHEa52RMFu5/9fhtNYaL+Wmz HXE32ezHWF2ZsQnS8I3XkGpw2x1KM1myN1zqzzTn3e2qHM6DqeRgjCqvQD30YnbKTrQI Cv9VqE5Q1rHTkSTGWZ4Hws0PokQDrp85RXTu0drtydCiZ6RcGGzTcYKkc/9+iUGkPsaO momA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1772061388; x=1772666188; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-gg:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to; bh=nYUv30Ewt1AuCX3tb64/hPH2LBRWn+AYEG/qVeMQBTA=; b=Tl2SijwSiH2M65iV79uEAg+74sET7afgt2dm14NE1q3JYX6t39S6bGFFcFxgFsN9ym tcEF3H5wGutUhdvi4wioG8LsPjmWWwsEF7KQPNYjdHYFbC7s5aRR5ynG5Hb+1SWIjL9G tvmZjg3PNqSip8+x9vRQtskUQSgJl2zxxgjCwHBCXmAx2tefoQ6O0FTbvbhuFjgc5glq 4Yu8nC5IwrD04e1ivWPEIil7vNUhBWPzflAdyrI0DU4DojZVA3Jbl9m7ReAN8tn3uT6k POknePD9E6IZ8qaaAOE1pkchS7p0FMlH2kJpdGdw8wq9tz5dHc/pDj6czuX8qzs6bzjD 85mw== X-Gm-Message-State: AOJu0YxkCsuBPVWAAliviPEz8l70EjEXmKtjMzYjQ+t+4g9bfbCT5yYG UEeHC+2KeVQJLz7eh6qi0+7YiZXyNHAPIOmwnK5MrvH2TNbnGrFCsRxhXYB+CRx/IUXyy4FcjMh NqkJHHkg= X-Gm-Gg: ATEYQzwD8/NnqtJwo/Johq9ClyF8Z9tKq71x0Zg+VDMkPuhAdsjYko2b19s+JlaJd0F moBOUNT6pYzyGB15ZW5rpCwfD0mdDBqwABzOrThYMfFxsXSuFtdYBUQSrgCvizietpSxRQvhs9L lvbo29LrH/X12srIp6OsGjmsM3GqqQO4xEYsFL/wmqABXyUM+oAZ7/AM0dFlmLrMBkObQ4Z1aC3 VeY5IfkLnwZ5YKxpSOiFMS6tmXgsVKAitlY5KEh0fFinwUVF7YZh6aD9/LHts4SN276dkwJeoVA esw4mEXD3GYRg3JcQMRgIDtAUI6eOKnsyPMwVtUqm9p1LILOo7jKSAuXdbLFpeHc76grUH0pjFw 0BW4hdkbFVKiIPuSmZOTC2959iZZCJRuJxdoKJDGAoh2ef+L/J5dm2YnIOb+AJrUzwjtfYYdWJQ LeSKMHbmxtpePC8CoQZwJs6O71CqOitMiHLQU97sAUDOko+UVrOSJxMV1UhnQOOxURfviO28kz X-Received: by 2002:a05:6000:4212:b0:439:7e17:c5f6 with SMTP id ffacd0b85a97d-439942ed01fmr4103249f8f.33.1772061388052; Wed, 25 Feb 2026 15:16:28 -0800 (PST) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PULL 20/70] target/sparc: Restore 'gdb-xml/sparc64-fpu.xml' Date: Thu, 26 Feb 2026 00:13:20 +0100 Message-ID: <20260225231411.96482-21-philmd@linaro.org> X-Mailer: git-send-email 2.52.0 In-Reply-To: <20260225231411.96482-1-philmd@linaro.org> References: <20260225231411.96482-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::344; envelope-from=philmd@linaro.org; helo=mail-wm1-x344.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: 1772061438852158500 Restore gdb-xml/sparc64-fpu.xml from mainstream binutils, tag 'binutils-2_46', found in the gdb/features/sparc/folder [*]. Extract sparc_fpu_gdb_write_register() out of sparc_cpu_gdb_read_register() and sparc_fpu_gdb_write_register() out of sparc_cpu_gdb_write_register(), taking care to update the register indexes in the switch cases. Register these helpers with a call to gdb_register_coprocessor() in sparc_cpu_register_gdb_regs(). [*] https://sourceware.org/git/?p=3Dbinutils-gdb.git;a=3Dtree;f=3Dgdb/featu= res/sparc;hb=3Drefs/tags/binutils-2_46 Reviewed-by: Pierrick Bouvier Signed-off-by: Philippe Mathieu-Daud=C3=A9 Message-ID: <20260219191955.83815-13-philmd@linaro.org> --- configs/targets/sparc64-linux-user.mak | 2 +- configs/targets/sparc64-softmmu.mak | 2 +- target/sparc/gdbstub.c | 88 +++++++++++++++++--------- gdb-xml/sparc64-core.xml | 50 --------------- gdb-xml/sparc64-fpu.xml | 59 +++++++++++++++++ 5 files changed, 119 insertions(+), 82 deletions(-) create mode 100644 gdb-xml/sparc64-fpu.xml diff --git a/configs/targets/sparc64-linux-user.mak b/configs/targets/sparc= 64-linux-user.mak index 930f7e13ab9..a5f8f8d51a2 100644 --- a/configs/targets/sparc64-linux-user.mak +++ b/configs/targets/sparc64-linux-user.mak @@ -4,6 +4,6 @@ TARGET_ABI_DIR=3Dsparc TARGET_SYSTBL_ABI=3Dcommon,64 TARGET_SYSTBL=3Dsyscall.tbl TARGET_BIG_ENDIAN=3Dy -TARGET_XML_FILES=3Dgdb-xml/sparc64-core.xml gdb-xml/sparc64-cp0.xml +TARGET_XML_FILES=3Dgdb-xml/sparc64-core.xml gdb-xml/sparc64-fpu.xml gdb-xm= l/sparc64-cp0.xml TARGET_LONG_BITS=3D64 TARGET_NOT_USING_LEGACY_NATIVE_ENDIAN_API=3Dy diff --git a/configs/targets/sparc64-softmmu.mak b/configs/targets/sparc64-= softmmu.mak index 22e7f3c94a7..c35b6b1bb8a 100644 --- a/configs/targets/sparc64-softmmu.mak +++ b/configs/targets/sparc64-softmmu.mak @@ -1,7 +1,7 @@ TARGET_ARCH=3Dsparc64 TARGET_BASE_ARCH=3Dsparc TARGET_BIG_ENDIAN=3Dy -TARGET_XML_FILES=3Dgdb-xml/sparc64-core.xml gdb-xml/sparc64-cp0.xml +TARGET_XML_FILES=3Dgdb-xml/sparc64-core.xml gdb-xml/sparc64-fpu.xml gdb-xm= l/sparc64-cp0.xml TARGET_LONG_BITS=3D64 TARGET_NOT_USING_LEGACY_LDST_PHYS_API=3Dy TARGET_NOT_USING_LEGACY_NATIVE_ENDIAN_API=3Dy diff --git a/target/sparc/gdbstub.c b/target/sparc/gdbstub.c index bdd759dd0a9..b5b1494950a 100644 --- a/target/sparc/gdbstub.c +++ b/target/sparc/gdbstub.c @@ -40,32 +40,40 @@ int sparc_cpu_gdb_read_register(CPUState *cs, GByteArra= y *mem_buf, int n) /* register window */ return gdb_get_rega(mem_buf, env->regwptr[n - 8]); } + return 0; +} + +__attribute__((unused)) +static int sparc_fpu_gdb_read_register(CPUState *cs, GByteArray *mem_buf, = int n) +{ + CPUSPARCState *env =3D cpu_env(cs); + #if defined(TARGET_ABI32) || !defined(TARGET_SPARC64) - if (n < 64) { + if (n < 32) { /* fprs */ if (n & 1) { - return gdb_get_reg32(mem_buf, env->fpr[(n - 32) / 2].l.lower); + return gdb_get_reg32(mem_buf, env->fpr[n / 2].l.lower); } else { - return gdb_get_reg32(mem_buf, env->fpr[(n - 32) / 2].l.upper); + return gdb_get_reg32(mem_buf, env->fpr[n / 2].l.upper); } } #else - if (n < 64) { + if (n < 32) { /* f0-f31 */ if (n & 1) { - return gdb_get_reg32(mem_buf, env->fpr[(n - 32) / 2].l.lower); + return gdb_get_reg32(mem_buf, env->fpr[n / 2].l.lower); } else { - return gdb_get_reg32(mem_buf, env->fpr[(n - 32) / 2].l.upper); + return gdb_get_reg32(mem_buf, env->fpr[n / 2].l.upper); } } - if (n < 80) { + if (n < 48) { /* f32-f62 (16 double width registers, even register numbers only) - * n =3D=3D 64: f32 : env->fpr[16] - * n =3D=3D 65: f34 : env->fpr[17] + * n =3D=3D 32: f32 : env->fpr[16] + * n =3D=3D 33: f34 : env->fpr[17] * etc... - * n =3D=3D 79: f62 : env->fpr[31] + * n =3D=3D 47: f62 : env->fpr[31] */ - return gdb_get_reg64(mem_buf, env->fpr[(n - 64) + 16].ll); + return gdb_get_reg64(mem_buf, env->fpr[(n - 32) + 16].ll); } #endif return 0; @@ -135,39 +143,55 @@ int sparc_cpu_gdb_write_register(CPUState *cs, uint8_= t *mem_buf, int n) if (n < 8) { /* g0..g7 */ env->gregs[n] =3D tmp; - } else if (n < 32) { + } else { /* register window */ env->regwptr[n - 8] =3D tmp; } #if defined(TARGET_ABI32) || !defined(TARGET_SPARC64) - else if (n < 64) { - /* fprs */ - /* f0-f31 */ - if (n & 1) { - env->fpr[(n - 32) / 2].l.lower =3D tmp; - } else { - env->fpr[(n - 32) / 2].l.upper =3D tmp; - } - } return 4; #else - else if (n < 64) { + return 8; +#endif +} + +__attribute__((unused)) +static int sparc_fpu_gdb_write_register(CPUState *cs, uint8_t *mem_buf, in= t n) +{ + CPUSPARCState *env =3D cpu_env(cs); + +#if defined(TARGET_ABI32) || !defined(TARGET_SPARC64) + uint32_t tmp; + + tmp =3D ldl_p(mem_buf); + + /* fprs */ + /* f0-f31 */ + if (n & 1) { + env->fpr[n / 2].l.lower =3D tmp; + } else { + env->fpr[n / 2].l.upper =3D tmp; + } + + return 4; +#else + if (n < 32) { /* f0-f31 */ - tmp =3D ldl_p(mem_buf); + uint32_t tmp =3D ldl_p(mem_buf); if (n & 1) { - env->fpr[(n - 32) / 2].l.lower =3D tmp; + env->fpr[n / 2].l.lower =3D tmp; } else { - env->fpr[(n - 32) / 2].l.upper =3D tmp; + env->fpr[n / 2].l.upper =3D tmp; } return 4; - } else if (n < 80) { + } else { + uint64_t tmp =3D ldq_p(mem_buf); /* f32-f62 (16 double width registers, even register numbers only) - * n =3D=3D 64: f32 : env->fpr[16] - * n =3D=3D 65: f34 : env->fpr[17] + * n =3D=3D 32: f32 : env->fpr[16] + * n =3D=3D 33: f34 : env->fpr[17] * etc... - * n =3D=3D 79: f62 : env->fpr[31] + * n =3D=3D 47: f62 : env->fpr[31] */ - env->fpr[(n - 64) + 16].ll =3D tmp; + env->fpr[(n - 32) + 16].ll =3D tmp; } return 8; #endif @@ -249,6 +273,10 @@ void sparc_cpu_register_gdb_regs(CPUState *cs) #if defined(TARGET_ABI32) || !defined(TARGET_SPARC64) /* Not yet supported */ #else + gdb_register_coprocessor(cs, sparc_fpu_gdb_read_register, + sparc_fpu_gdb_write_register, + gdb_find_static_feature("sparc64-fpu.xml"), + 0); gdb_register_coprocessor(cs, sparc_cp0_gdb_read_register, sparc_cp0_gdb_write_register, gdb_find_static_feature("sparc64-cp0.xml"), diff --git a/gdb-xml/sparc64-core.xml b/gdb-xml/sparc64-core.xml index 1c26d8c01c1..85b0820a408 100644 --- a/gdb-xml/sparc64-core.xml +++ b/gdb-xml/sparc64-core.xml @@ -39,54 +39,4 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/gdb-xml/sparc64-fpu.xml b/gdb-xml/sparc64-fpu.xml new file mode 100644 index 00000000000..d7151b34c7f --- /dev/null +++ b/gdb-xml/sparc64-fpu.xml @@ -0,0 +1,59 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + --=20 2.52.0 From nobody Thu Apr 16 20:57:20 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=1772061439; cv=none; d=zohomail.com; s=zohoarc; b=Q5E0XQT/+3CmAbqdiozFq3cor/CxLDrUOF50IBjzCtPbKr3JI8e11x5qGQUCXHDkjnrfEc4Tnw+QdMpNYVezq0KrDA8p7pYBD5zfPdlRKGFJypLDFoBAfUu/Z8Mg5gBakLLJW6/G/ZMgzQCDQaztuSjV2AxgqAKHVsE9bpyRFGw= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1772061439; h=Content-Type:Content-Transfer-Encoding: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:Cc; bh=26zC78SKDPxlTtKGIo+zSeJhMUMWWNcnFID6DiCcLnc=; b=V1T0h4OqkYdYjGNhAvyPmvUrfjVoFyHntSUS315JJ37XGBikkc/WzelbLOmUZfI6VoyPtVSfuhMm2scsQpxDY2hSgjOJKiun4KZ1GZSraS4CJmwXre+iAW1BYwGSIYFl6dYfBcFy2EAHVVuSQQXx4UPqBTM0LFZ9Vw51MfAj+iE= 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 17720614390331020.6763108797319; Wed, 25 Feb 2026 15:17:19 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1vvO83-0000qn-Nf; Wed, 25 Feb 2026 18:17:15 -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 1vvO7U-0007rz-G1 for qemu-devel@nongnu.org; Wed, 25 Feb 2026 18:16:42 -0500 Received: from mail-wm1-x344.google.com ([2a00:1450:4864:20::344]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1vvO7Q-0002ti-Kj for qemu-devel@nongnu.org; Wed, 25 Feb 2026 18:16:39 -0500 Received: by mail-wm1-x344.google.com with SMTP id 5b1f17b1804b1-48371bb515eso3579535e9.1 for ; Wed, 25 Feb 2026 15:16: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 5b1f17b1804b1-483c3b89c99sm3498125e9.15.2026.02.25.15.16.33 for (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Wed, 25 Feb 2026 15:16:34 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1772061395; x=1772666195; 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=26zC78SKDPxlTtKGIo+zSeJhMUMWWNcnFID6DiCcLnc=; b=iMTlfQO7OEje3kYTJeQAbiL8XhCNrVgYwltM71b1bJteaY4w6lrGBDre4uD9dJ9JtD bbfJ9vO21ZGn0NrcG0svK7S33YS/xdtdO0VIAkNx++qCDTkZji/HcKU3N2YiiARJENkx pYbjVpWjurrm/7R7aODQCO+XzjprY2WGfhNyJz/tfDFAbq3RuKr6636fFjiIqKYwopHk UibNvNgM5BXanHep0G/1NEuoRE101hRQ+3U5wuE54trSmkY+3yv26rcwovhAtJLapn8R T+dbvIzJPw/w0e9GsEavO5BsS2UQFcOeAIXv/0FjjAF170HggvFpDNK2LjjA+XzcbPhC ZEiw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1772061395; x=1772666195; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-gg:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to; bh=26zC78SKDPxlTtKGIo+zSeJhMUMWWNcnFID6DiCcLnc=; b=o38RLLJxUkLylxLdgL3urIdP31Pob74LCIl8KVT0NZpSa+dLK0syzmAqeCi3weN573 iM32hpgPdNqvwbzxZnd3fETAXK1aLnZjEC32gdzpJME3/S/uvOD1E876eMgbdbMvnVHD Jjj4JFUnstXcGifuQwqfgTkeKVBzFh3534+Xe7Yy/j6O5mHgVPb9oJVvmERtUrmhiJPP a4mp1OzCtWBy9NL82MqVzyALjNd/APZ7XxtACPEvO0EwUEcadDTSM3YzF23pA/phA1HF Iy8fkc4r8Q/kf1JPZsSIdk4e+cbPwpvidmllJ7Hdp1gfQGw2Yihp7WEgpwlNjCaMbA4X Bg8Q== X-Gm-Message-State: AOJu0YwuE6NlZ12GO0B/kInhvaK0IrS5CUYrAQXPyUAz+acI3e5WvwFv WndaB7c3tWiKGAQo6OTsT4tOxSwM/FmmzI4hRHJzUnyuSdDi3Sq2/Ua3rYI83HPeugJV3Me+5i9 xK+cYNpk= X-Gm-Gg: ATEYQzwysUMx1zELkJzayUkqje7VSvXkW1ddWlrY3plWPAvKWoe1yRLmLwkiklCwCPT EFbMXsU4A69Q342oWvGdtA0dmQfsNmle3B24rURTfbi3HcBtshO6IqQfWZlf/hykB4SWW/cYjGE l+o7PtVGaQ4wf2KQ2fB4vsCu2nGCLIr0jL01kHT5KGkY1q1WmJCrK+umpnrOY4Wtnwnu9v9y1nw S/gx8D5m+hpT+jAMD/5qU8BeRaemdFmjZ4V+wHlHyeDZEJhYLvar7NWrbHj7vQyYM4IOaq8SJkh OzRD5TE1BWV+RwAx7EitrUm0iv3tsEiXrlEeyivJeKw/wi4jae/ZbIUm5bkiQjV7HZJ2v5Zgb59 Q2FG9yravmRwA4bs0z0u2k9602A3NgWFMwP1S37OpwsEgQ3l8z4Sb3e8snkj6MBVnifQ/gya+UQ uaZJ9y7xR8znT+359geUgVdpfI05nziLqLgVPaZ0CCEvrpn43CoSoYosSVlbpjrqott20IB5MX X-Received: by 2002:a05:600c:4e0f:b0:483:badb:6191 with SMTP id 5b1f17b1804b1-483c3db0103mr1554505e9.8.1772061394590; Wed, 25 Feb 2026 15:16:34 -0800 (PST) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PULL 21/70] target/sparc: Restore 'gdb-xml/sparc64-cpu.xml' Date: Thu, 26 Feb 2026 00:13:21 +0100 Message-ID: <20260225231411.96482-22-philmd@linaro.org> X-Mailer: git-send-email 2.52.0 In-Reply-To: <20260225231411.96482-1-philmd@linaro.org> References: <20260225231411.96482-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::344; envelope-from=philmd@linaro.org; helo=mail-wm1-x344.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: 1772061440946158500 Restore gdb-xml/sparc64-cpu.xml from mainstream binutils, tag 'binutils-2_46', found in the gdb/features/sparc/folder [*]. [*] https://sourceware.org/git/?p=3Dbinutils-gdb.git;a=3Dtree;f=3Dgdb/featu= res/sparc;hb=3Drefs/tags/binutils-2_46 Reviewed-by: Pierrick Bouvier Signed-off-by: Philippe Mathieu-Daud=C3=A9 Message-ID: <20260219191955.83815-14-philmd@linaro.org> --- configs/targets/sparc64-linux-user.mak | 2 +- configs/targets/sparc64-softmmu.mak | 2 +- target/sparc/cpu.c | 2 +- gdb-xml/{sparc64-core.xml =3D> sparc64-cpu.xml} | 4 ++-- 4 files changed, 5 insertions(+), 5 deletions(-) rename gdb-xml/{sparc64-core.xml =3D> sparc64-cpu.xml} (95%) diff --git a/configs/targets/sparc64-linux-user.mak b/configs/targets/sparc= 64-linux-user.mak index a5f8f8d51a2..81d18fcc85b 100644 --- a/configs/targets/sparc64-linux-user.mak +++ b/configs/targets/sparc64-linux-user.mak @@ -4,6 +4,6 @@ TARGET_ABI_DIR=3Dsparc TARGET_SYSTBL_ABI=3Dcommon,64 TARGET_SYSTBL=3Dsyscall.tbl TARGET_BIG_ENDIAN=3Dy -TARGET_XML_FILES=3Dgdb-xml/sparc64-core.xml gdb-xml/sparc64-fpu.xml gdb-xm= l/sparc64-cp0.xml +TARGET_XML_FILES=3Dgdb-xml/sparc64-cpu.xml gdb-xml/sparc64-fpu.xml gdb-xml= /sparc64-cp0.xml TARGET_LONG_BITS=3D64 TARGET_NOT_USING_LEGACY_NATIVE_ENDIAN_API=3Dy diff --git a/configs/targets/sparc64-softmmu.mak b/configs/targets/sparc64-= softmmu.mak index c35b6b1bb8a..602783ef0f6 100644 --- a/configs/targets/sparc64-softmmu.mak +++ b/configs/targets/sparc64-softmmu.mak @@ -1,7 +1,7 @@ TARGET_ARCH=3Dsparc64 TARGET_BASE_ARCH=3Dsparc TARGET_BIG_ENDIAN=3Dy -TARGET_XML_FILES=3Dgdb-xml/sparc64-core.xml gdb-xml/sparc64-fpu.xml gdb-xm= l/sparc64-cp0.xml +TARGET_XML_FILES=3Dgdb-xml/sparc64-cpu.xml gdb-xml/sparc64-fpu.xml gdb-xml= /sparc64-cp0.xml TARGET_LONG_BITS=3D64 TARGET_NOT_USING_LEGACY_LDST_PHYS_API=3Dy TARGET_NOT_USING_LEGACY_NATIVE_ENDIAN_API=3Dy diff --git a/target/sparc/cpu.c b/target/sparc/cpu.c index f688f07445c..d82f858efb1 100644 --- a/target/sparc/cpu.c +++ b/target/sparc/cpu.c @@ -1093,7 +1093,7 @@ static void sparc_cpu_class_init(ObjectClass *oc, con= st void *data) cc->disas_set_info =3D cpu_sparc_disas_set_info; =20 #if defined(TARGET_SPARC64) && !defined(TARGET_ABI32) - cc->gdb_core_xml_file =3D "sparc64-core.xml"; + cc->gdb_core_xml_file =3D "sparc64-cpu.xml"; #else cc->gdb_num_core_regs =3D 72; #endif diff --git a/gdb-xml/sparc64-core.xml b/gdb-xml/sparc64-cpu.xml similarity index 95% rename from gdb-xml/sparc64-core.xml rename to gdb-xml/sparc64-cpu.xml index 85b0820a408..a9bfc95ea65 100644 --- a/gdb-xml/sparc64-core.xml +++ b/gdb-xml/sparc64-cpu.xml @@ -1,12 +1,12 @@ - =20 - + --=20 2.52.0 From nobody Thu Apr 16 20:57:20 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=1772061447; cv=none; d=zohomail.com; s=zohoarc; b=I/q3tNo/31lJG9GQA+KN+JkWO+oWKWAZpOCdfiMOWemAowsevGNwUkw4Fa2pkGvYVy6uV/bbJZfBvHw7jvJES7b8D29BNaW4e0Mi56gw6F5lDfXMkWXeNDwofkEF8xDuF47BULke9M+4eKySVSVnmDRvrmFecmNiFg+Q4EiMtCU= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1772061447; h=Content-Type:Content-Transfer-Encoding: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:Cc; bh=nJ8BmygwV5uM3x8177Nc6uLEekFys9eBWoDNCjse/DU=; b=SHD8qMuO5kBqoJEW4PweE4+lBLzaCNIBgTdGqJJW4H5aFYt7b83WEwHyNyAQ5S043bTePFJfp49FVSreJAVrLjlWW/NK7jYR38a1QhH4FozLWgqUcfUGVRjR8s2Or7P3n5o/636h+S6MEkuV2fCwlTR9iE1u1YKQHk7lVjedrIA= 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 1772061447425613.384618117285; Wed, 25 Feb 2026 15:17:27 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1vvO7u-0000Dm-3C; Wed, 25 Feb 2026 18:17:07 -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 1vvO7Y-000803-JO for qemu-devel@nongnu.org; Wed, 25 Feb 2026 18:16:47 -0500 Received: from mail-wm1-x332.google.com ([2a00:1450:4864:20::332]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1vvO7X-0002u8-2v for qemu-devel@nongnu.org; Wed, 25 Feb 2026 18:16:44 -0500 Received: by mail-wm1-x332.google.com with SMTP id 5b1f17b1804b1-4836f363ad2so3056335e9.1 for ; Wed, 25 Feb 2026 15:16:42 -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-483bfbb6d16sm30082165e9.5.2026.02.25.15.16.40 for (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Wed, 25 Feb 2026 15:16:40 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1772061401; x=1772666201; 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=nJ8BmygwV5uM3x8177Nc6uLEekFys9eBWoDNCjse/DU=; b=ru12PnUm2Kx3MH3hhXBfLXu0z3h9ueAboQdKpKw2HM6d3jlgtQkAAvoNy51iOojnUA Gq9uZqucf2AjPhYhP9l8mgIfcGxpj5ufw36uCJg0FLIT9sZPLk0So6PFrdLkmHS+9QDY V+6tl/+t0RsAmEmoVzs5zk0OYN5SEJ9cOz02XhjzMkbibd9oxyq65vCdlYQFL6MlqhTv gIo48QdCXMQW5cNq0cp2YBT+lhgW3h5790ZtLZpVa80nffNLaJcwbxUmD/bQ5xtiYm6E 1O2alDzTuaPrBHtSge7zA1HDVyZ9ky4GuWO9mjXKYgrwAqEQEeGmwKuw0qlu1mgL4g+1 wpig== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1772061401; x=1772666201; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-gg:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to; bh=nJ8BmygwV5uM3x8177Nc6uLEekFys9eBWoDNCjse/DU=; b=RfsY0PAJph3xpT4Ne26iWWpdhtO7/gtRlwWczsxwvMFpiDZRVI7wxx6FklADXi2O/X mbLlo/OwlyYfOcOojhhDLZVYD1xqM5fI1T/dIc5kmVyyeqUlcqcf4/+Junn46/N73iu9 nyk5ULWXmjvyd7EihvFYVMGF7wHft9Nb/l5CCl6sQykHx7NL3GUEXtxUOqokr5W1Mem9 /JPtOfmNfQ8RsulATwj1gCtu2oUV9UadyYOfbxPSkg4QBnXK1iOSc7dIgqksuZbhgu7s wpzX0Q4ntyDaAyF9vrn6mOlpQOT6M9/axlgJz8EXabiBT/IdpQ2jd6sPW0OuMrQSbcvP YjPQ== X-Gm-Message-State: AOJu0YzRNJeqFeV49Exp37WohYOVVyKyC9B9zKjXyfHwWS2x1S5lGyuo a61ESufiz7VShsm/qzMa9MDVD5B6D3Jj0QwCByQBEFNUMazPAL2W+nS0XMjyAC2gi6ufJVTKreI uc2FtE6g= X-Gm-Gg: ATEYQzyHRuLprB8aG8AhZ2BTLcg9UfESJxc7RPrL+8xBLfoc2QbT7OgrdbRLdLl1dSi ufoZ715/x7eNG88vcKSpGKQccdDydtMeZwnxf/Jx9+z1rDyf5U9cs72VmTU2htYEhucTfX4oEK+ 4NnsaE1mziEkizVV/YOtBF2nfyf7qqJoqc1+utUZPrI8Vi6qJ5vpfBGMEZRvzF0PnS5AnFf6qs6 Th1OoklCeEBzzRZeAJHbMob6Q//r96tuObzbRBI0NY1gAlwqk0lVXR2olXi/3m3IZU3lbUHTc/B 5m6fu1sDBolSpQ1vzHfI5eVgpXX4S5GKyW3kAxxzYayxpb3vPzz5AaEakPLxMbA8ZYk+/R5q+cA zhoHcePCwa0WfF7LlmUBVH3rHJD9gDGw9zAC6N9tDv5szjFuEX1+zgiGBcvBdFQi1T3UotK5rgt cWEjWvhoI6FvjNxXgNuF9uRo/25oVqBk47xh59PvCpq0n8s+sjsFUQF41Rz1Lo1IhOv7opcn+R X-Received: by 2002:a05:600c:8287:b0:477:c478:46d7 with SMTP id 5b1f17b1804b1-483a95e205emr275774155e9.22.1772061401145; Wed, 25 Feb 2026 15:16:41 -0800 (PST) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PULL 22/70] target/sparc: Expose gdbstub registers to sparc32plus target Date: Thu, 26 Feb 2026 00:13:22 +0100 Message-ID: <20260225231411.96482-23-philmd@linaro.org> X-Mailer: git-send-email 2.52.0 In-Reply-To: <20260225231411.96482-1-philmd@linaro.org> References: <20260225231411.96482-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::332; envelope-from=philmd@linaro.org; helo=mail-wm1-x332.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: 1772061448781158500 Reviewed-by: Pierrick Bouvier Signed-off-by: Philippe Mathieu-Daud=C3=A9 Message-ID: <20260219191955.83815-15-philmd@linaro.org> --- configs/targets/sparc32plus-linux-user.mak | 1 + 1 file changed, 1 insertion(+) diff --git a/configs/targets/sparc32plus-linux-user.mak b/configs/targets/s= parc32plus-linux-user.mak index 3e6c72e793e..cf49c53ce44 100644 --- a/configs/targets/sparc32plus-linux-user.mak +++ b/configs/targets/sparc32plus-linux-user.mak @@ -5,5 +5,6 @@ TARGET_ABI_DIR=3Dsparc TARGET_SYSTBL_ABI=3Dcommon,32 TARGET_SYSTBL=3Dsyscall.tbl TARGET_BIG_ENDIAN=3Dy +TARGET_XML_FILES=3Dgdb-xml/sparc64-cpu.xml gdb-xml/sparc64-fpu.xml gdb-xml= /sparc64-cp0.xml TARGET_LONG_BITS=3D64 TARGET_NOT_USING_LEGACY_NATIVE_ENDIAN_API=3Dy --=20 2.52.0 From nobody Thu Apr 16 20:57:20 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=1772061743; cv=none; d=zohomail.com; s=zohoarc; b=fG41D4ASF7NLjyaYjEmCUNv70SchFQQVLCkHrNYZjYi6lLgdjCjtqKRvcQsfxLwP9LHjrk/wpMkft9Kc8OvLbk6xHauuG0CoY+WrpPGnbFd/EJ+gSbKl0pJXbeqJTEIP6qfYXIBOKD7ZshWwpcM9UlOOAMwONagA6Q/i3sEGNJE= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1772061743; h=Content-Type:Content-Transfer-Encoding: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:Cc; bh=t977xZqbfJju5KeWXmYpUEjv4JZpQzVsns+R3915olU=; b=jlbzXsBdcs485wRUDB5iMbybRh6vqPXvjNozbnFlERuogh8eyuhELLmKMN7b4KpPc5YbWY4YZvZNqWKdRT+y46DZ6HkSZW01+jAFLXvT0q1boJBaCbYPZPd/pS7Gis/eenRjBtcGfrQJOlBEc687ZS04HgXEuJisG0aqKDbxyBk= 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 1772061743532249.3998626223755; Wed, 25 Feb 2026 15:22:23 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1vvO86-0001Ef-Kt; Wed, 25 Feb 2026 18:17:18 -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 1vvO7i-0008JU-8o for qemu-devel@nongnu.org; Wed, 25 Feb 2026 18:16:54 -0500 Received: from mail-wm1-x341.google.com ([2a00:1450:4864:20::341]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1vvO7e-0002uU-67 for qemu-devel@nongnu.org; Wed, 25 Feb 2026 18:16:53 -0500 Received: by mail-wm1-x341.google.com with SMTP id 5b1f17b1804b1-48374014a77so2747745e9.3 for ; Wed, 25 Feb 2026 15:16: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 5b1f17b1804b1-483c3b3474dsm5043825e9.1.2026.02.25.15.16.46 for (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Wed, 25 Feb 2026 15:16:47 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1772061408; x=1772666208; 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=t977xZqbfJju5KeWXmYpUEjv4JZpQzVsns+R3915olU=; b=QsOffz6VMqYBRZIO1GwMuB4pLkC6kTEtVAs/LrAGbYGirxCkYbcpP6X2JpSe9i6qtl u/xA53PrkK3VOcOeDItNa3y/myTMoRIf2MH1LhAsvRo8qkvqyWUQ2d5NVoiHt23SJWj4 5aB0L3wCb3mqWPUluqlQ8EySH33/5Bw3CZ/NO8LzOll2/cQUT0AV5Ko72d9SFD8PHiqM NCovm7I9PxfN6MBkcl6HrfBzqWWNifck2Kzh3jMmJdpTCI6aYhWZoSYVLVSCZucZk6la hfOHsn98AOpGyeP/8djIc7r6MXSxM9kTVvazI0utwyeCmduN5sv3201co6qoCU7WjkeR 8L6w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1772061408; x=1772666208; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-gg:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to; bh=t977xZqbfJju5KeWXmYpUEjv4JZpQzVsns+R3915olU=; b=qb8yQXRDO9zLoSEXMyDnYXDNLue6ThtuxupkNE9CpEtBmtdadZJ/HD1XrXBCJGu3v0 Zm1+UmTjguwb2OL941NlglaZElgYCJ+z6QOU/KWiBvR1aAt3/CjcfqHuAH76+AwsnJ3g chxn+iASkNNuL+ZMFF6C1Hegon4WORL8oUO/ZLTAn5gu97RwDCcj7q8BUwm/KgebWiIk bx1haZSp7PQVkQ0UXWhOI+XYlRu+8YpJEcjTMazCjZateUA6dalCbZaRbnKZohdvTBDp jSaGDvtu6q346TSrTnG7SdD5sozeamQxCcu75ytHyyQ4Hfbfpp66Jjfc5b9ujplC6N/l v4yQ== X-Gm-Message-State: AOJu0YzVNHYpH1bdrfM4rKxL14HGJNNsR1/WwRCWLNtNe6/4rrk+EspF a+jsWTPL7J4jgJSfiBY30JLMnF/tCvXDyy6TgrDpUynvHuXY15BXtaxngzHpHMn/ntJ+BqR9h+9 R61jDmmE= X-Gm-Gg: ATEYQzwJdV/Cte4i99vuhjFLH2s5RPSgTlOkh7Sz9PHvCuKRKB/tp2qV+5CUdp/3w56 tMUQjobRzB4jKUX5Iir/QJks91uQsmjMUM73twJYHm9km0EPptPaJvz1LagfvpJW7ohRWLLnzyP 6j4PgZpX0vf9x4sTSs38z5SQiFEC6jjE6mWY1eO6A0f2pnY1e8U7WrVJI/1jQHvF0QEBhFjm/1x Sld+O1UcqGYWe84XPV9Kj5+XxxhhcXmEafagV93ThzgHpAGTcfZnRGhU2GEy3W3lI3uq7e8r3ka IlCj+lndGieUZpcet7TRIBw2m4EImGEZUAeXCf3v4vm0dBE6Toh9UYE9YlpDkRji1Vd0a0zCSE6 y8KVzdDcbq5LaS45LFSSrqnLi1qYiJcQPUnenFos7Tf16im+2mbX60rY+6dXA1ix06gT9wFBL3u zMhC2AnGeb0sisk9y87k18pqQcB6UD8SGLnZdSWbABG2qfvxq4rhz6KIrZ3qLmr6dz0JwqoqFu X-Received: by 2002:a05:600c:4f4b:b0:477:a54a:acba with SMTP id 5b1f17b1804b1-483a95e1f34mr313289545e9.17.1772061407748; Wed, 25 Feb 2026 15:16:47 -0800 (PST) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PULL 23/70] target/sparc: Expose gdbstub registers to sparc32 targets Date: Thu, 26 Feb 2026 00:13:23 +0100 Message-ID: <20260225231411.96482-24-philmd@linaro.org> X-Mailer: git-send-email 2.52.0 In-Reply-To: <20260225231411.96482-1-philmd@linaro.org> References: <20260225231411.96482-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::341; envelope-from=philmd@linaro.org; helo=mail-wm1-x341.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: 1772061744038158500 Import gdb-xml/sparc32-{cpu,fpu,cp0}.xml from mainstream binutils, tag 'binutils-2_46', found in the gdb/features/sparc/folder [*]. Register them by setting the CPUClass::gdb_core_xml_file field and calling gdb_register_coprocessor() in sparc_cpu_register_gdb_regs(). [*] https://sourceware.org/git/?p=3Dbinutils-gdb.git;a=3Dtree;f=3Dgdb/featu= res/sparc;hb=3Drefs/tags/binutils-2_46 Reviewed-by: Pierrick Bouvier Signed-off-by: Philippe Mathieu-Daud=C3=A9 Message-ID: <20260219191955.83815-16-philmd@linaro.org> --- configs/targets/sparc-linux-user.mak | 1 + configs/targets/sparc-softmmu.mak | 1 + target/sparc/cpu.c | 2 +- target/sparc/gdbstub.c | 13 +++++---- gdb-xml/sparc32-cp0.xml | 18 ++++++++++++ gdb-xml/sparc32-cpu.xml | 42 ++++++++++++++++++++++++++++ gdb-xml/sparc32-fpu.xml | 42 ++++++++++++++++++++++++++++ 7 files changed, 113 insertions(+), 6 deletions(-) create mode 100644 gdb-xml/sparc32-cp0.xml create mode 100644 gdb-xml/sparc32-cpu.xml create mode 100644 gdb-xml/sparc32-fpu.xml diff --git a/configs/targets/sparc-linux-user.mak b/configs/targets/sparc-l= inux-user.mak index d3f0716ca2d..01446e28783 100644 --- a/configs/targets/sparc-linux-user.mak +++ b/configs/targets/sparc-linux-user.mak @@ -2,5 +2,6 @@ TARGET_ARCH=3Dsparc TARGET_SYSTBL_ABI=3Dcommon,32 TARGET_SYSTBL=3Dsyscall.tbl TARGET_BIG_ENDIAN=3Dy +TARGET_XML_FILES=3Dgdb-xml/sparc32-cpu.xml gdb-xml/sparc32-fpu.xml gdb-xml= /sparc32-cp0.xml TARGET_LONG_BITS=3D32 TARGET_NOT_USING_LEGACY_NATIVE_ENDIAN_API=3Dy diff --git a/configs/targets/sparc-softmmu.mak b/configs/targets/sparc-soft= mmu.mak index c4c38946d54..ed846735f41 100644 --- a/configs/targets/sparc-softmmu.mak +++ b/configs/targets/sparc-softmmu.mak @@ -1,5 +1,6 @@ TARGET_ARCH=3Dsparc TARGET_BIG_ENDIAN=3Dy +TARGET_XML_FILES=3Dgdb-xml/sparc32-cpu.xml gdb-xml/sparc32-fpu.xml gdb-xml= /sparc32-cp0.xml TARGET_LONG_BITS=3D32 TARGET_NOT_USING_LEGACY_LDST_PHYS_API=3Dy TARGET_NOT_USING_LEGACY_NATIVE_ENDIAN_API=3Dy diff --git a/target/sparc/cpu.c b/target/sparc/cpu.c index d82f858efb1..1493336e7a2 100644 --- a/target/sparc/cpu.c +++ b/target/sparc/cpu.c @@ -1095,7 +1095,7 @@ static void sparc_cpu_class_init(ObjectClass *oc, con= st void *data) #if defined(TARGET_SPARC64) && !defined(TARGET_ABI32) cc->gdb_core_xml_file =3D "sparc64-cpu.xml"; #else - cc->gdb_num_core_regs =3D 72; + cc->gdb_core_xml_file =3D "sparc32-cpu.xml"; #endif cc->tcg_ops =3D &sparc_tcg_ops; } diff --git a/target/sparc/gdbstub.c b/target/sparc/gdbstub.c index b5b1494950a..ed52e521dcc 100644 --- a/target/sparc/gdbstub.c +++ b/target/sparc/gdbstub.c @@ -43,7 +43,6 @@ int sparc_cpu_gdb_read_register(CPUState *cs, GByteArray = *mem_buf, int n) return 0; } =20 -__attribute__((unused)) static int sparc_fpu_gdb_read_register(CPUState *cs, GByteArray *mem_buf, = int n) { CPUSPARCState *env =3D cpu_env(cs); @@ -79,7 +78,6 @@ static int sparc_fpu_gdb_read_register(CPUState *cs, GByt= eArray *mem_buf, int n) return 0; } =20 -__attribute__((unused)) static int sparc_cp0_gdb_read_register(CPUState *cs, GByteArray *mem_buf, = int n) { CPUSPARCState *env =3D cpu_env(cs); @@ -154,7 +152,6 @@ int sparc_cpu_gdb_write_register(CPUState *cs, uint8_t = *mem_buf, int n) #endif } =20 -__attribute__((unused)) static int sparc_fpu_gdb_write_register(CPUState *cs, uint8_t *mem_buf, in= t n) { CPUSPARCState *env =3D cpu_env(cs); @@ -197,7 +194,6 @@ static int sparc_fpu_gdb_write_register(CPUState *cs, u= int8_t *mem_buf, int n) #endif } =20 -__attribute__((unused)) static int sparc_cp0_gdb_write_register(CPUState *cs, uint8_t *mem_buf, in= t n) { CPUSPARCState *env =3D cpu_env(cs); @@ -271,7 +267,14 @@ static int sparc_cp0_gdb_write_register(CPUState *cs, = uint8_t *mem_buf, int n) void sparc_cpu_register_gdb_regs(CPUState *cs) { #if defined(TARGET_ABI32) || !defined(TARGET_SPARC64) - /* Not yet supported */ + gdb_register_coprocessor(cs, sparc_fpu_gdb_read_register, + sparc_fpu_gdb_write_register, + gdb_find_static_feature("sparc32-fpu.xml"), + 0); + gdb_register_coprocessor(cs, sparc_cp0_gdb_read_register, + sparc_cp0_gdb_write_register, + gdb_find_static_feature("sparc32-cp0.xml"), + 0); #else gdb_register_coprocessor(cs, sparc_fpu_gdb_read_register, sparc_fpu_gdb_write_register, diff --git a/gdb-xml/sparc32-cp0.xml b/gdb-xml/sparc32-cp0.xml new file mode 100644 index 00000000000..eacd89cf3b5 --- /dev/null +++ b/gdb-xml/sparc32-cp0.xml @@ -0,0 +1,18 @@ + + + + + + + + + + + + + + diff --git a/gdb-xml/sparc32-cpu.xml b/gdb-xml/sparc32-cpu.xml new file mode 100644 index 00000000000..242295c886e --- /dev/null +++ b/gdb-xml/sparc32-cpu.xml @@ -0,0 +1,42 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/gdb-xml/sparc32-fpu.xml b/gdb-xml/sparc32-fpu.xml new file mode 100644 index 00000000000..38217ca7a92 --- /dev/null +++ b/gdb-xml/sparc32-fpu.xml @@ -0,0 +1,42 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + --=20 2.52.0 From nobody Thu Apr 16 20:57:20 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=1772061473; cv=none; d=zohomail.com; s=zohoarc; b=nclBEVTqm043E8PkGGPAgPWUxj7HXgrPBURM9H8hD1wHu2bcaZfRtMCzjPCk0UsG3EnRYrqHGbi/q40rdUGPjasuAhW2d/DhLOK2pm5ZeY15OamR6IrWLmzAYHaV1sWHVzOJaXZT4Ca+c9SsVeW7dLxbmT+08IKmsdsI/NwPTCk= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1772061473; h=Content-Type:Content-Transfer-Encoding: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:Cc; bh=8d2psbmGyOVphBVX1NfJBGYgRY3I8LcfiQSJmuK6PWg=; b=YeBJ99oYnGF+CE536FXQkIUyVHLU2g+8Otqdjb0MENxQpxMPAlYU6G4lQaG9eKLy1f4X10bjsBOa8yisebLFo59kRV351I0YYXX38riLWX7v+3A9TPa/5lJo3m5xwfh04p9KaFDO4xuTGyvUEtYZMYedd+TQ+3hDipZ0fR1eNPk= 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 1772061473104345.0095499234844; Wed, 25 Feb 2026 15:17:53 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1vvO87-0001OP-NX; Wed, 25 Feb 2026 18:17:19 -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 1vvO7m-0000E6-Bb for qemu-devel@nongnu.org; Wed, 25 Feb 2026 18:17:04 -0500 Received: from mail-wm1-x32e.google.com ([2a00:1450:4864:20::32e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1vvO7k-0002uy-DE for qemu-devel@nongnu.org; Wed, 25 Feb 2026 18:16:57 -0500 Received: by mail-wm1-x32e.google.com with SMTP id 5b1f17b1804b1-48375f10628so1975835e9.1 for ; Wed, 25 Feb 2026 15:16:55 -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-483bd70e692sm98457885e9.7.2026.02.25.15.16.53 for (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Wed, 25 Feb 2026 15:16:53 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1772061414; x=1772666214; 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=8d2psbmGyOVphBVX1NfJBGYgRY3I8LcfiQSJmuK6PWg=; b=a9RM7G5XslP1qWzIutunfr0y0YwI7RZuew7Qn3HHn5yFFow9RbAdPKe4EL77g8nlHX 7tRdrf7sczKpm91Vb2GOtJWZxed+aE4bPJhBq+oGu9YHmxKjVCHxuXqhDD5jITSTJLq3 QmyFxHOvyvmo7tRE4sD1kJp1VPx7mQXXUlymHepXJbvWhIcb8BF1lG7aVa+8k4nW70wT N67QQUHgGGmH2uFt8lgydhD7yYvuWHNvruXQUOn5goedCbvEt61E3rkD5jB6zNA3DQja kHPVFQ5SqG9DkuH0tH6BDvEyP0heSBOHE/PC4om5ROVncr/xBk4k15E+1J6LSONRZwK2 gT4A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1772061414; x=1772666214; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-gg:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to; bh=8d2psbmGyOVphBVX1NfJBGYgRY3I8LcfiQSJmuK6PWg=; b=oB4RE1vVEujkPAXHhklw9LxZeOGNQMPqCY031dmqzRgYKzyt0V6mODvJ8r4ncfzHHY 9PhyHVyeWRFd3JlT+QTKRFYj9vzLriX6SjxgwpP1eV9qMoAuvhlS0MJaVeFESckC2ZsN wLlWBI3lqCeGJp70Rw+tUfQdV/HlCI5rHy63gxELxOge7UMoZMcZZtLFuQ8pBYr2FAaH HAmLm8fo78wN/fMHYIkpZ3M++YixU8WEjdwxYH/z4O9EHqiGLy4yd3i6RFQo+xdAzWm4 1dmwPcQ4oWLYth1Rp52YcVjB2LoOLuQT2I0odp0Z5o45B0LLpXQG9HUWnVDAdIZ3NoEv XIKw== X-Gm-Message-State: AOJu0YwAxdf46zqadrqbx9VYVPZefGgGznFnURyCT+4xmUPQUyWTP0eN C8g7m5QbPbR82hTk4SGoeXTmOl+YMh44sGJ2ANsdlJpCrW6FbO6ruCUUakWv2FlaL7iJBs2E+7U 8WY3ZV4E= X-Gm-Gg: ATEYQzyGMv6edfuOxPRHe6aCvDqxzgbc0sFzcMcmzYJP5RUmvRfrLPrzL3ZFd2TyQkH HOVjsmkuLkYBZVMScy+PmEUIbzj3+lIGdgi/07nan717wAGGjks43drIdsQ46rFszt5pSdSDlsp GC/rCplIrWJsMU/l28XFWAKgVe+UMqWWokt9/sl5LUk2V1kBEt/85LkwGe0GDOs5l8oIoIjkLtA 6P042jFAh4zQHUE9Jx2XyagEU/UIC+ExknUEJuE3R0vF4SqbDDbekoXpS4AZn0N2LeXhjyvBL4/ N9kT2DeKqSpXGZDbyWeG3aXB2RNsbF2O7UGvX4f5IYeK4LdSN6ZRXxoXZvPcH7yDiM8GIJBPUbO hkoy3uWmQZ35c7Gid41qnLSOlX+RUbAI/vT3A+ZIA8pizJL/Cc1erfJQuCmzhbrnlTG2WvhIDgQ I3d8vG8uasuiTBKZ5omWHCZg0xGrI62ZNGEbAJiPU7BYUknW0yC1Dt7oejuDV7g9aagq2hhFJo X-Received: by 2002:a05:600c:4f94:b0:480:4a4f:c36f with SMTP id 5b1f17b1804b1-483a95e2488mr288125315e9.21.1772061414293; Wed, 25 Feb 2026 15:16:54 -0800 (PST) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PULL 24/70] monitor/hmp: Handle gdb-xml exposed registers via gdb_get_register() Date: Thu, 26 Feb 2026 00:13:24 +0100 Message-ID: <20260225231411.96482-25-philmd@linaro.org> X-Mailer: git-send-email 2.52.0 In-Reply-To: <20260225231411.96482-1-philmd@linaro.org> References: <20260225231411.96482-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::32e; envelope-from=philmd@linaro.org; helo=mail-wm1-x32e.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: 1772061474936158500 Implement the gdb_get_register() helper and call it before the regular get_monitor_def() one. Registers is exposed via the GDB XML files will be directly handled, possibily allowing new registers added to XML files to be automatically accessible in QEMU monitor. All targets having GDB XML files can now be used within the monitor. For example with Loongarch, before: $ qemu-system-loongarch64 -M virt -S -monitor stdio QEMU 10.2.0 monitor - type 'help' for more information (qemu) info registers CPU#0 PC=3D000000001c000000 FCSR0 0x00000000 ... (qemu) p/x $pc unknown register Try "help p" for more information (qemu) and after: $ ./qemu-system-loongarch64 -M virt -S -monitor stdio QEMU 10.2.50 monitor - type 'help' for more information (qemu) p/x $pc 0x1c000000 (qemu) Similarly RISC-V: QEMU 10.2.0 monitor - type 'help' for more information (qemu) p/x $pc unknown register Try "help p" for more information VS QEMU 10.2.50 monitor - type 'help' for more information (qemu) p/x $pc 0x1000 (qemu) Reviewed-by: Dr. David Alan Gilbert Signed-off-by: Philippe Mathieu-Daud=C3=A9 Message-ID: <20260219191955.83815-17-philmd@linaro.org> --- monitor/hmp.c | 49 ++++++++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 46 insertions(+), 3 deletions(-) diff --git a/monitor/hmp.c b/monitor/hmp.c index 0a5bbf82197..0e5913fabb1 100644 --- a/monitor/hmp.c +++ b/monitor/hmp.c @@ -27,14 +27,18 @@ #include "hw/core/qdev.h" #include "monitor-internal.h" #include "monitor/hmp.h" +#include "monitor/hmp-target.h" #include "qobject/qdict.h" #include "qobject/qnum.h" +#include "qemu/bswap.h" #include "qemu/config-file.h" #include "qemu/ctype.h" #include "qemu/cutils.h" #include "qemu/log.h" #include "qemu/option.h" +#include "qemu/target-info.h" #include "qemu/units.h" +#include "exec/gdbstub.h" #include "system/block-backend.h" #include "trace.h" =20 @@ -306,6 +310,46 @@ void hmp_help_cmd(Monitor *mon, const char *name) free_cmdline_args(args, nb_args); } =20 +/* + * Set @pval to the value in the register identified by @name. + * return %true if the register is found, %false otherwise. + */ +static bool gdb_get_register(Monitor *mon, int64_t *pval, const char *name) +{ + g_autoptr(GArray) regs =3D NULL; + CPUState *cs =3D mon_get_cpu(mon); + + if (cs =3D=3D NULL) { + return false; + } + + regs =3D gdb_get_register_list(cs); + + for (int i =3D 0; i < regs->len; i++) { + GDBRegDesc *reg =3D &g_array_index(regs, GDBRegDesc, i); + g_autoptr(GByteArray) buf =3D NULL; + int reg_size; + + if (!reg->name || g_strcmp0(name, reg->name)) { + continue; + } + + buf =3D g_byte_array_new(); + reg_size =3D gdb_read_register(cs, buf, reg->gdb_reg); + if (reg_size > sizeof(*pval)) { + return false; + } + + if (target_big_endian()) { + *pval =3D ldn_be_p(buf->data, reg_size); + } else { + *pval =3D ldn_le_p(buf->data, reg_size); + } + return true; + } + return false; +} + /*******************************************************************/ =20 static const char *pch; @@ -338,7 +382,6 @@ static int64_t expr_unary(Monitor *mon) { int64_t n; char *p; - int ret; =20 switch (*pch) { case '+': @@ -393,8 +436,8 @@ static int64_t expr_unary(Monitor *mon) pch++; } *q =3D 0; - ret =3D get_monitor_def(mon, ®, buf); - if (ret < 0) { + if (!gdb_get_register(mon, ®, buf) + && get_monitor_def(mon, ®, buf) < 0) { expr_error(mon, "unknown register"); } n =3D reg; --=20 2.52.0 From nobody Thu Apr 16 20:57:20 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=1772061443; cv=none; d=zohomail.com; s=zohoarc; b=T5Lf1uFxNHii/ZbXG2kV+ndDsqCv6Ypco2Mwrd753144xxLKy1z2B4wvh3t3qny5qUtLRsxchWTD6wyNahOsO8IGWxlo+12OJf+7r+fiYMJaJXcpX7XTS3b26kn8Q5TFl3vFoJIWGCSUVCiZnd/mhaGOQbtackK374jxVojBVUI= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1772061443; h=Content-Type:Content-Transfer-Encoding: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:Cc; bh=lSNlwJuPXGszeQdnTHeG7EmOBqF5JmRNaaxT9HlYMjc=; b=HL3ETmyD7iXS3g2dqA9ELkm3Y2xqszjNCRT7aAyFDt7TgZk7NxiT7Xz/7w0LjQU1I+avlYBN90pjmjHxXMOxm4ZlxBELsnE5PkAFqyiar1puhXmOettPrzs2C2rPmwfcqUskqyQT2GRIojU0/QMeBnM68e6lyKbdjWz+4dYAmOo= 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 1772061443066960.4184746936254; Wed, 25 Feb 2026 15:17:23 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1vvO84-0000wL-Hv; Wed, 25 Feb 2026 18:17:16 -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 1vvO7u-0000Pa-8l for qemu-devel@nongnu.org; Wed, 25 Feb 2026 18:17:07 -0500 Received: from mail-wr1-x42c.google.com ([2a00:1450:4864:20::42c]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1vvO7r-0002vT-EX for qemu-devel@nongnu.org; Wed, 25 Feb 2026 18:17:05 -0500 Received: by mail-wr1-x42c.google.com with SMTP id ffacd0b85a97d-4398913af88so193372f8f.2 for ; Wed, 25 Feb 2026 15:17:03 -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-43970c00768sm35490761f8f.10.2026.02.25.15.17.00 for (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Wed, 25 Feb 2026 15:17:00 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1772061422; x=1772666222; 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=lSNlwJuPXGszeQdnTHeG7EmOBqF5JmRNaaxT9HlYMjc=; b=RJ4+XRZFo+iMferKtM1YZCI/A920HK44hHKIOsVTm01eGypXrSDshnHT5dIK4BihAM HZPqb0gwWKICoG6Av75ULMQwyNPfQXKHDTal3Cbe1X0THUWYC0pGHdOZvjiD1NIMyze6 TkZUWmWIkC1gBgUGIaT1pilJ1ILweZNruD0qO4XN1uovNvYv7CYtxP1aMFx/iFc1h1Bk cMWnxxOxTu9T/gP3UGxKRnZDf6MpIUUfTPwmuP7neY/kO4CMPewCaYfHjykmSMikIrk/ hLEdUJssXN+XXMg78Q0sTZmA9Am4lvf/MjzMvnVhL87cxeI8ubLwcn2gaA9pK7elXBNJ tFSw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1772061422; x=1772666222; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-gg:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to; bh=lSNlwJuPXGszeQdnTHeG7EmOBqF5JmRNaaxT9HlYMjc=; b=n49W8pV8gO2R7mjJ6bCd4CV7MI73fmePCZ7l0X0Y3Sx/BNgsMJ17AhNliXlrsk003F Gs4zSB73MxNfiUAG6p5yZ/0gnEpKtLdliB1CKvPa1/+eY/6fFkSGqKgk8w127mRnYRLq 6IoU9aIDsoWefHlM62nsLSdjudgfTG7dSFuOFJZYotE371u77cGnCACoIsArJcNnaMUJ ++5SQMlb6yPgzNMATO/s6FD1kRAi9NLOsbSTDu9Vg2wLKrKupsmLVYMnAiicjtsvu+n8 qV0cprAw7DwcLBH9pJ1nsAaKO4FJr3grPg199Zgd+sWn35mIO5kx1r1iRg213JU3//wT Obqg== X-Gm-Message-State: AOJu0Yw9nEzDiRaR9xJDqd1bxXZ0dXMJpT1zfvQlG15NwFezSpBkV1Gr wHrTXCVX6DeWq8ZFe6EL8e5qWT0udmpj+izBofEQL9UzwAA1T0WTeHjH8KrYxCIo1yHeeWwuJLZ +J+7YU3w= X-Gm-Gg: ATEYQzz0gE2NFpkXLuHUWTNby661EMqDxT+vkFe0+mnzFHiuVsOvkiGbz1eInuM029G o1yVQI5vCECvfZq4AF9Z77Uk0O/+JJxqPjRyJwx4PmDIYH7z/f7cG7TD3e7OzFz/d50bTMQwXJG t7F5mEVM/wBT254CrcZHwHXfjjGdLjW54HP3evqBDX40Yghoqs5EPGbFb8IntQ7Gk/ZS+s0rowu UNiYdwozQuTY4raJKXkUrljzKaMI5A8YQAviMFTESAiTp6fHM2+4pUkqq8V8y+qbRSeLYjoF7SI Rfn3KPWg4NEPBAcNaKMW935BS4CsLwIadASy0e5njMK+u0lK8BKQxh3VO0XBhi4r3CIhUzTO6wC 3d+rowRRNh76qIgnGL68R/8vMOrXDMCMSzxwrJtKZ9iURIULzVEeIGVibFkWNEYIdrK3ZuhwZ9c Sbc6+u8LFmE54vdPXqUmzIktFm1vuMJeh/uhLQWh7xpe31ni8debli1wZ/Kt3zovBGdkUCCiSH X-Received: by 2002:a05:6000:228a:b0:436:38a4:2423 with SMTP id ffacd0b85a97d-439942a847dmr4056806f8f.22.1772061421559; Wed, 25 Feb 2026 15:17:01 -0800 (PST) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PULL 25/70] target/sparc: Remove MonitorDef register entries available via gdbstub Date: Thu, 26 Feb 2026 00:13:25 +0100 Message-ID: <20260225231411.96482-26-philmd@linaro.org> X-Mailer: git-send-email 2.52.0 In-Reply-To: <20260225231411.96482-1-philmd@linaro.org> References: <20260225231411.96482-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::42c; envelope-from=philmd@linaro.org; helo=mail-wr1-x42c.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: 1772061444821158500 All these registers are already provided by via gdbstub parsed XML and handler by the gdb_get_register() helper in the monitor/hmp.c file. Remove as now unreachable code. Reviewed-by: Pierrick Bouvier Signed-off-by: Philippe Mathieu-Daud=C3=A9 Message-ID: <20260219191955.83815-18-philmd@linaro.org> --- target/sparc/monitor.c | 107 ----------------------------------------- 1 file changed, 107 deletions(-) diff --git a/target/sparc/monitor.c b/target/sparc/monitor.c index 73f15aa272d..a60671a60a4 100644 --- a/target/sparc/monitor.c +++ b/target/sparc/monitor.c @@ -39,114 +39,8 @@ void hmp_info_tlb(Monitor *mon, const QDict *qdict) dump_mmu(env1); } =20 -#ifndef TARGET_SPARC64 -static target_long monitor_get_psr(Monitor *mon, const struct MonitorDef *= md, - int val) -{ - CPUArchState *env =3D mon_get_cpu_env(mon); - - return cpu_get_psr(env); -} -#endif - -static target_long monitor_get_reg(Monitor *mon, const struct MonitorDef *= md, - int val) -{ - CPUArchState *env =3D mon_get_cpu_env(mon); - return env->regwptr[val]; -} - const MonitorDef monitor_defs[] =3D { - { "g0", offsetof(CPUSPARCState, gregs[0]) }, - { "g1", offsetof(CPUSPARCState, gregs[1]) }, - { "g2", offsetof(CPUSPARCState, gregs[2]) }, - { "g3", offsetof(CPUSPARCState, gregs[3]) }, - { "g4", offsetof(CPUSPARCState, gregs[4]) }, - { "g5", offsetof(CPUSPARCState, gregs[5]) }, - { "g6", offsetof(CPUSPARCState, gregs[6]) }, - { "g7", offsetof(CPUSPARCState, gregs[7]) }, - { "o0", 0, monitor_get_reg }, - { "o1", 1, monitor_get_reg }, - { "o2", 2, monitor_get_reg }, - { "o3", 3, monitor_get_reg }, - { "o4", 4, monitor_get_reg }, - { "o5", 5, monitor_get_reg }, - { "o6", 6, monitor_get_reg }, - { "o7", 7, monitor_get_reg }, - { "l0", 8, monitor_get_reg }, - { "l1", 9, monitor_get_reg }, - { "l2", 10, monitor_get_reg }, - { "l3", 11, monitor_get_reg }, - { "l4", 12, monitor_get_reg }, - { "l5", 13, monitor_get_reg }, - { "l6", 14, monitor_get_reg }, - { "l7", 15, monitor_get_reg }, - { "i0", 16, monitor_get_reg }, - { "i1", 17, monitor_get_reg }, - { "i2", 18, monitor_get_reg }, - { "i3", 19, monitor_get_reg }, - { "i4", 20, monitor_get_reg }, - { "i5", 21, monitor_get_reg }, - { "i6", 22, monitor_get_reg }, - { "i7", 23, monitor_get_reg }, - { "pc", offsetof(CPUSPARCState, pc) }, - { "npc", offsetof(CPUSPARCState, npc) }, - { "y", offsetof(CPUSPARCState, y) }, -#ifndef TARGET_SPARC64 - { "psr", 0, &monitor_get_psr, }, - { "wim", offsetof(CPUSPARCState, wim) }, -#endif - { "tbr", offsetof(CPUSPARCState, tbr) }, - { "fsr", offsetof(CPUSPARCState, fsr) }, - { "f0", offsetof(CPUSPARCState, fpr[0].l.upper) }, - { "f1", offsetof(CPUSPARCState, fpr[0].l.lower) }, - { "f2", offsetof(CPUSPARCState, fpr[1].l.upper) }, - { "f3", offsetof(CPUSPARCState, fpr[1].l.lower) }, - { "f4", offsetof(CPUSPARCState, fpr[2].l.upper) }, - { "f5", offsetof(CPUSPARCState, fpr[2].l.lower) }, - { "f6", offsetof(CPUSPARCState, fpr[3].l.upper) }, - { "f7", offsetof(CPUSPARCState, fpr[3].l.lower) }, - { "f8", offsetof(CPUSPARCState, fpr[4].l.upper) }, - { "f9", offsetof(CPUSPARCState, fpr[4].l.lower) }, - { "f10", offsetof(CPUSPARCState, fpr[5].l.upper) }, - { "f11", offsetof(CPUSPARCState, fpr[5].l.lower) }, - { "f12", offsetof(CPUSPARCState, fpr[6].l.upper) }, - { "f13", offsetof(CPUSPARCState, fpr[6].l.lower) }, - { "f14", offsetof(CPUSPARCState, fpr[7].l.upper) }, - { "f15", offsetof(CPUSPARCState, fpr[7].l.lower) }, - { "f16", offsetof(CPUSPARCState, fpr[8].l.upper) }, - { "f17", offsetof(CPUSPARCState, fpr[8].l.lower) }, - { "f18", offsetof(CPUSPARCState, fpr[9].l.upper) }, - { "f19", offsetof(CPUSPARCState, fpr[9].l.lower) }, - { "f20", offsetof(CPUSPARCState, fpr[10].l.upper) }, - { "f21", offsetof(CPUSPARCState, fpr[10].l.lower) }, - { "f22", offsetof(CPUSPARCState, fpr[11].l.upper) }, - { "f23", offsetof(CPUSPARCState, fpr[11].l.lower) }, - { "f24", offsetof(CPUSPARCState, fpr[12].l.upper) }, - { "f25", offsetof(CPUSPARCState, fpr[12].l.lower) }, - { "f26", offsetof(CPUSPARCState, fpr[13].l.upper) }, - { "f27", offsetof(CPUSPARCState, fpr[13].l.lower) }, - { "f28", offsetof(CPUSPARCState, fpr[14].l.upper) }, - { "f29", offsetof(CPUSPARCState, fpr[14].l.lower) }, - { "f30", offsetof(CPUSPARCState, fpr[15].l.upper) }, - { "f31", offsetof(CPUSPARCState, fpr[15].l.lower) }, #ifdef TARGET_SPARC64 - { "f32", offsetof(CPUSPARCState, fpr[16]) }, - { "f34", offsetof(CPUSPARCState, fpr[17]) }, - { "f36", offsetof(CPUSPARCState, fpr[18]) }, - { "f38", offsetof(CPUSPARCState, fpr[19]) }, - { "f40", offsetof(CPUSPARCState, fpr[20]) }, - { "f42", offsetof(CPUSPARCState, fpr[21]) }, - { "f44", offsetof(CPUSPARCState, fpr[22]) }, - { "f46", offsetof(CPUSPARCState, fpr[23]) }, - { "f48", offsetof(CPUSPARCState, fpr[24]) }, - { "f50", offsetof(CPUSPARCState, fpr[25]) }, - { "f52", offsetof(CPUSPARCState, fpr[26]) }, - { "f54", offsetof(CPUSPARCState, fpr[27]) }, - { "f56", offsetof(CPUSPARCState, fpr[28]) }, - { "f58", offsetof(CPUSPARCState, fpr[29]) }, - { "f60", offsetof(CPUSPARCState, fpr[30]) }, - { "f62", offsetof(CPUSPARCState, fpr[31]) }, { "asi", offsetof(CPUSPARCState, asi) }, { "pstate", offsetof(CPUSPARCState, pstate) }, { "cansave", offsetof(CPUSPARCState, cansave) }, @@ -154,7 +48,6 @@ const MonitorDef monitor_defs[] =3D { { "otherwin", offsetof(CPUSPARCState, otherwin) }, { "wstate", offsetof(CPUSPARCState, wstate) }, { "cleanwin", offsetof(CPUSPARCState, cleanwin) }, - { "fprs", offsetof(CPUSPARCState, fprs), NULL, MD_I32 }, #endif { NULL }, }; --=20 2.52.0 From nobody Thu Apr 16 20:57:20 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=1772061465; cv=none; d=zohomail.com; s=zohoarc; b=hgpomMYIj/BRlQ9Pz/qCT9g0V7QQOLhrwneVqsOzN/7FUZQiu83Y3lltaEaVyA+/pHW/XDSoI1ljy3T2I3aAdW58xI76UdLwiiiCO94NAKLzmLCxneP1G+Um1c90Ex0H4pZc20u8GA2I6IR0MHTdf3N6JgEL3prGft5MWNikHK0= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1772061465; h=Content-Type:Content-Transfer-Encoding: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:Cc; bh=rE+HjiUTPQ9o90Zshj3SAz4DZQ3CFdCGHSGhweXU4Pk=; b=KxnW8Y5EXsGwhHbEOVwHdHj1LlEns+YAqmjXuVKMz7CLcFK3pu1ydi5+UEplnsi1PrzWvF0Nq27VSG3Y840tM5VgfqkiCtOS5FrpzQKUFjbzfvBPoMIdwXNVgAks5i8W4nWs/tWxfdtcJNfGijTAlRMEvRd3a4mlhW37OSjiZTM= 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 1772061465697934.4695750061551; Wed, 25 Feb 2026 15:17:45 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1vvO86-0001D3-E9; Wed, 25 Feb 2026 18:17:18 -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 1vvO7z-0000bP-OA for qemu-devel@nongnu.org; Wed, 25 Feb 2026 18:17:13 -0500 Received: from mail-wm1-x32b.google.com ([2a00:1450:4864:20::32b]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1vvO7y-0002vn-0c for qemu-devel@nongnu.org; Wed, 25 Feb 2026 18:17:11 -0500 Received: by mail-wm1-x32b.google.com with SMTP id 5b1f17b1804b1-48374014a77so2749575e9.3 for ; Wed, 25 Feb 2026 15:17:09 -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-483c3addb3asm4536535e9.0.2026.02.25.15.17.07 for (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Wed, 25 Feb 2026 15:17:07 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1772061428; x=1772666228; 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=rE+HjiUTPQ9o90Zshj3SAz4DZQ3CFdCGHSGhweXU4Pk=; b=Ad+ENI3uGIfRAHejLjtM3ofB7ErM6+B+qBthJM6R1tswSp+fJKFzwmITx4WmvXfmCy sryii3QwMnPRAYs6Ijls1ZK4jjrJOETdY3RJhKebEp2GcnqhLMDV6k6Zyw0vmBzEF4sz uY5qoFaB9ToZrhyJLGpW/+DCRdmVlP79xCd0Uj43Oi1Q8VBPcfkaMeqJkXiW2Zo0Mcag Ao2Vv6a52rOorZAjPw3PQbD/dzr6QnGe69lIq1AmmrK7Nsdcb8B8q/e0G/01npk2mGP3 Axx440gJAs5FKn2NI4IvJSFpmwC3iHj7cVcOxwrPqBTAk8+02pk/n3JNAXN0pFc8jPvG QaJg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1772061428; x=1772666228; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-gg:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to; bh=rE+HjiUTPQ9o90Zshj3SAz4DZQ3CFdCGHSGhweXU4Pk=; b=TSAbeqgq0zXM+/KyJY4/vJMBh8U1E1jqsg32jg9Urv9IG3xPWR93sMV1oqbufYHSGR naDgHd4zx5s6ofapNHA3IVqraJdTEMtMestMGPeMN5D/MbC8b1E2M4q5QnBEzt7EgJzS /6JoktKroQeAxqou/2OFkNDrngKNO135VGCTNI76ktVaUo6gHJJTI9XWzJhO1O+ETH2F RkrY+oHsTxJ42K9ZM+YKrQwwo//S4xq2hquCscBtERh03YI7iAUtRuW6bTm+bNt5Efus CwWGxzmQRlvlL1R2au4NqcYzUvWWkqKEH+wyoV3dDNuBE4ZlXJIKx7uCFvWjCVVaOsNX qfnA== X-Gm-Message-State: AOJu0YxUlBFlyw7jT4zE5g2sxL4qatzg7aN7bfB1dfsu2fDvwY2hFRqy 0yk0gBqtf+9TUJXWNGYONzSd20wa1PYbP6OzuT3MjKQJV7usBDJ04FcqeX0tIxbqISmYxq+c83Z Yh+udFdE= X-Gm-Gg: ATEYQzwEMtXXMy4HX/+nQdVOPEiLRuRaDQm580QqvszFkEO1p7zmd54qfz16qgkU7VP tOBHErKYkFai6tlESFXXEP1Cu+C/r9bgfJa6tfU4xxGoc1nNahH/odjTKmXGTD8qhBM42c16Nlg BXsIt1OamGLZDJRa3R+gK8ZRvZMA2xhhjo2eNdKYnyBhyHpAG9OcmcKCvzItQEHs3OrwLtmCWtF 2gJxKTEqsJz+yo75jpUo26K/o1e1GHXIhc4ZPVxzD1SQJJETwRwTlwnDtLeHM9ExwBZgGlFtn7H pSotVx1yhQfc/9Skgc42FYKyOb8n+GQ7XQomZV8EtT++1+AemUWqMlDcFfLh+JsF0iEB25I/Y0a 5zLVKuLgNsJvLML9rdRAcg3NzEdHl8PdePcG6wr7Ekw4qWZnkNJenEUXKDFb9b0rcSzVPLNElKP Gu9uBxWfIdJgIpVinNzJ7GRUBM28a/bxb4M+uS0jVw1o8H99vp8J0tj46X2dUIuS3e89BhxkGl X-Received: by 2002:a05:600c:3115:b0:483:3380:ca0c with SMTP id 5b1f17b1804b1-483a9611795mr365809865e9.35.1772061428033; Wed, 25 Feb 2026 15:17:08 -0800 (PST) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PULL 26/70] target/i386: Remove MonitorDef register entries available via gdbstub Date: Thu, 26 Feb 2026 00:13:26 +0100 Message-ID: <20260225231411.96482-27-philmd@linaro.org> X-Mailer: git-send-email 2.52.0 In-Reply-To: <20260225231411.96482-1-philmd@linaro.org> References: <20260225231411.96482-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::32b; envelope-from=philmd@linaro.org; helo=mail-wm1-x32b.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: 1772061466868158500 All these registers are already provided by via gdbstub parsed XML and handler by the gdb_get_register() helper in the monitor/hmp.c file. Remove as now unreachable code. Reviewed-by: Pierrick Bouvier Signed-off-by: Philippe Mathieu-Daud=C3=A9 Message-ID: <20260219191955.83815-19-philmd@linaro.org> --- target/i386/monitor.c | 39 --------------------------------------- 1 file changed, 39 deletions(-) diff --git a/target/i386/monitor.c b/target/i386/monitor.c index 99b32cb7b0f..446428602ef 100644 --- a/target/i386/monitor.c +++ b/target/i386/monitor.c @@ -602,46 +602,7 @@ static target_long monitor_get_pc(Monitor *mon, const = struct MonitorDef *md, =20 const MonitorDef monitor_defs[] =3D { #define SEG(name, seg) \ - { name, offsetof(CPUX86State, segs[seg].selector), NULL, MD_I32 },\ - { name ".base", offsetof(CPUX86State, segs[seg].base) },\ { name ".limit", offsetof(CPUX86State, segs[seg].limit), NULL, MD_I32 = }, - - { "eax", offsetof(CPUX86State, regs[0]) }, - { "ecx", offsetof(CPUX86State, regs[1]) }, - { "edx", offsetof(CPUX86State, regs[2]) }, - { "ebx", offsetof(CPUX86State, regs[3]) }, - { "esp|sp", offsetof(CPUX86State, regs[4]) }, - { "ebp|fp", offsetof(CPUX86State, regs[5]) }, - { "esi", offsetof(CPUX86State, regs[6]) }, - { "edi", offsetof(CPUX86State, regs[7]) }, -#ifdef TARGET_X86_64 - { "r8", offsetof(CPUX86State, regs[8]) }, - { "r9", offsetof(CPUX86State, regs[9]) }, - { "r10", offsetof(CPUX86State, regs[10]) }, - { "r11", offsetof(CPUX86State, regs[11]) }, - { "r12", offsetof(CPUX86State, regs[12]) }, - { "r13", offsetof(CPUX86State, regs[13]) }, - { "r14", offsetof(CPUX86State, regs[14]) }, - { "r15", offsetof(CPUX86State, regs[15]) }, - { "r16", offsetof(CPUX86State, regs[16]) }, - { "r17", offsetof(CPUX86State, regs[17]) }, - { "r18", offsetof(CPUX86State, regs[18]) }, - { "r19", offsetof(CPUX86State, regs[19]) }, - { "r20", offsetof(CPUX86State, regs[20]) }, - { "r21", offsetof(CPUX86State, regs[21]) }, - { "r22", offsetof(CPUX86State, regs[22]) }, - { "r23", offsetof(CPUX86State, regs[23]) }, - { "r24", offsetof(CPUX86State, regs[24]) }, - { "r25", offsetof(CPUX86State, regs[25]) }, - { "r26", offsetof(CPUX86State, regs[26]) }, - { "r27", offsetof(CPUX86State, regs[27]) }, - { "r28", offsetof(CPUX86State, regs[28]) }, - { "r29", offsetof(CPUX86State, regs[29]) }, - { "r30", offsetof(CPUX86State, regs[30]) }, - { "r31", offsetof(CPUX86State, regs[31]) }, -#endif - { "eflags", offsetof(CPUX86State, eflags) }, - { "eip", offsetof(CPUX86State, eip) }, SEG("cs", R_CS) SEG("ds", R_DS) SEG("es", R_ES) --=20 2.52.0 From nobody Thu Apr 16 20:57:20 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=1772061781; cv=none; d=zohomail.com; s=zohoarc; b=fEK7ONEB8SbFXYVWGJCukvToDwf0GCQAyLJnAaKuEAUVqtu3dcYEn9zg8vCkJcRIJaYNHZJZ0/S/zYIXKbIBvKhSTSu7nsM9ehrUUjcAkS6w+tCTUgkYk+DjbNOnxpeQcKoffh/vIbbP4OKiRqQWMztW/MtcP+jfRU0wG3jz5MA= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1772061781; h=Content-Type:Content-Transfer-Encoding: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:Cc; bh=AdFtKGIsopBDFUGdtCFLNJHYH+Edql8ZEfYb6+rWKQ8=; b=XreKBRl/jUH3advwbP0WWNnWiwpcwUn5T2nDTyKbyyYzsC7MbLiKdCmk44gEPzHn8Ni8b7tuQ9VZXyp1PQkPhXy8khbVkjE/x7UBvw06WTszsTzuWdap0beLv6Iv5NizunJbTDtvW4e0SEGIRt2sTucHxPez+qGh64cdDrGTLtA= 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 1772061781595608.4953753187272; Wed, 25 Feb 2026 15:23:01 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1vvO87-0001QT-Um; Wed, 25 Feb 2026 18:17:20 -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 1vvO86-0001CG-2J for qemu-devel@nongnu.org; Wed, 25 Feb 2026 18:17:18 -0500 Received: from mail-wm1-x32a.google.com ([2a00:1450:4864:20::32a]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1vvO84-0002w4-E0 for qemu-devel@nongnu.org; Wed, 25 Feb 2026 18:17:17 -0500 Received: by mail-wm1-x32a.google.com with SMTP id 5b1f17b1804b1-4806bf39419so10318805e9.1 for ; Wed, 25 Feb 2026 15:17:15 -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-483bfcd0818sm20942465e9.26.2026.02.25.15.17.13 for (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Wed, 25 Feb 2026 15:17:14 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1772061434; x=1772666234; 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=AdFtKGIsopBDFUGdtCFLNJHYH+Edql8ZEfYb6+rWKQ8=; b=K3UPUH/2IBU3FUiMXH8UFT9ypAEk6K/t7sOZiY5Cl74VzrjciZzWWZG9YTRb/f3Ejc 8r5HfGEww1SpX8ddVFcjPobCs8OPv6tyoYl6P7iFgwR5vUZvqY7khUcxRNhVSpNCx0X0 URyzLOaPnLmAUS4lZYfXeAR3dgwqfIcFwetZW9udnKQEBDgMjjNARKUZpGKAtMRS6wVc ioO2YyuR+g31dG5E76r1OjnW8h/aTxYOFh4ZJZ+T7cPUapGccWXXigdZXPSSuVwMUcA/ czQdoEEtQmSWQ7XwNV8WagQuWqPlAGXcVr6r/omZLT0QkvwX8Tlenel4UQ1yWEshbcTR Yfmg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1772061434; x=1772666234; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-gg:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to; bh=AdFtKGIsopBDFUGdtCFLNJHYH+Edql8ZEfYb6+rWKQ8=; b=RO1zBr53DzeJPVpJHtVg/lXl7AMh16BQ5V0kjhGBlCoyRHYK1g2hl5SN93VqjTr6dT nsg3Gv49+rU1Mnl4HCdHXj9FX/9NaFrg4HjQ0oiguWpdz1VjcXH8ELKH0+LiuZP8pRGw QhhcOOk7yWu6Po/MLF+hDeG3Od/7+H0GSZynF35b1BNnQC0+yWfkY28caJiygyOj7F0a 6WXQT4aWebmGnFhH/c38Td+TxoYGX9zpEQ9FFbTmxGZflF4ipF5uqbGLr7vwgyFFSF8V vaSDY3jBuKd1tq/IkYVHvVS9Y8AP03/M9amkQqMH4h8BrWugPZORnb62VLIIpGtfZrB6 JEeQ== X-Gm-Message-State: AOJu0Yw4NRv+LlizCXUpyvZ801maLX/PeleWhSWPi1/v+fG/wGPQTcaw aztsMBa3Uc4ExSiZsv0s0CAvNWbG6+IRsr8KrM9CUaG0yCQsAc9TTddUTTjzLmtrl7pM61joYWa 9uBDU3vY= X-Gm-Gg: ATEYQzxepK0b9PgpicxgQrMA4FggiMET77HGITixIJ8rJH2vI4m1QA1K9Hv4veKIGJu pgQzwv9PF3GLNEakoosKudS0WDjTK3PUMK2JL2OMSl5qNcdnUXbSK7orVyukl3vJjIZTMKcwJC7 h3mJy9u+dVvcYvGLqcTV0poPOv1kEwLdvS/xpmxDaubFYOPjDVdWwf9auRGxbkwEHVqN8XKRrgL rDemxNbKa5FUPA3pA/lIzIhhLos0qhrY39P1d+BfQn96rCgQnHW462C/IBFRgNBHrnbhh9qJKiS DTXsHePjjpDfBwfbtEn2O0w28WF4z3E1g9bu/slnpV3TVgTs/7OzZmh6NfLKFHLLaAADSYv6ouH lT64aMN7y7S04JPvksWdWQmStXxL7qvxVUMF5e0m/DXKOPYTyJcYM3Z5EgKc+qrKU61TzgaxkD+ 4ef5eX5+xbVqWiNuTTtVs2SZnfebe5MWnmGWOCI8I+FvLONr+nTVz98ur3nuZxL7us0PVqjtzK X-Received: by 2002:a05:600c:8b71:b0:483:7ea3:3de3 with SMTP id 5b1f17b1804b1-483c33c3606mr14441025e9.2.1772061434536; Wed, 25 Feb 2026 15:17:14 -0800 (PST) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PULL 27/70] target/m68k: Remove MonitorDef register entries available via gdbstub Date: Thu, 26 Feb 2026 00:13:27 +0100 Message-ID: <20260225231411.96482-28-philmd@linaro.org> X-Mailer: git-send-email 2.52.0 In-Reply-To: <20260225231411.96482-1-philmd@linaro.org> References: <20260225231411.96482-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::32a; envelope-from=philmd@linaro.org; helo=mail-wm1-x32a.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: 1772061781975158500 All these registers are already provided by via gdbstub parsed XML and handler by the gdb_get_register() helper in the monitor/hmp.c file. Remove as now unreachable code. Reviewed-by: Pierrick Bouvier Signed-off-by: Philippe Mathieu-Daud=C3=A9 Message-ID: <20260219191955.83815-20-philmd@linaro.org> --- target/m68k/monitor.c | 18 ------------------ 1 file changed, 18 deletions(-) diff --git a/target/m68k/monitor.c b/target/m68k/monitor.c index 6d101c75df0..08ced037b47 100644 --- a/target/m68k/monitor.c +++ b/target/m68k/monitor.c @@ -24,24 +24,6 @@ void hmp_info_tlb(Monitor *mon, const QDict *qdict) } =20 static const MonitorDef monitor_defs[] =3D { - { "d0", offsetof(CPUM68KState, dregs[0]), NULL, MD_I32 }, - { "d1", offsetof(CPUM68KState, dregs[1]), NULL, MD_I32 }, - { "d2", offsetof(CPUM68KState, dregs[2]), NULL, MD_I32 }, - { "d3", offsetof(CPUM68KState, dregs[3]), NULL, MD_I32 }, - { "d4", offsetof(CPUM68KState, dregs[4]), NULL, MD_I32 }, - { "d5", offsetof(CPUM68KState, dregs[5]), NULL, MD_I32 }, - { "d6", offsetof(CPUM68KState, dregs[6]), NULL, MD_I32 }, - { "d7", offsetof(CPUM68KState, dregs[7]), NULL, MD_I32 }, - { "a0", offsetof(CPUM68KState, aregs[0]), NULL, MD_I32 }, - { "a1", offsetof(CPUM68KState, aregs[1]), NULL, MD_I32 }, - { "a2", offsetof(CPUM68KState, aregs[2]), NULL, MD_I32 }, - { "a3", offsetof(CPUM68KState, aregs[3]), NULL, MD_I32 }, - { "a4", offsetof(CPUM68KState, aregs[4]), NULL, MD_I32 }, - { "a5", offsetof(CPUM68KState, aregs[5]), NULL, MD_I32 }, - { "a6", offsetof(CPUM68KState, aregs[6]), NULL, MD_I32 }, - { "a7", offsetof(CPUM68KState, aregs[7]), NULL, MD_I32 }, - { "pc", offsetof(CPUM68KState, pc), NULL, MD_I32 }, - { "sr", offsetof(CPUM68KState, sr), NULL, MD_I32 }, { "ssp", offsetof(CPUM68KState, sp[0]), NULL, MD_I32 }, { "usp", offsetof(CPUM68KState, sp[1]), NULL, MD_I32 }, { "isp", offsetof(CPUM68KState, sp[2]), NULL, MD_I32 }, --=20 2.52.0 From nobody Thu Apr 16 20:57:20 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=1772061817; cv=none; d=zohomail.com; s=zohoarc; b=NiqsfKZCmiQGSn23O90Mt8HiHpy+mtIvwLba/PYi1a5oY+bmsbmkjjDXHGQbOWuKL2rXrNCzv/HYLzOB7dZk1lQNziDu1M0PtdNITlzsk5YzBziqnjZ1JNemqH6/KlpE0Q/T2h5nA2FdrMfG1HXXs5QjFPN6qFIB9PN9+cpjJU8= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1772061817; h=Content-Type:Content-Transfer-Encoding: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:Cc; bh=nV/6P4k/wYGcsUX8qZDzsKQHMcwpvKFH9KhkcfgGdBU=; b=Si2geiFhJH8AFqtIZiRw4Z8gI9aagN2wGlpExg3q63jczZBjjH/Df2M35uLcTh9BFmENtRmD/DZZyuFEszTEOyHm+sKZwosyZ47ijdO+hsZyL4EIYV07T/cIVBEoA/i9KSxqmc11zPIWaqwIQUo3e4kt++JcfyakRXPMzhRjU/4= 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 1772061817391457.2073538323798; Wed, 25 Feb 2026 15:23:37 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1vvO8H-0002oM-8B; Wed, 25 Feb 2026 18:17:29 -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 1vvO8D-0002FP-Qc for qemu-devel@nongnu.org; Wed, 25 Feb 2026 18:17:25 -0500 Received: from mail-wm1-x331.google.com ([2a00:1450:4864:20::331]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1vvO8B-0002wt-Vr for qemu-devel@nongnu.org; Wed, 25 Feb 2026 18:17:25 -0500 Received: by mail-wm1-x331.google.com with SMTP id 5b1f17b1804b1-4806ce0f97bso2372155e9.0 for ; Wed, 25 Feb 2026 15:17:23 -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-483bfb87030sm21685805e9.10.2026.02.25.15.17.20 for (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Wed, 25 Feb 2026 15:17:21 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1772061442; x=1772666242; 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=nV/6P4k/wYGcsUX8qZDzsKQHMcwpvKFH9KhkcfgGdBU=; b=MSxc6BOUxPLKpXGdiFqF1/mc9OVeqjvtrMDrVDje2UyJe3UhaSD0BBjbrbs0dmbYV1 5toRcOJgJN71rx0sb9RkgD32sb8MyVoNq5mphkZ4+3A+S/0eszVt5ICpqb/lXuIK4Rsz wZp0NFExn2BMaP/Py8jL81lJqUp9fJdpDD3Np/U1qtUicuVkzTrCHC/2yehVVkBXDI9L dqvCh894WjBNZ9wj+9frHXTx8Uj1hNG+pzf2fg1QpwTGu121DEFcJMGR0Bgt1s/YErt4 3HxhYXS+7WmmLKmzJhuRqoWuez2aXng6i/npj6cbrvCSIQt1CdOemMGpsHOG07ivEBsJ G+rg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1772061442; x=1772666242; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-gg:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to; bh=nV/6P4k/wYGcsUX8qZDzsKQHMcwpvKFH9KhkcfgGdBU=; b=BM5riWSltuk1SPxhiPUWP8UXmATacZUCjrAuipsIj/gks1kITSnTvHjKqO+u+R9q7Y lRs+MrygnzQX7cfLxX0RnT8m0OWNECXBt/jYbqXMsCQHAnMakp6gP6JvAuLVPkp8hpKq 2lyS19sDWoJuoezIKBHl/2UNQA8m/oYcGF4RfBRtMpA2dioTmjkc7CW7bHFaB1bvDear IWqMu6yHlk5uzAc9A/9Wz88qILIH2IscU7FAwM46LdXpLZHA4DZNKv3LzSX2+jvwkr4k l/nJSGnWaZx3KJdNNl1Bdf+8pnvGeHReWuWSmph7C21G/hPKPEgqosYsgN5o2VmxUcYM TYsQ== X-Gm-Message-State: AOJu0YxsvJBDThv2agNIlGOVlIjvVMqLo2+Fi4LLTcvFQN9JcfcKYdSw lHV9Fzn7RZzJZJT3xkGG37wstXThBgPgPFMoZP6gOJvryREw1rPmGVCGyi/xtNT+V0YQKP99aF9 XHRy0SK8= X-Gm-Gg: ATEYQzxVyGLjo+j3L1QNGgBp+MgdBImPUdzrv/QxwB2hlpsX1mjdP5NqcJ3/1OxdoUT gDy5XnD3Wyv9/NO4kMpxV1kvcVUJRtGuib8B4hjGNp6pzSnKjxAsnPU6f8mjgSM0JadoItmTzqw ZgHp6MkxW+JpsIr3h6WHU18zwwT+OAxdIHFQKQQ9kbSJ1pasdvh8MEXXDbLdDxrpGZjjRjobs91 EbPwy2xkWnVszqcmg27aPg97hkM2yy81cv6xYFRrIsb4xcMhuZqx4znINTXGxQTr2F3Eg3U2RqZ BXo3vRbSsKKpZ2t8LyJFefl7JWpQOTZrZAcYuxj6YkR8A3QV+IBzfjoYwTYvtmlk5hol6smbvTI PxwCxf82bTcVoVmAS16jrElVzChSTxA3uvCQFgzfviV8qv/MBltHCH0oiG/SInvYf2RvBu4IIMn m3xfWL3ou684taK5Cdg40K4zSMtfeAwH/FxIgficlr8R+Ac1yneVQlv8MdrR2T82CX3H6z5FPe X-Received: by 2002:a05:600c:1913:b0:45d:d97c:236c with SMTP id 5b1f17b1804b1-483c3de9bdemr1170575e9.21.1772061441970; Wed, 25 Feb 2026 15:17:21 -0800 (PST) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PULL 28/70] target/ppc: Remove MonitorDef register entries available via gdbstub Date: Thu, 26 Feb 2026 00:13:28 +0100 Message-ID: <20260225231411.96482-29-philmd@linaro.org> X-Mailer: git-send-email 2.52.0 In-Reply-To: <20260225231411.96482-1-philmd@linaro.org> References: <20260225231411.96482-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::331; envelope-from=philmd@linaro.org; helo=mail-wm1-x331.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: 1772061818251158500 All these registers are already provided by via gdbstub parsed XML and handler by the gdb_get_register() helper in the monitor/hmp.c file. Remove as now unreachable code. Reviewed-by: Pierrick Bouvier Signed-off-by: Philippe Mathieu-Daud=C3=A9 Message-ID: <20260219191955.83815-21-philmd@linaro.org> --- target/ppc/ppc-qmp-cmds.c | 132 -------------------------------------- 1 file changed, 132 deletions(-) diff --git a/target/ppc/ppc-qmp-cmds.c b/target/ppc/ppc-qmp-cmds.c index 7022564604f..66c3bcb2c38 100644 --- a/target/ppc/ppc-qmp-cmds.c +++ b/target/ppc/ppc-qmp-cmds.c @@ -33,54 +33,6 @@ #include "cpu-models.h" #include "cpu-qom.h" =20 -static target_long monitor_get_ccr(Monitor *mon, const struct MonitorDef *= md, - int val) -{ - CPUArchState *env =3D mon_get_cpu_env(mon); - unsigned int u; - - u =3D ppc_get_cr(env); - - return u; -} - -static target_long monitor_get_xer(Monitor *mon, const struct MonitorDef *= md, - int val) -{ - CPUArchState *env =3D mon_get_cpu_env(mon); - return cpu_read_xer(env); -} - -static target_long monitor_get_decr(Monitor *mon, const struct MonitorDef = *md, - int val) -{ - CPUArchState *env =3D mon_get_cpu_env(mon); - if (!env->tb_env) { - return 0; - } - return cpu_ppc_load_decr(env); -} - -static target_long monitor_get_tbu(Monitor *mon, const struct MonitorDef *= md, - int val) -{ - CPUArchState *env =3D mon_get_cpu_env(mon); - if (!env->tb_env) { - return 0; - } - return cpu_ppc_load_tbu(env); -} - -static target_long monitor_get_tbl(Monitor *mon, const struct MonitorDef *= md, - int val) -{ - CPUArchState *env =3D mon_get_cpu_env(mon); - if (!env->tb_env) { - return 0; - } - return cpu_ppc_load_tbl(env); -} - void hmp_info_tlb(Monitor *mon, const QDict *qdict) { CPUArchState *env1 =3D mon_get_cpu_env(mon); @@ -92,90 +44,6 @@ void hmp_info_tlb(Monitor *mon, const QDict *qdict) dump_mmu(env1); } =20 -const MonitorDef monitor_defs[] =3D { - { "fpscr", offsetof(CPUPPCState, fpscr) }, - /* Next instruction pointer */ - { "nip|pc", offsetof(CPUPPCState, nip) }, - { "lr", offsetof(CPUPPCState, lr) }, - { "ctr", offsetof(CPUPPCState, ctr) }, - { "decr", 0, &monitor_get_decr, }, - { "ccr|cr", 0, &monitor_get_ccr, }, - /* Machine state register */ - { "xer", 0, &monitor_get_xer }, - { "msr", offsetof(CPUPPCState, msr) }, - { "tbu", 0, &monitor_get_tbu, }, -#if defined(TARGET_PPC64) - { "tb", 0, &monitor_get_tbl, }, -#else - { "tbl", 0, &monitor_get_tbl, }, -#endif - { NULL }, -}; - -const MonitorDef *target_monitor_defs(void) -{ - return monitor_defs; -} - -static int ppc_cpu_get_reg_num(const char *numstr, int maxnum, int *pregnu= m) -{ - int regnum; - char *endptr =3D NULL; - - if (!*numstr) { - return false; - } - - regnum =3D strtoul(numstr, &endptr, 10); - if (*endptr || (regnum >=3D maxnum)) { - return false; - } - *pregnum =3D regnum; - - return true; -} - -int target_get_monitor_def(CPUState *cs, const char *name, uint64_t *pval) -{ - int i, regnum; - CPUPPCState *env =3D cpu_env(cs); - - /* General purpose registers */ - if ((qemu_tolower(name[0]) =3D=3D 'r') && - ppc_cpu_get_reg_num(name + 1, ARRAY_SIZE(env->gpr), ®num)) { - *pval =3D env->gpr[regnum]; - return 0; - } - - /* Floating point registers */ - if ((qemu_tolower(name[0]) =3D=3D 'f') && - ppc_cpu_get_reg_num(name + 1, 32, ®num)) { - *pval =3D *cpu_fpr_ptr(env, regnum); - return 0; - } - - /* Special purpose registers */ - for (i =3D 0; i < ARRAY_SIZE(env->spr_cb); ++i) { - ppc_spr_t *spr =3D &env->spr_cb[i]; - - if (spr->name && (strcasecmp(name, spr->name) =3D=3D 0)) { - *pval =3D env->spr[i]; - return 0; - } - } - - /* Segment registers */ -#if !defined(CONFIG_USER_ONLY) - if ((strncasecmp(name, "sr", 2) =3D=3D 0) && - ppc_cpu_get_reg_num(name + 2, ARRAY_SIZE(env->sr), ®num)) { - *pval =3D env->sr[regnum]; - return 0; - } -#endif - - return -EINVAL; -} - CpuModelExpansionInfo * qmp_query_cpu_model_expansion(CpuModelExpansionType type, CpuModelInfo *model, --=20 2.52.0 From nobody Thu Apr 16 20:57:20 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=1772061774; cv=none; d=zohomail.com; s=zohoarc; b=coX0jcWPU5EBhowDq469UZTRjB8gHPZlhSH8CHHRJ9Nz36BDgVjvUDEbdyiOxQ7vnFhN+vqZlCZTXeRkQ3875R1dNmgizGgaLyK6749qtYQzDwLMf6aTp/TOI5bdwb2mLagT5ll2GQp/8YPhsCXCyU8PQUWO9gfd6C4YIUXESyw= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1772061774; h=Content-Type:Content-Transfer-Encoding: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:Cc; bh=f1OACo2rFMFGe6rKhG2a8bSn9SFj7vp7kMmyZM+yIks=; b=dAbi6LTdo8GKPXgu9dWWanjMkhM72yMDgIQLk9dxhv0MQw3FdjB+OCRy7VFX+GAYZ7eRjmrfyopCZaoJUaHXUCQMRBSH8cYhAULb/i5RV4KtfDJ6dGDfuOCT/aZ3DNZ87jatK8sinqjnFtbZMi7WAtW784Wp5uu7q2YL/nfNFXk= 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 1772061774474994.8615844878777; Wed, 25 Feb 2026 15:22:54 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1vvO8t-0003kE-5p; Wed, 25 Feb 2026 18:18:07 -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 1vvO8L-0003DF-1i for qemu-devel@nongnu.org; Wed, 25 Feb 2026 18:17:34 -0500 Received: from mail-wr1-x431.google.com ([2a00:1450:4864:20::431]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1vvO8J-00032K-AE for qemu-devel@nongnu.org; Wed, 25 Feb 2026 18:17:32 -0500 Received: by mail-wr1-x431.google.com with SMTP id ffacd0b85a97d-43945763558so141134f8f.3 for ; Wed, 25 Feb 2026 15:17:30 -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-43970d3ff27sm38820078f8f.22.2026.02.25.15.17.27 for (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Wed, 25 Feb 2026 15:17:28 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1772061449; x=1772666249; 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=f1OACo2rFMFGe6rKhG2a8bSn9SFj7vp7kMmyZM+yIks=; b=bQnZnSbFzIrEtj20vtXefEEKTFQpqedHSQkz8q0r6EEdTZKv/5nfbA5hZh+tDwOP3o p51on7eLadbvl5ItE3oiKnZMKKbpLPNKUrelvzfQF1BJ4/gpgVWJ5Hx6tBOofBOq/eYG p9mj9vH9zPR5j6Dr8ct2lDCs9qcwGT5lp6/H9zKiJrn2/7eywkhmLjPUaAwHQYboU+w8 qU0R1TDBXCOS8pSBWkJR2TBRrbPh9x9EB7d+xJEbAdJcqnR8VyyZpprMJohtNblsZ5Y/ OzD517psKRtqCmVo9Hv9KRp/T/+B4daNOKiSXkFwv7DLeCe2uZdTpGTCfVAp1A64mL9N U2Qw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1772061449; x=1772666249; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-gg:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to; bh=f1OACo2rFMFGe6rKhG2a8bSn9SFj7vp7kMmyZM+yIks=; b=fvnC7jUIwJt5aSodsHLyEmD0qwZ68D7GzCyjACuuAdNwPduZfcKwZdQ9VhRQYuCzud 9Wvb17mFYF0lC1HO6JzOObMjWgEsgo9FnAWkHLzbkICSTf7uC7VdL7QaLbMoojULehK1 1FgGI7vM8zTyCP9xrVB5E5jMA8iJ+bu2SWE0xwrJenhbxDT5tqW+w+SqE84wgbSyZ/oZ nMmgpK/N2nzWduNUPhTzDTLqUsHCfXmUbNuGCk7reQ7c3NRQBQDrAn6YmtR8EthfTjBl Q+b8OIwmDcEqt+1Iyfu+mN0H9xu12pAR6jR6g7TY5u8lqC/Y/wHG94UXONmdLkYWrAx3 Zqwg== X-Gm-Message-State: AOJu0YyzHJ5D6qbi5pUFXMbdaGGPZXRisgtDryKsDAsn3jUDe6fF0yBB MaecrEMx61mvwTXaddBGs5mskGCq/loW6ZKLgE2KguJKc9oLtHw3LcSsPnYEU2lRfUurSiE3lgG XRdlpSBg= X-Gm-Gg: ATEYQzxGn67BpC6i79KEUuMeY+4InMsvjjaJ6ukxgMtOe5JCBFJrYJ++X09lUMOUcN0 ICbYjAaFUdsRXGNBtCf4QtG93Zd8TGYQyntFSLF8cCwcxwFJJayyZBr8X4v4a+ZlfWz8XXQvU95 Bypvl4iXhC9328yZM8h9Hv2SMrTU8KUqOppl1QB+iH7ajizXrQ634N6/6AhePWgE+SBqxfgYEkp AW6eFRdmMLHsjSD7knVW+2/2eXKS/Avxi+xTFEwr+D9KJbxwjSji24VkmyLUOuN5t+zPB6PNFig wki32kLjt6rZChQAb4Vr9aRr0uzkgsSwmuTcMxi3iVcMdeGriRy2XpUInPVTuC4T5IsU9nsq+Jt KUqH7p/FenttPvnsN8tjBoleGXcgKzVAhYwR0iTodjTWFlUKa49VB+PXzc4rAOgPldXc5CBeptO fjesLdKVd0yruF9xqUMDVPJaLiTQGZY+iMGh1X4ZyHnU2Eb6dzcUB9nSPHRtCg8Pyu+b/Udvul X-Received: by 2002:a05:6000:4026:b0:439:9203:595a with SMTP id ffacd0b85a97d-43992035a43mr5976686f8f.43.1772061449244; Wed, 25 Feb 2026 15:17:29 -0800 (PST) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PULL 29/70] target/ppc: Extract monitor-related code to monitor.c Date: Thu, 26 Feb 2026 00:13:29 +0100 Message-ID: <20260225231411.96482-30-philmd@linaro.org> X-Mailer: git-send-email 2.52.0 In-Reply-To: <20260225231411.96482-1-philmd@linaro.org> References: <20260225231411.96482-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::431; envelope-from=philmd@linaro.org; helo=mail-wr1-x431.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: 1772061776090158500 Keep ppc-qmp-cmds.c for QMP, use monitor.c for HMP. Since ppc-qmp-cmds.c was introduced using the MIT license (see commit bf957284006 "monitor: remove target-specific code from monitor.c") retain the same license for the new monitor.c file. Reviewed-by: Pierrick Bouvier Signed-off-by: Philippe Mathieu-Daud=C3=A9 Message-ID: <20260219191955.83815-22-philmd@linaro.org> --- target/ppc/monitor.c | 25 +++++++++++++++++++++++++ target/ppc/ppc-qmp-cmds.c | 16 +--------------- target/ppc/meson.build | 1 + 3 files changed, 27 insertions(+), 15 deletions(-) create mode 100644 target/ppc/monitor.c diff --git a/target/ppc/monitor.c b/target/ppc/monitor.c new file mode 100644 index 00000000000..776a76602ea --- /dev/null +++ b/target/ppc/monitor.c @@ -0,0 +1,25 @@ +/* + * QEMU PPC (monitor definitions) + * + * Copyright (c) 2003-2004 Fabrice Bellard + * + * SPDX-License-Identifier: MIT + */ + +#include "qemu/osdep.h" +#include "qemu/ctype.h" +#include "monitor/monitor.h" +#include "monitor/hmp-target.h" +#include "monitor/hmp.h" +#include "cpu.h" + +void hmp_info_tlb(Monitor *mon, const QDict *qdict) +{ + CPUArchState *env1 =3D mon_get_cpu_env(mon); + + if (!env1) { + monitor_printf(mon, "No CPU available\n"); + return; + } + dump_mmu(env1); +} diff --git a/target/ppc/ppc-qmp-cmds.c b/target/ppc/ppc-qmp-cmds.c index 66c3bcb2c38..96228919966 100644 --- a/target/ppc/ppc-qmp-cmds.c +++ b/target/ppc/ppc-qmp-cmds.c @@ -1,5 +1,5 @@ /* - * QEMU PPC (monitor definitions) + * QEMU PPC (QMP definitions) * * Copyright (c) 2003-2004 Fabrice Bellard * @@ -24,26 +24,12 @@ =20 #include "qemu/osdep.h" #include "cpu.h" -#include "monitor/monitor.h" #include "qemu/ctype.h" -#include "monitor/hmp-target.h" -#include "monitor/hmp.h" #include "qapi/error.h" #include "qapi/qapi-commands-machine.h" #include "cpu-models.h" #include "cpu-qom.h" =20 -void hmp_info_tlb(Monitor *mon, const QDict *qdict) -{ - CPUArchState *env1 =3D mon_get_cpu_env(mon); - - if (!env1) { - monitor_printf(mon, "No CPU available\n"); - return; - } - dump_mmu(env1); -} - CpuModelExpansionInfo * qmp_query_cpu_model_expansion(CpuModelExpansionType type, CpuModelInfo *model, diff --git a/target/ppc/meson.build b/target/ppc/meson.build index b0d708bb519..d4ebbaf0a19 100644 --- a/target/ppc/meson.build +++ b/target/ppc/meson.build @@ -43,6 +43,7 @@ ppc_system_ss.add(files( 'mmu-hash32.c', 'mmu-booke.c', 'mmu_common.c', + 'monitor.c', 'ppc-qmp-cmds.c', )) ppc_system_ss.add(when: 'CONFIG_TCG', if_true: files( --=20 2.52.0 From nobody Thu Apr 16 20:57:20 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=1772061758; cv=none; d=zohomail.com; s=zohoarc; b=Pz7o+BGX/IsG9YPZYLkzYxezXbgnX/ufayVYVK4QR+UooDHWT5XZLsi2Krt3MhOZSbVCkwJRuK+NEAiLWUo+8jOnOSK4rrbObet9+meTqHKJmDteiA6V2yGh/f6cZPVrwmoDervW2DCRE6eqCwDKAga4jh3buZILm00TI+MLDXI= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1772061758; h=Content-Type:Content-Transfer-Encoding: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:Cc; bh=PjE4E2zb8Ovhf0XH2ErfRByBQjQ33Su6saJMtd2PGNk=; b=ARfMxy+5ayjBW1rDAR40mqgmprqDkKEPapvFK8NZ1y2N3QoOYH3suVyZ0UN01VnvAJMhOvP3H+3LaNfiFYZpvg/u2/osd0a5LoAk2xzFP7DEa6VIV7DkkE7Y40nyKSbXGZ4/7VPs7RsYhd+e5Q6evAKOda7qJpD3IeP26rYXBk0= 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 1772061758751983.9521127678977; Wed, 25 Feb 2026 15:22:38 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1vvO8t-0003jG-3I; Wed, 25 Feb 2026 18:18:07 -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 1vvO8S-0003PL-Mk for qemu-devel@nongnu.org; Wed, 25 Feb 2026 18:17:44 -0500 Received: from mail-wm1-x341.google.com ([2a00:1450:4864:20::341]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1vvO8Q-00035n-Dk for qemu-devel@nongnu.org; Wed, 25 Feb 2026 18:17:40 -0500 Received: by mail-wm1-x341.google.com with SMTP id 5b1f17b1804b1-4836f363d0dso2331935e9.3 for ; Wed, 25 Feb 2026 15:17:37 -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-483bfb776b0sm22755795e9.1.2026.02.25.15.17.35 for (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Wed, 25 Feb 2026 15:17:35 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1772061456; x=1772666256; 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=PjE4E2zb8Ovhf0XH2ErfRByBQjQ33Su6saJMtd2PGNk=; b=vKscC7mwOEvUYeZZJUt0qIs/5OUPlHgrTPi4pSD3LHQPZcdbd3PF6VoCuAZ68DTINA wL0Z4oI3va4EgdDE/TcskIuFHUoq6lOCjF0YBV5s82fUKewlDc6ql7KbIXwbHAUkkBM1 HwH/Kz28kh3SfXrIu0xWl+4EeMcKZc8B19JElCmU+omx/NYKcrn/+bpEf266kHBsvmaj lwEMoYfalGzO9L7EbY5H82GIcpVp9wT9k1dt1YLPAidahhnIALZvlYaluI51+lDXK9xB l+enmHNGoyRgtfA4OyIgWUc+EinB2pve1+3Cfr/jqmxyT2KeZxEZUqc0Nf02Ncm+npIW icTA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1772061456; x=1772666256; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-gg:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to; bh=PjE4E2zb8Ovhf0XH2ErfRByBQjQ33Su6saJMtd2PGNk=; b=Zr3UVGvwbwFoqGnag3C+kjTiXS/q5P4/x0VfCRbE5AA2i383uJHvIPWsYUTqX575NL A6fyas5r/P6bVW4TnyGc2+bejdVA8XH8lQsEvqXcLK4gGY6tg+uMnGA6EHvJuHumRbPa 0aLBuCUUSaaMVHVG/uaVOYBzFXX/c9H344PzpG6kxJ7Onx/CccDRwgWN+6LICilt4+0t /ZSJgiqh7nPVMo4J2MWPN5m6+2r2qgoqRdHC+elCigK/RKa9Uq5GKihG/ihMZYq7Xnrl W0csnKkQVPI+2BIOxCWnSq8HmSqRtsjlDgHT92OMjkVIxwgICauJaAVNqSZ/1JcEeF64 RooQ== X-Gm-Message-State: AOJu0YzImdKYyanMH2kB3kMZ7HRl1UmE3/zDVDTTNtQ1ytVhccG/G5xS KDTx03KVoD19L2yqdkWRrZgDZKyS9Te4GsxjnhrSJ/nYPMIFgX6qvUbGPnSEaG4/xuCpAuOvHGc ZT/ehguww3Q== X-Gm-Gg: ATEYQzz/4NjzlWC9kp7G8yDdSYti5yQ7HYiFXyH44+5PBkp/ZSD++iB0ooyw7ALfeXc r8hAkpw/FjYMv0gIeayymk2Hi+W8P/gOA9HGInYB8bChC42fukYJaOwzzreAyFygAMiVFPDHgw4 VCh1/JILBGZXtY/RnP5gvLN+cenPafJwFwPzduC8k2yVYbvyTyeSupWuyqC+KRd9TTq8ctz7Z8l nXAfmzC8MJxVr6+XzGqPO08orJgN7xNiiggikaenuP93FjTXSzzrysWck4lRjCJV6753czEZV8s uDY9G7ADfSTXJlGifMqL3CrcfSR8JgSexw26dRfalMBHZxpJWEBdV7nT6KWEvbVGV3zMCX408bx zVCz09+J7vE3lTe7SwEk9QodHTun5swYza/BUF4K/Ma5QB0MGLR2Ij7hjO3MyR4mHGIp6zRk2Te i0M1beNn8LxzaWZnfpbJHiLINUH4SPt0juAsISSbqrdSeTrbfJA65ladhhH/c9OchAI3uYcikt X-Received: by 2002:a05:600c:1381:b0:483:7783:5373 with SMTP id 5b1f17b1804b1-483c21a5835mr36852675e9.23.1772061455906; Wed, 25 Feb 2026 15:17:35 -0800 (PST) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PULL 30/70] target/or1k: Use XML register definitions from GDB Date: Thu, 26 Feb 2026 00:13:30 +0100 Message-ID: <20260225231411.96482-31-philmd@linaro.org> X-Mailer: git-send-email 2.52.0 In-Reply-To: <20260225231411.96482-1-philmd@linaro.org> References: <20260225231411.96482-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::341; envelope-from=philmd@linaro.org; helo=mail-wm1-x341.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: 1772061759983158500 Import gdb-xml/or1k-fpu.xml from mainstream binutils, tag 'binutils-2_46' [*]. Register as CPUClass::gdb_core_xml_file. [*] https://sourceware.org/git/?p=3Dbinutils-gdb.git;a=3Dblob_plain;f=3Dgdb= /features/or1k-core.xml;h=3D0d13f355f5296ae426794eb3003dcc18fbbd49d5;hb=3Dr= efs/tags/binutils-2_46 Reviewed-by: Pierrick Bouvier Signed-off-by: Philippe Mathieu-Daud=C3=A9 Message-ID: <20260219191955.83815-23-philmd@linaro.org> --- MAINTAINERS | 1 + configs/targets/or1k-linux-user.mak | 1 + configs/targets/or1k-softmmu.mak | 1 + target/or1k/cpu.c | 2 +- gdb-xml/or1k-core.xml | 65 +++++++++++++++++++++++++++++ 5 files changed, 69 insertions(+), 1 deletion(-) create mode 100644 gdb-xml/or1k-core.xml diff --git a/MAINTAINERS b/MAINTAINERS index 693b51166f5..8da0b357fbb 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -304,6 +304,7 @@ M: Stafford Horne S: Odd Fixes F: docs/system/or1k/cpu-features.rst F: target/or1k/ +F: gdb-xml/or1k-core.xml F: hw/or1k/ F: include/hw/or1k/ F: tests/functional/or1k/meson.build diff --git a/configs/targets/or1k-linux-user.mak b/configs/targets/or1k-lin= ux-user.mak index 0ee3a05884d..9f8c178ef10 100644 --- a/configs/targets/or1k-linux-user.mak +++ b/configs/targets/or1k-linux-user.mak @@ -2,5 +2,6 @@ TARGET_ARCH=3Dor1k TARGET_BIG_ENDIAN=3Dy TARGET_SYSTBL_ABI=3Dcommon,32,or1k,time32,stat64,rlimit,renameat TARGET_SYSTBL=3Dsyscall.tbl +TARGET_XML_FILES=3D gdb-xml/or1k-core.xml TARGET_LONG_BITS=3D32 TARGET_NOT_USING_LEGACY_NATIVE_ENDIAN_API=3Dy diff --git a/configs/targets/or1k-softmmu.mak b/configs/targets/or1k-softmm= u.mak index 204283d604f..24d89bc3e65 100644 --- a/configs/targets/or1k-softmmu.mak +++ b/configs/targets/or1k-softmmu.mak @@ -2,6 +2,7 @@ TARGET_ARCH=3Dor1k TARGET_BIG_ENDIAN=3Dy # needed by boot.c and all boards TARGET_NEED_FDT=3Dy +TARGET_XML_FILES=3D gdb-xml/or1k-core.xml TARGET_LONG_BITS=3D32 TARGET_NOT_USING_LEGACY_LDST_PHYS_API=3Dy TARGET_NOT_USING_LEGACY_NATIVE_ENDIAN_API=3Dy diff --git a/target/or1k/cpu.c b/target/or1k/cpu.c index c64542a59a2..3d1c22bf75d 100644 --- a/target/or1k/cpu.c +++ b/target/or1k/cpu.c @@ -288,13 +288,13 @@ static void openrisc_cpu_class_init(ObjectClass *oc, = const void *data) cc->dump_state =3D openrisc_cpu_dump_state; cc->set_pc =3D openrisc_cpu_set_pc; cc->get_pc =3D openrisc_cpu_get_pc; + cc->gdb_core_xml_file =3D "or1k-core.xml"; cc->gdb_read_register =3D openrisc_cpu_gdb_read_register; cc->gdb_write_register =3D openrisc_cpu_gdb_write_register; #ifndef CONFIG_USER_ONLY dc->vmsd =3D &vmstate_openrisc_cpu; cc->sysemu_ops =3D &openrisc_sysemu_ops; #endif - cc->gdb_num_core_regs =3D 32 + 3; cc->disas_set_info =3D openrisc_disas_set_info; cc->tcg_ops =3D &openrisc_tcg_ops; } diff --git a/gdb-xml/or1k-core.xml b/gdb-xml/or1k-core.xml new file mode 100644 index 00000000000..0d13f355f52 --- /dev/null +++ b/gdb-xml/or1k-core.xml @@ -0,0 +1,65 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + --=20 2.52.0 From nobody Thu Apr 16 20:57:20 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=1772061644; cv=none; d=zohomail.com; s=zohoarc; b=RwHmPiqHw/ai3vMjPPoHVXh5cWwEmu5zS6oiu+wWuiWVPBaIHq7COQgaarZA1VnQ/B1vSg/ii55OKwjP8whv7llpUXZeQX/uebXLFyHk+jOAyEMyr4jaUiimKMk2QaWJ7p7RzPNewtPozA+ROcoIUy9ZuMQO5a+k4HARBak/tjY= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1772061644; h=Content-Type:Content-Transfer-Encoding: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:Cc; bh=OP5Mv3Wzkuhv98as4xw1IeO2sLMsxkiyChA8fkXY4KE=; b=Etk/pixM3r6/JpCRDd5EZP4qZSWGHwLTXbqYnvy51aeTVFuX+wQXtQ6sxDselIZuN8vPVLIrFRwgK4U52SeByxBj7Fb35Rq/Pla/ex4GbC0K3o8goo4H+apHrBf7dIirZhWcSa+IHe7dKUKhf/Kk2Tm5Fzya3NC4uk8Pncqgf2w= 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 1772061644631164.21103120523378; Wed, 25 Feb 2026 15:20:44 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1vvO9J-0004Md-5X; Wed, 25 Feb 2026 18:18: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 1vvO8Z-0003Sh-1X for qemu-devel@nongnu.org; Wed, 25 Feb 2026 18:17:50 -0500 Received: from mail-wm1-x330.google.com ([2a00:1450:4864:20::330]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1vvO8W-00036y-6y for qemu-devel@nongnu.org; Wed, 25 Feb 2026 18:17:45 -0500 Received: by mail-wm1-x330.google.com with SMTP id 5b1f17b1804b1-48371bb515eso3588505e9.1 for ; Wed, 25 Feb 2026 15:17: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 5b1f17b1804b1-483bd70e6c9sm78277195e9.8.2026.02.25.15.17.41 for (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Wed, 25 Feb 2026 15:17:41 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1772061462; x=1772666262; 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=OP5Mv3Wzkuhv98as4xw1IeO2sLMsxkiyChA8fkXY4KE=; b=BpuKwIJEOgT2ohrBdWUEcEv4qxHsKEWowaw2gYn0utzoJvFmE+LcAw2VV7+m3f5gIx HjC4ZbEuwfdObFBNO+1mHZ7Y92+iRo3AQomLuXyYJNNOuZIzJFu4HUp9Ty/+D5MG+8Bb WQqh9FxTOFYmzLZwDHSGoazWroKrK/MGgIJZTu46jTomNUlsE4O0jY9u85Zwlh8ut297 JiC3W/nit34g1TPliaxyTqUIzFWm8OmwhZsUiVpYT5kVCAwk3VgFc+ttPDLym99uWGZl TkGhIFOxf4ENyhczEY/5abg6EKSQNYHNKNgXlE8K/GifptWs40ZMuMCIZqXW76107HOq YJ1A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1772061462; x=1772666262; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-gg:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to; bh=OP5Mv3Wzkuhv98as4xw1IeO2sLMsxkiyChA8fkXY4KE=; b=Xs9OTfMV2w9QmdKmaIGU0Ia+YyjwXVLlKSN9G6sbgW6K/YyCm7fJ4XKCqZK38p8o/N lo/vUisX5ANALc4YjbpUFRWYytHYu7LM4lHNuoIM8gTEh2cGbzWdWWUGBarRG4YY1VcB pV1WGlBKl6txuy7P0pvFyRPbmjYBq4MTsvdC4wzhLLWivnwMyiqOFez9zlnnkk6WWGPq vs/BpZq+0xTTmJjr/QUdE3ppAMIdV4xZ/OGplX4JZ9bRuvdIt+lwFnCmVlq1RqVg/csH K+/MUst/M7Q9yoK6lC0YTPgTk33lKXCDptDZERJROZFlOPUq4hCjlJvaOxl53U6/WYA5 zylg== X-Gm-Message-State: AOJu0YzIgjBucGJj+cnximSwQ9SyMccsg+ufqB/i7yccUHBU4Iunvp1h 1toaIM998caYKdhbJZZbOfAtIfm3mc+RBO4gZ3MH2qAwamhN2vtEqbF3V09NYHgtq9BGvXe22xB bT6ZpiWg= X-Gm-Gg: ATEYQzz7IkIYmjmBQBPstYhtDz9FS+BcX4mRDyxL84/u9nwz8QoYwMejNgb8jyfBYET lsJ98ixDPrqzkgWOpOvWo/CehegoMyYyjADhgxDvI11xKv6TovPeOD5+kaHq9rVla5pm2KO+gHS YL/vziguJUVxZliw4bG/NU6Tgd18BUDI3URatwAQXPAzfJvZwL0wb0sMTlXmK8fxfB2DutQkNqu XXNFpp+7ZHvEUW6ybTpbJrZnsNlSd9IkDYkgmM8g5LbPlTj5fqesnE9bbQn7xtbm2C17cBCHjR3 pMUNmEP/lkTEnmyCBpiHE3th7WPJ+zDu+uBkjxMEKrCqwUu+iap3WrMS4ZOQZy2z/c0SIv4ABbN QxdwnbrAWaJ0gBn9m02pkmEDtDy5IYjjdmNWK74EQH41jHkecOYKknlNwsEEqImEa7zTQaXivjw lozz3jPAM5cJgDwdpQdzIcQqZ0fUTH5QVpWKwMBz+ckWfxq/6WXcUJRmDB9WZGUoEZZyJpAr1I X-Received: by 2002:a05:600c:820a:b0:477:fcb:2256 with SMTP id 5b1f17b1804b1-483c3dd7940mr1324325e9.17.1772061462369; Wed, 25 Feb 2026 15:17:42 -0800 (PST) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PULL 31/70] target/riscv: Remove empty target_monitor_defs() symbol Date: Thu, 26 Feb 2026 00:13:31 +0100 Message-ID: <20260225231411.96482-32-philmd@linaro.org> X-Mailer: git-send-email 2.52.0 In-Reply-To: <20260225231411.96482-1-philmd@linaro.org> References: <20260225231411.96482-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::330; envelope-from=philmd@linaro.org; helo=mail-wm1-x330.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: 1772061662707158500 Prefer the stub target_monitor_defs() symbol introduced in commit bf957284006 ("monitor: remove target-specific code from monitor.c"). Reviewed-by: Daniel Henrique Barboza Reviewed-by: Pierrick Bouvier Reviewed-by: Chao Liu Signed-off-by: Philippe Mathieu-Daud=C3=A9 Message-ID: <20260219191955.83815-24-philmd@linaro.org> --- target/riscv/monitor.c | 13 ------------- 1 file changed, 13 deletions(-) diff --git a/target/riscv/monitor.c b/target/riscv/monitor.c index ccb7eb44d02..a9d31114442 100644 --- a/target/riscv/monitor.c +++ b/target/riscv/monitor.c @@ -244,19 +244,6 @@ void hmp_info_mem(Monitor *mon, const QDict *qdict) mem_info_svxx(mon, env); } =20 -/* - * We have way too many potential CSRs and regs being added - * regularly to register them in a static array. - * - * Declare an empty array instead, making get_monitor_def() use - * the target_get_monitor_def() API directly. - */ -const MonitorDef monitor_defs[] =3D { { } }; -const MonitorDef *target_monitor_defs(void) -{ - return monitor_defs; -} - static bool reg_is_ulong_integer(CPURISCVState *env, const char *name, target_ulong *val, bool is_gprh) { --=20 2.52.0 From nobody Thu Apr 16 20:57:20 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=1772061852; cv=none; d=zohomail.com; s=zohoarc; b=AV7vgeFINbTOcLlnrSLOoC0oTlCEY05z5z87p8gVNpbee5QbCpBDwp2aN8pTv4e1ulIr0lMNXBoXDDJRpwSuJsMVSc6dwJxN1TYSwVuBj+K85xu/zRCfGCUP8RKnFFVlt8MoTiUMqODpbjZveoYfX0VMV8YolNo9ZqueLT3Vkds= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1772061852; h=Content-Type:Content-Transfer-Encoding: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:Cc; bh=KwFBaOjwYWri1oyotMlqElEX9mt5n22sEObHgA60FZc=; b=YMD7QiZwgVCvwfsKCPvUoD/rMnkNoTc9L8o3ifO8D7NwRr1ALWfLkq+jPTK/yY90rxDmXbF0mDzUiPo6LU3MZC+y2XXhn301K+clvOyhyqwo39eMHtB4vxr9o+ulgF4AZWADzhUaGEVqtenSUDiMD4M9nHs4OFJaIxeSVCmDAyg= 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 1772061852451213.069977288647; Wed, 25 Feb 2026 15:24:12 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1vvO8v-0003n8-3u; Wed, 25 Feb 2026 18:18:09 -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 1vvO8e-0003Yj-U0 for qemu-devel@nongnu.org; Wed, 25 Feb 2026 18:17:56 -0500 Received: from mail-wr1-x433.google.com ([2a00:1450:4864:20::433]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1vvO8d-00039M-38 for qemu-devel@nongnu.org; Wed, 25 Feb 2026 18:17:52 -0500 Received: by mail-wr1-x433.google.com with SMTP id ffacd0b85a97d-4375d4fb4d4so144830f8f.0 for ; Wed, 25 Feb 2026 15:17:50 -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-43995fb04e5sm2327545f8f.6.2026.02.25.15.17.48 for (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Wed, 25 Feb 2026 15:17:48 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1772061469; x=1772666269; 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=KwFBaOjwYWri1oyotMlqElEX9mt5n22sEObHgA60FZc=; b=kfBroIyrsVj8rKZBMSJKHyIKpC9Jy+HiOK1j8JOG7nw4ojzSp+G5D89Xy1Xw1znURl sWUfDeaZM5nXkk8MKRJ9LxyA1/LbH6/fOQYJaJybHkkG0xR/0iJbDN/4dDc6y4IzS+ZS vbqC7aP3GlZPhmm74boma4Vw5M1UPanXoctYJnuG4+RtX//LDBZ17L/ddUKnsSYYjYuU xkODlAY+NcyKQeV8SDsZ93nTcUMjb089+a/8cq3lgJq3wylUXarPs1Jx/blCetjKRpG+ 9iJ9RaU/k2cgdYNC8EXf6lz62TrYCjpzxlkY7Z5aTV5CSbCy38nfOQlcoTV4emTxn6Bq Du7g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1772061469; x=1772666269; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-gg:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to; bh=KwFBaOjwYWri1oyotMlqElEX9mt5n22sEObHgA60FZc=; b=U008rgEzVvRI2PsiYQGr/QRKFq6p1+psnxebbFVB8Jg/I0v6qTzx1OCZ5lam5IEiZo d23Xl5NjzQRByRS+V8uEZbFNXfOOc4h0kk6FvBEhwKrHrmR0dUg1DagD8JviP/5R1Lt8 OYIURxI++wp15Um+NBtDAq1knOKMBz5ZBCPnalUvS5QIGmh/G7ofbedvt6DXuKPEOeXA T7fAYFZnEuH74n7BJ0ymophsAwYkGkQnTWWh83/0G/fsoWDPW59LxZWoEcLZYoL/bwY7 6t5gMoZlo9NBEIPX9DxxAwj47F5SCo1V9zes7y41HIFkqb6WN1opQcrubac1DW8289KD jcog== X-Gm-Message-State: AOJu0YyVIGzAz1MDz/Er4Jzj4mxevEn0v3iFMEfAS4j5dzUfjPOyEONb qeIkgj5poDGjcQ4s9ok2F+RU5eADSXoEeq74m3/NMvW3C5CZ5K/Gc0SmX7bgp1ImJwUcokH84rv Smh/d6hY= X-Gm-Gg: ATEYQzzB17Jdk//VTjEADoFHqbn0N0HReW47ouMKlnvxXCMlx6neDdE0FmgpRhyxay4 qCONdyh9rEOJu/0FUSdYIajsNxhlvQ/CuG8m5GoxSk4zUBRb/YsZsw25mLdso+TcQlBkhI0x9kV VxevjDxiD5QViCGxfDAnHtRyFfRwqZk3Qa3DT/hTKIqoNwaBai9FPXt2ur+ntyHDV1IjbJJGu6n YF19WSJ8r8I06kLE91CaPHsdMtaXvrr4S1mBsdGnn+3jHAqQEluo1D0oPDp0l3mNAGb3k3AxwIy gNAzmwfbBXtfxYr3Zv3uNkb2u75x4QvR6XV5h4BMhF8U7Flri8KFQPBGJwE4Y2eMzWW8A9FvcN0 51oyDerlVcBKGEfuOcnzy6nzodANTBi0K3mCsj7lfXWbb2ahVqgXqVl6Y/ocnrXJV3eG8g804cA vTOP3d/ZRodhKRVzV0kp1R3+Xrq/dhm3xCERsa5NixP+tbriwlLbJ3fwr03V7bzaNtS/C2i0bE X-Received: by 2002:a05:6000:2212:b0:439:8dd7:18b5 with SMTP id ffacd0b85a97d-43997f34140mr596222f8f.37.1772061468919; Wed, 25 Feb 2026 15:17:48 -0800 (PST) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PULL 32/70] target/sparc: Factor sparc_cpu_gdb_write_register() out Date: Thu, 26 Feb 2026 00:13:32 +0100 Message-ID: <20260225231411.96482-33-philmd@linaro.org> X-Mailer: git-send-email 2.52.0 In-Reply-To: <20260225231411.96482-1-philmd@linaro.org> References: <20260225231411.96482-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::433; envelope-from=philmd@linaro.org; helo=mail-wr1-x433.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: 1772061854271158500 Factor sparc_cpu_gdb_write_register() out. Prefer ldn_p(target_long_bits/8) over target-specific ldtul_p(). Reviewed-by: Pierrick Bouvier Signed-off-by: Philippe Mathieu-Daud=C3=A9 Message-ID: <20260219191955.83815-25-philmd@linaro.org> --- target/sparc/gdbstub.c | 27 +++++++++++++-------------- 1 file changed, 13 insertions(+), 14 deletions(-) diff --git a/target/sparc/gdbstub.c b/target/sparc/gdbstub.c index ed52e521dcc..d19819cd1a9 100644 --- a/target/sparc/gdbstub.c +++ b/target/sparc/gdbstub.c @@ -124,19 +124,22 @@ static int sparc_cp0_gdb_read_register(CPUState *cs, = GByteArray *mem_buf, int n) return 0; } =20 +static unsigned sparc_gdb_register_bytes(void) +{ +#ifdef CONFIG_USER_ONLY +# if defined(TARGET_ABI32) + return 4; +# endif +#endif + return target_long_bits() / 8; +} + int sparc_cpu_gdb_write_register(CPUState *cs, uint8_t *mem_buf, int n) { SPARCCPU *cpu =3D SPARC_CPU(cs); CPUSPARCState *env =3D &cpu->env; -#if defined(TARGET_ABI32) - uint32_t tmp; - - tmp =3D ldl_p(mem_buf); -#else - target_ulong tmp; - - tmp =3D ldtul_p(mem_buf); -#endif + const unsigned regsz =3D sparc_gdb_register_bytes(); + uint64_t tmp =3D ldn_p(mem_buf, regsz); =20 if (n < 8) { /* g0..g7 */ @@ -145,11 +148,7 @@ int sparc_cpu_gdb_write_register(CPUState *cs, uint8_t= *mem_buf, int n) /* register window */ env->regwptr[n - 8] =3D tmp; } -#if defined(TARGET_ABI32) || !defined(TARGET_SPARC64) - return 4; -#else - return 8; -#endif + return regsz; } =20 static int sparc_fpu_gdb_write_register(CPUState *cs, uint8_t *mem_buf, in= t n) --=20 2.52.0 From nobody Thu Apr 16 20:57:20 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=1772061727; cv=none; d=zohomail.com; s=zohoarc; b=mDnt1mQq1V/XdH7ch+ffNJfGAQbERpYcagdPLtOFEh824AUmApeU1SD85Aiw2VwLK8hytyEJqKFIUAl7PBv59XZya9FhGRCxXwj7jmttOzORDwFLnw3mimcGTAe8/nhGN/9jy52LDdAX1CbCP6K+kBRq6NiaM4rxisLPEFZm6jk= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1772061727; h=Content-Type:Content-Transfer-Encoding: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:Cc; bh=7d1eFFQbEOclqX67uZYYSXzl6X/j5CbETWLmC2Ltn6I=; b=ndOzdc9n0Ve2KZb2gRaJhDdlULf7o4wj3CVWWkg4x5XXgHa3iEmxb9h+/bCgLUsV2an5TF/uavAJWpnSIQdkXhGUnzZDy5tzky2xi5EA+ysnyp8tKUgpECU7gyFGymQiaHAAh9Y8wsJAvfMgawuHmREiYS/hAWk2ApuAh2WYfFY= 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 1772061727798942.5788723160291; Wed, 25 Feb 2026 15:22:07 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1vvO97-0004BP-Jg; Wed, 25 Feb 2026 18:18:21 -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 1vvO8m-0003hg-TQ for qemu-devel@nongnu.org; Wed, 25 Feb 2026 18:18:04 -0500 Received: from mail-wm1-x331.google.com ([2a00:1450:4864:20::331]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1vvO8k-00039j-4Y for qemu-devel@nongnu.org; Wed, 25 Feb 2026 18:18:00 -0500 Received: by mail-wm1-x331.google.com with SMTP id 5b1f17b1804b1-48375f10628so1979515e9.1 for ; Wed, 25 Feb 2026 15:17: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 ffacd0b85a97d-43995056115sm2974279f8f.14.2026.02.25.15.17.54 for (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Wed, 25 Feb 2026 15:17:55 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1772061476; x=1772666276; 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=7d1eFFQbEOclqX67uZYYSXzl6X/j5CbETWLmC2Ltn6I=; b=r2dRMEymnpG3SqWLxDJFKaHyF8EBlKjj/Nun5i16+thXG3uST0+MW5q/x5knVvLYjF OWQ2D7V+EfPkKlhfGGbge3W6lpGPEGW10kVhvMZFjbL/1SB6F4tcWUL4llVF1Vin40r5 zGLX8QPYr1/gm+GPLbteBw2tEu8bAQbt9Q2CVH6xERhWPJjnvTz3k06yhRj19BfbMkdm ceKXogXY6FvwgPSez9pBlYigRpvgtTbjdIxRd+hQH+w9QooiXYa+RP8BWA6ymqjqhxOW c9xhmzFI1tFenXnldmr1Nr+BO4Pg6ik7BOIIwu7C0JrkdBluCMCtZjw5V1MY/202Ftoq 6DcQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1772061476; x=1772666276; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-gg:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to; bh=7d1eFFQbEOclqX67uZYYSXzl6X/j5CbETWLmC2Ltn6I=; b=S2pUSn0DPUnEdiK3oq1DAGBTCb0jZSH/0LhEKt/Tex7RJLBDuo4jnSp9gdpgWSDeWh 8cqaMCkt7B/1/0jywxYV/QLJrzox5M0NPMZPQNuJ7QkyCj7MhkO5KbCZFRZ+uGlpH3FQ SOo+9JE4aF2R6PilS5Hv1ubP5Qdemtaj9VP2ZoYvfzHEMlgygA56gI+vurgpLJK6psmb 8dY10Dz642uwUWtkwRwZ1ljniC6Hku7koNOHARJLcsAN9Xles4PFVPC50hzdB9MwowEw ampK8rN+CQ96kUKw83vsynCk2Ckk5FlE5m4qXDiruIShUDZifL0ucoNihM3QprFQTJtc ozvA== X-Gm-Message-State: AOJu0YzcJ7vMmiu5Emr/Hf8+/1oqeafZx9eF6L21tsC7g4Y8c/8eGT6q 4ktCzx+PIKjP8K2HKqEfbv0OE8F/xZ1WJ8HGMl0tC8WOKhpNIEKSAt0egHyD0FmNs7TjLL3fvO/ hc2y++to= X-Gm-Gg: ATEYQzx2+tP+CFOdTrcmkEn3akzASgtGXS/LO6hUYAQNd1y0RT/LBkwPdGM8nvDdl5c S738wL9S8rcGENhjrnIMMBU+UDX63KrFuqSQDAAejjUsI4AtzUOUIrEyAY+UmOu8d7PPpStwwCS 0lKcSRafQO5h9FLlkfcruNEthb+3c0J3/fA1wp/IpKwcWbqjWAoQ6L7C+pINDQIQcMTqp48ZgfI W02wmzZDMEnvm4U5GpE2Sdyvu1XQt9mf/TUWSkkOaDDy0TJ/KD7i7ZhYfN/UqNoTzNB3vioQlp2 zuyLsp57CFpD8sizPqM+iYxr2syy/gj58jpzjHLcgUTqB+QJfC5CD8rRMnce8EZwmR6N4OWc7th bxAP/sZ/EkusuvjUi5+TUiWJizIRYMx7XBWliyA0VL/dZv83aVuVvtwsfh4zINV9IcUw85Ym5MM ZYCw6QxBNUijMUUJs1UVr+3Bltrp6KrY8PDIRQJukYLkMs4RB3XnzZSp6oqGtUTp67BH5HRAGk X-Received: by 2002:a05:600c:4e8e:b0:47f:f952:d207 with SMTP id 5b1f17b1804b1-483a95e251fmr274592245e9.19.1772061475786; Wed, 25 Feb 2026 15:17:55 -0800 (PST) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PULL 33/70] target/ppc: Replace ldtul_p() -> ldn_p() Date: Thu, 26 Feb 2026 00:13:33 +0100 Message-ID: <20260225231411.96482-34-philmd@linaro.org> X-Mailer: git-send-email 2.52.0 In-Reply-To: <20260225231411.96482-1-philmd@linaro.org> References: <20260225231411.96482-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::331; envelope-from=philmd@linaro.org; helo=mail-wm1-x331.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: 1772061729808158500 Prefer ldn_p(target_long_bits/8) over target-specific ldtul_p(). Reviewed-by: Pierrick Bouvier Signed-off-by: Philippe Mathieu-Daud=C3=A9 Message-ID: <20260219191955.83815-26-philmd@linaro.org> --- target/ppc/gdbstub.c | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/target/ppc/gdbstub.c b/target/ppc/gdbstub.c index ece1e5c9bd7..e0aae9c9eaf 100644 --- a/target/ppc/gdbstub.c +++ b/target/ppc/gdbstub.c @@ -23,12 +23,12 @@ #include "gdbstub/helpers.h" #include "internal.h" =20 -static int ppc_gdb_register_len(int n) +static unsigned ppc_gdb_register_len(int n) { switch (n) { case 0 ... 31: /* gprs */ - return sizeof(target_ulong); + return target_long_bits() / 8; case 66: /* cr */ case 69: @@ -42,7 +42,7 @@ static int ppc_gdb_register_len(int n) /* lr */ case 68: /* ctr */ - return sizeof(target_ulong); + return target_long_bits() / 8; default: return 0; } @@ -85,7 +85,7 @@ int ppc_cpu_gdb_read_register(CPUState *cs, GByteArray *b= uf, int n) { CPUPPCState *env =3D cpu_env(cs); uint8_t *mem_buf; - int r =3D ppc_gdb_register_len(n); + unsigned r =3D ppc_gdb_register_len(n); =20 if (!r) { return r; @@ -127,7 +127,7 @@ int ppc_cpu_gdb_read_register(CPUState *cs, GByteArray = *buf, int n) int ppc_cpu_gdb_write_register(CPUState *cs, uint8_t *mem_buf, int n) { CPUPPCState *env =3D cpu_env(cs); - int r =3D ppc_gdb_register_len(n); + unsigned r =3D ppc_gdb_register_len(n); =20 if (!r) { return r; @@ -135,17 +135,17 @@ int ppc_cpu_gdb_write_register(CPUState *cs, uint8_t = *mem_buf, int n) ppc_maybe_bswap_register(env, mem_buf, r); if (n < 32) { /* gprs */ - env->gpr[n] =3D ldtul_p(mem_buf); + env->gpr[n] =3D ldn_p(mem_buf, r); } else if (n < 64) { /* fprs */ *cpu_fpr_ptr(env, n - 32) =3D ldq_p(mem_buf); } else { switch (n) { case 64: - env->nip =3D ldtul_p(mem_buf); + env->nip =3D ldn_p(mem_buf, r); break; case 65: - ppc_store_msr(env, ldtul_p(mem_buf)); + ppc_store_msr(env, ldn_p(mem_buf, r)); break; case 66: { @@ -154,17 +154,17 @@ int ppc_cpu_gdb_write_register(CPUState *cs, uint8_t = *mem_buf, int n) break; } case 67: - env->lr =3D ldtul_p(mem_buf); + env->lr =3D ldn_p(mem_buf, r); break; case 68: - env->ctr =3D ldtul_p(mem_buf); + env->ctr =3D ldn_p(mem_buf, r); break; case 69: cpu_write_xer(env, ldl_p(mem_buf)); break; case 70: /* fpscr */ - ppc_store_fpscr(env, ldtul_p(mem_buf)); + ppc_store_fpscr(env, ldn_p(mem_buf, r)); break; } } --=20 2.52.0 From nobody Thu Apr 16 20:57:20 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=1772061900; cv=none; d=zohomail.com; s=zohoarc; b=blq48gdWa6XS3xzPx0MgUg/eMBKfOVSYxyGicj3cPV/sDEynD9Alh9iHABrK1pcp4XlwMO2exJorQn+cjt7lCe6kH+JdRCgIazXqk0Mrb/zrofUXBEJccYSSyjtKARvmD3VIDRDQ7GDk4qGIQF3jJeqB7nUdt9JojLleBmxnHDM= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1772061900; h=Content-Type:Content-Transfer-Encoding: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:Cc; bh=+6sM91w2bCKDd02R0x9+LUldc1Xf848frIT1oZOkaR4=; b=L0zkITSjUDkQuJu5XVGCzMOO1EzSv848hYaB9L64G1D/I/bKjFFJhH677g0sPfPJJhx31RGk+p95cbdN6RGlDtHzuG0vRuAZb66FtNl6Adw+EBJnFU11bz55w7XLh9VdinNP6nPXMb5X6qY6a5/g2/TUS8nNBCksQnqro+nJu34= 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 1772061900300957.3294663261399; Wed, 25 Feb 2026 15:25:00 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1vvO94-00048y-JM; Wed, 25 Feb 2026 18:18:19 -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 1vvO8t-0003nO-B3 for qemu-devel@nongnu.org; Wed, 25 Feb 2026 18:18:08 -0500 Received: from mail-wm1-x32a.google.com ([2a00:1450:4864:20::32a]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1vvO8r-0003Af-Mc for qemu-devel@nongnu.org; Wed, 25 Feb 2026 18:18:07 -0500 Received: by mail-wm1-x32a.google.com with SMTP id 5b1f17b1804b1-48370174e18so1470365e9.2 for ; Wed, 25 Feb 2026 15:18: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 5b1f17b1804b1-483bfccd7b6sm20812405e9.24.2026.02.25.15.18.01 for (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Wed, 25 Feb 2026 15:18:02 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1772061484; x=1772666284; 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=+6sM91w2bCKDd02R0x9+LUldc1Xf848frIT1oZOkaR4=; b=a1sL+wP4VrRcg+onIzrJzYOBi0WfvpLFhD2B/YB9Ax5pqs51ROmgc2uL0DV8FTFf0r VrYn/grIXEJ/6TnON0DYleg88OLPqLFKaXiljUBu006T3tnJivP3rNR8iMDQiuPpBzLl VtVKcMIDgJtRQsS6AX2kzNVTEQ1kGed5ve5f5yAbkmlGI/sk/3+paVzwQH+lzBEmFGRt xct3eypg4HhpiFugowy6yJBE8Uw3JvP/ql05YMGrYFll+6xgD73ye+Ai9PPGHXkDW4as /RADPnX13Z6XjLNGWQdruD6YT8HDwOjduTyrrtvrwDaDM+ropoMG2OPT+31MZ6VaO9Sw DP6w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1772061484; x=1772666284; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-gg:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to; bh=+6sM91w2bCKDd02R0x9+LUldc1Xf848frIT1oZOkaR4=; b=q45mdGCmRrjgNPZCVfEnAtGB5PAmAkRc9849tXq3I68VHbej39nStbYV8JNZSxZ3XO LFN6Vj9eTkbDspEzNDMXOqQI1Q3515qUVbbUtqC7Cqdx0NZEA/cU626Rw0D4/Vwn9kaE sfIxdyWhNwEWDw643uHLMRWqvuQn1Fmo+375kY5j4DERboxk4KzvdP0kWHtLXx4Orldg wrgIfr5NpDEgo3sPwUNwraSi0SI/yRMIvA648emxhwsgqKYh4BfmmhQiaMyDL5CH54x5 C1+tBFoZ9epruuQJApS/bvpIPOsY6Tp1Ai5qPWj9HSIDQ0xmXieBNzWWWOzuUftjOKvL qE0A== X-Gm-Message-State: AOJu0YzFv8/MIPaELfgqxrfFO4P47m505rrUyb1Db88PQpwmjVNTv6d3 k4XTFd1+QqqT8CXh1xY2ArkaQ0/CiPQDcf+9lX6ISPSnVVdKVPSkC+ZbsXpZN+COVeBfbFcA/Ud FMDskCso= X-Gm-Gg: ATEYQzy0JzUHcl/IUICAChp5BYFDDFApGPZeccTglyTcyk20OYDjkFtrVMbp0e/eQXV qWX9kPBKZptuHPo0sjW4nJ9+UwUy4Ry+p40Rsyx6Vwku0Tv4KN7UWtsPMDbmUTeLg4uTVj2c2PQ bYekon1ouLtGfKUgsFD6f92vzeIbGBGvd4eDdL8rDCi8Q43H1mXB+CS8/Hzip95pT0ixKxpIbxZ agq6H5hglb75v+iOXHmKTa9v6GPOHwDwagUVzxgP2ZkKP5JEdjRHct7olu1qYLlfYz17PGGtHtz 6JAvapKdw5ofRoySoRLQO0tnmtp8fTGZds+orYvs+JIRCjxpH/m/TvYvQ+q7WdoYkYck1BHVkdo qwqPVlLqsS4RlkIp3t04eW3g6a8EL0BSF4cMVnzok/SQeFsbTs97Fd26ImjaGiJMhzAHp4Qt37H 1NECfyrBZfu9fJBDHZncJgTNP8awe0qU+cGRMPK9QJXDnuXeIn2jhor2IDIe50aXE929Q8JmNr3 9WM3kefozU= X-Received: by 2002:a05:600c:6098:b0:480:4b5d:9ec with SMTP id 5b1f17b1804b1-483c21b31b0mr35153755e9.33.1772061483833; Wed, 25 Feb 2026 15:18:03 -0800 (PST) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PULL 34/70] target/mips: Replace ldtul_p() -> ldn_p() Date: Thu, 26 Feb 2026 00:13:34 +0100 Message-ID: <20260225231411.96482-35-philmd@linaro.org> X-Mailer: git-send-email 2.52.0 In-Reply-To: <20260225231411.96482-1-philmd@linaro.org> References: <20260225231411.96482-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::32a; envelope-from=philmd@linaro.org; helo=mail-wm1-x32a.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: 1772061900501158500 Prefer ldn_p(target_long_bits/8) over target-specific ldtul_p(). Use deposit64() in gdb_write_register(), allowing to remove 'target_ulong' type uses. Reviewed-by: Pierrick Bouvier Signed-off-by: Philippe Mathieu-Daud=C3=A9 Message-ID: <20260219191955.83815-27-philmd@linaro.org> --- target/mips/gdbstub.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/target/mips/gdbstub.c b/target/mips/gdbstub.c index 169d47416a6..8e0b08a096c 100644 --- a/target/mips/gdbstub.c +++ b/target/mips/gdbstub.c @@ -18,6 +18,7 @@ * License along with this library; if not, see . */ #include "qemu/osdep.h" +#include "qemu/bitops.h" #include "cpu.h" #include "internal.h" #include "gdbstub/helpers.h" @@ -77,14 +78,15 @@ int mips_cpu_gdb_read_register(CPUState *cs, GByteArray= *mem_buf, int n) =20 int mips_cpu_gdb_write_register(CPUState *cs, uint8_t *mem_buf, int n) { + const unsigned regsz =3D target_long_bits() / 8; CPUMIPSState *env =3D cpu_env(cs); - target_ulong tmp; + uint64_t tmp; =20 - tmp =3D ldtul_p(mem_buf); + tmp =3D ldn_p(mem_buf, regsz); =20 if (n < 32) { env->active_tc.gpr[n] =3D tmp; - return sizeof(target_ulong); + return regsz; } if (env->CP0_Config1 & (1 << CP0C1_FP) && n >=3D 38 && n < 72) { switch (n) { @@ -104,7 +106,7 @@ int mips_cpu_gdb_write_register(CPUState *cs, uint8_t *= mem_buf, int n) } break; } - return sizeof(target_ulong); + return regsz; } switch (n) { case 32: @@ -127,7 +129,7 @@ int mips_cpu_gdb_write_register(CPUState *cs, uint8_t *= mem_buf, int n) #endif break; case 37: - env->active_tc.PC =3D tmp & ~(target_ulong)1; + env->active_tc.PC =3D deposit64(tmp, 63, 1, 0); if (tmp & 1) { env->hflags |=3D MIPS_HFLAG_M16; } else { @@ -144,5 +146,5 @@ int mips_cpu_gdb_write_register(CPUState *cs, uint8_t *= mem_buf, int n) break; } =20 - return sizeof(target_ulong); + return regsz; } --=20 2.52.0 From nobody Thu Apr 16 20:57:20 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=1772061815; cv=none; d=zohomail.com; s=zohoarc; b=HrJ3EyC57iA7+QKnyU8Pac5sk6kJ6bmuccRDd1HvkQA1qpY5JTpn9W/vx1YLWTB84QbxeoazTkheJTZWSfzVQNcoynlVXa6kkPlg+JXE2oij2B0xjrrQTvJBVP7s816M1+6VdrteVjTx1FZ9nK89tv/IkFVtx8v1ebRXnzm8hlA= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1772061815; h=Content-Type:Content-Transfer-Encoding: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:Cc; bh=58SjvSBdSY2N/SByegBRN693qynS9JIU0XpdNhP0eoo=; b=K6+2oAz2w/0CNIXoqw+WtfyrfxC2fZFQ3QQLszyRhGUcI5f0aWFpcJ1TYaMURz/1Qa9s/SBWNCJgcyrCxx2rntn9Q0wWFcDjUBUpxXWlrmq1aGiLpXLB8uCM13zI7Taj3HuMPYi+STjdSNaJ1NxAGow1GIjsOJdyCkxNtFT70Yc= 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 177206181555431.521206819304325; Wed, 25 Feb 2026 15:23:35 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1vvO9K-0004bf-Tm; Wed, 25 Feb 2026 18:18:34 -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 1vvO91-00049l-M9 for qemu-devel@nongnu.org; Wed, 25 Feb 2026 18:18:17 -0500 Received: from mail-wm1-x32b.google.com ([2a00:1450:4864:20::32b]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1vvO90-0003Ay-2i for qemu-devel@nongnu.org; Wed, 25 Feb 2026 18:18:15 -0500 Received: by mail-wm1-x32b.google.com with SMTP id 5b1f17b1804b1-4836f363d0dso2335045e9.3 for ; Wed, 25 Feb 2026 15:18:13 -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-483bd7507adsm109214175e9.9.2026.02.25.15.18.09 for (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Wed, 25 Feb 2026 15:18:11 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1772061492; x=1772666292; 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=58SjvSBdSY2N/SByegBRN693qynS9JIU0XpdNhP0eoo=; b=jO6waNomeUIib6erL1hNPytYeqyY0+JgL9mxdRhCfsk+DNBJBH/cySSjOaODqDHjaO iRAFyl/aXC56fZMtbL7FQiRSn8nF8KZnYcCrNJRiI9eg/LeIwe6vOTKuV3aaxT4QtcAX zLiQo5CwWJJd49iooGAu4ItnqWzW8NDsuFqkU6Tbux9FyGcyU2ZQK5MUunVrd7fUjTEl w2MeGhEZRyK8yE0DyIIp67Iu0hDk2UiIfwDMmfVVv1XD9j4gyO4yKYjbbHGmFmJDBieb ehfgPHU/xaHB2U48vIN0nbDqjCWQYretQO4d4QhLkZ4vX7cy80imOMB/cgHywvY9pqRE +K7g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1772061492; x=1772666292; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-gg:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to; bh=58SjvSBdSY2N/SByegBRN693qynS9JIU0XpdNhP0eoo=; b=t2vI/2dA7cyYPX6Sw5SfvnxTaHQ5fqst8/MCN3NXVKb46avQ+O2AXCOrIJVAVbKKKQ u95FYTHSXuOgYTAuEOT9KW4oko8t+uqNeJ9g84QQI5P/hsGh+ZAVGPlITZ068K3usDl4 k8ymVA4BuZtA+AgVABlEENOOHpmuyKRFSk+xz3T4GVlXeo+RupoS68nKTqSdQrYVWG8j olYP1WBUHrPA+KYuGWgoDLNKvmCBFxHYmJZ2q0mWrbJq4AZEUAwrUibcyihEPL50/HCP duIVSM/iiFmC8hO8oZev+TTnyveHcqqWP0E6RghdcWHvSB7SIhZcI2dW9Wm16hMK1yfj wHfA== X-Gm-Message-State: AOJu0YyTTszSiNypZGzRLLDNCITjTsD58WrsZZfvtUzFihiknNywwfb1 cEEhlCIm/QkldSHeLW8uSzhEfoMn/Hkp/qOZXoAek1cMoCeZ8RIfENhKx8yV36hcsLNGbOZ+gU1 Chvgof3E= X-Gm-Gg: ATEYQzynnj3GegJAyQX+kZKId+l2kmrkMSFc1Il6MAtwf1hZdazGW2rvdqIF4SN55s9 yhaSHavdBt4sGVREgdcD6eI50ZSwuMVCJXn4PzRs5zFC/0gMAuIYNzFmDDk57w6qI3Xlc/UFCRf 9aigQKzWS8yYFBn0FYawFVf35+TZ1k6VLoByve6bzJPsEAMEUP+hG2i09pQmsk2QtrLgbgxQbge HhA7+gATR3njc6EowkxH+70s5YcHhDYf2tmsTy5WoniOAABLS2aF7la6Sl+zdRwsi5b9hVlzvO0 qQPK0Bw2KuxpxLcAJcDO3XD/qbI/YtciGRNI1k5LDdQf993VhmmEfZHsqbUS6fkpcbjeD82KP+r KAqU0YbTXGNiCYuI1OxykFIItjTXOyb5KGDONTC8cjzVjXg5Jpkf9412GX2PRDqIRUOye3HwXjX gRIw6n8tTl4OE9W1SrU0vv8AEnRQ6ai92pMdU9UocTX3KQMval3hjv4J9V0RgKIPjLBabZco9f X-Received: by 2002:a05:600c:5397:b0:483:56c4:73ac with SMTP id 5b1f17b1804b1-483c216bf67mr35719615e9.7.1772061491982; Wed, 25 Feb 2026 15:18:11 -0800 (PST) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PULL 35/70] target/riscv: Replace ldtul_p() -> ldn_p() Date: Thu, 26 Feb 2026 00:13:35 +0100 Message-ID: <20260225231411.96482-36-philmd@linaro.org> X-Mailer: git-send-email 2.52.0 In-Reply-To: <20260225231411.96482-1-philmd@linaro.org> References: <20260225231411.96482-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::32b; envelope-from=philmd@linaro.org; helo=mail-wm1-x32b.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: 1772061816164158500 Prefer ldn_p(riscv_cpu_is_32bit) over target-specific ldtul_p(). Reviewed-by: Richard Henderson Reviewed-by: Alistair Francis Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Pierrick Bouvier Reviewed-by: Daniel Henrique Barboza Reviewed-by: Chao Liu Message-ID: <20260219191955.83815-28-philmd@linaro.org> --- target/riscv/gdbstub.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/target/riscv/gdbstub.c b/target/riscv/gdbstub.c index 1934f919c01..f89b20ea84a 100644 --- a/target/riscv/gdbstub.c +++ b/target/riscv/gdbstub.c @@ -191,14 +191,15 @@ static int riscv_gdb_set_csr(CPUState *cs, uint8_t *m= em_buf, int n) { RISCVCPU *cpu =3D RISCV_CPU(cs); CPURISCVState *env =3D &cpu->env; + const unsigned regsz =3D riscv_cpu_is_32bit(cpu) ? 4 : 8; =20 if (n < CSR_TABLE_SIZE) { - target_ulong val =3D ldtul_p(mem_buf); + target_ulong val =3D ldn_p(mem_buf, regsz); int result; =20 result =3D riscv_csrrw_debug(env, n, NULL, val, -1); if (result =3D=3D RISCV_EXCP_NONE) { - return sizeof(target_ulong); + return regsz; } } return 0; @@ -225,11 +226,12 @@ static int riscv_gdb_get_virtual(CPUState *cs, GByteA= rray *buf, int n) static int riscv_gdb_set_virtual(CPUState *cs, uint8_t *mem_buf, int n) { if (n =3D=3D 0) { -#ifndef CONFIG_USER_ONLY RISCVCPU *cpu =3D RISCV_CPU(cs); + const unsigned regsz =3D riscv_cpu_is_32bit(cpu) ? 4 : 8; +#ifndef CONFIG_USER_ONLY CPURISCVState *env =3D &cpu->env; =20 - target_ulong new_priv =3D ldtul_p(mem_buf) & 0x3; + target_ulong new_priv =3D ldn_p(mem_buf, regsz) & 0x3; bool new_virt =3D 0; =20 if (new_priv =3D=3D PRV_RESERVED) { @@ -237,7 +239,7 @@ static int riscv_gdb_set_virtual(CPUState *cs, uint8_t = *mem_buf, int n) } =20 if (new_priv !=3D PRV_M) { - new_virt =3D (ldtul_p(mem_buf) & BIT(2)) >> 2; + new_virt =3D (ldn_p(mem_buf, regsz) & BIT(2)) >> 2; } =20 if (riscv_has_ext(env, RVH) && new_virt !=3D env->virt_enabled) { @@ -246,7 +248,7 @@ static int riscv_gdb_set_virtual(CPUState *cs, uint8_t = *mem_buf, int n) =20 riscv_cpu_set_mode(env, new_priv, new_virt); #endif - return sizeof(target_ulong); + return regsz; } return 0; } --=20 2.52.0 From nobody Thu Apr 16 20:57:20 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=1772061822; cv=none; d=zohomail.com; s=zohoarc; b=PDZDCEMfBgcLh2x1cbxjcBVaLgsdUstO+orCUdSFykOrDOhHARxQxlNC70+D+72D5jI3bAuI05pgN7balu0viri4TJH49L8rfhGHW5XEkBdhhsQ2TvmSi35D6M4LmOzagpa9eddnCIm3HME+v2hvnGwCWKlXp99Sy22CA58SmFA= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1772061822; h=Content-Type:Content-Transfer-Encoding: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:Cc; bh=Qx8l/7wXfvDzOx35Ak8qi4667/GSVMw0wLGmPN1fR18=; b=BiUB/lRX+Zp6Q19nEY1Mqpt6ZMmTl05Ib79nu85Sb41rdGR9uMTOPlzJkcPvFOt+bz5uF6hSN0ealinJAFFoSbI5qa4cUl6HrcicQk/1T1aPK0nIiyxMI59MXE/BkELyaYStaPx2FESjtKGUv5tq7+aDYuOdPCM5Asz9oxCRHFQ= 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 1772061822923492.31840633991885; Wed, 25 Feb 2026 15:23:42 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1vvO9L-0004io-KX; Wed, 25 Feb 2026 18:18:35 -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 1vvO98-0004G8-Hv for qemu-devel@nongnu.org; Wed, 25 Feb 2026 18:18:25 -0500 Received: from mail-wm1-x32c.google.com ([2a00:1450:4864:20::32c]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1vvO96-0003BF-UZ for qemu-devel@nongnu.org; Wed, 25 Feb 2026 18:18:22 -0500 Received: by mail-wm1-x32c.google.com with SMTP id 5b1f17b1804b1-4806cc07ce7so3176565e9.1 for ; Wed, 25 Feb 2026 15:18:20 -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-483bfb987b0sm20773375e9.13.2026.02.25.15.18.17 for (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Wed, 25 Feb 2026 15:18:18 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1772061499; x=1772666299; 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=Qx8l/7wXfvDzOx35Ak8qi4667/GSVMw0wLGmPN1fR18=; b=S5uZ9+o0dwgMf6lRqKrFO4FUhZSVz4ET7AbsK3qEW+aYFqunMXX9Tr1LBvHKhpaZ4z 9+XHs3NVmdX05+cfvck5wK9JAtt6BlVymQKuQQtHcGI+2RRkbBqbu8sssppvUZ5adDXE iBEmKr6uUQxQK1pwX5kvHwmXWwzypc636WkqiEOvWYnpByfTIr2bgsMp/HA+S/+TWZYf sm4t0d9AQgegNSoedzUR/bq82hP/AIPOF7sdh9NsYmVd+RyYYSlUGvmxpDFIecDuU7Ki NB6316AZoa/hH3wiOq8RKlf8wdiWXJ9lycGzLYH7RxWksIs+YgbRqB/uBXhcn0EDJKoF 6VSg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1772061499; x=1772666299; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-gg:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to; bh=Qx8l/7wXfvDzOx35Ak8qi4667/GSVMw0wLGmPN1fR18=; b=RpDE4tY1aEF+qLjU+nztzgOsXlxIp534VyIJhY14e2Z7OU7HIIFVLX9OULai3fTZGj 6Y+T4GhRtkdIjgIomk1qFQCApz+QsqwUkuPsnpw0GgkF7gCQTxOeyDou9ddT++mARKl6 RJmbpWWV5/NS3HUNYtnO0OOvFwAfJTUb2sQBc+L6l32MPFH606gBg2XfQmfSG17wRLTL d24ng+wOUpzNhyxC7WkA5keGtQfnfHxTtmI/bWRRg6qBTmtJA98Iocj0CUIOOPNTcvAj nMbwNbHmWqlqq7r0sPbbYsezLIggmx6LXeBsWBUpCxOz/jp+QgWkQOb2whdWnpChk2/i ZxDg== X-Gm-Message-State: AOJu0YzZNG+ygdTBmrWqmzEIw9t1WaCL9+rjCoUbLiFqJCbK/LG32Pyh Qb1LQPaFLXM6t0v45rgW/xoAhLuuuvEPchX7m4zdQ6PemdCkyIgky/dDzeOr2VfaGwwj869bCwj eJesot9A= X-Gm-Gg: ATEYQzzvhkh90MM+8N3a6lXTjnLqXzanQ5bbeTTxQ+lChLDQb+4eP9HIeS2NQIrxDjc HDdANpTT4sVqpwdaSVjVDZidj7fw1Q692sL/XxWswk59H/Zs2ztdVnQ3OT18bN/0UOWY6e3huQU JW5DvhMRdi16ibdd5U+BrB2B3+g6h6lkGLo9u/Ff3woOhIQQUwpIBpu6C3BVrNN0YGgy3gUiXpI gHITlDnWjJDMs/y2Qq3Bwinzx2EC/z8mptVxSqMIADs87sB7IuWAguBFe/XE2IUo6hiyrNisR79 I8YsOPRj7FiZllXQpI8Mokb6K/vfsOU1340qdVMXvuhJBx6dTqxWHq35/eJ85OGRv4LRuls+I/O h3QxhIwkk4ooF/OBdjO7rpRpj3O4hwyRFIJ7R1p97Fv8KWsaf69RZ4QuLtsLpgLRf0et8tR3Y6b VAoykN3b/RRwgsFlh+2U1bhIv4HqEqmwn1s/X5VaDuOWAu/uMKAPG27E5VJ1lwJrL8hPTFhM2W X-Received: by 2002:a05:600c:4e93:b0:480:4a90:1b06 with SMTP id 5b1f17b1804b1-483c3df874emr993725e9.34.1772061498830; Wed, 25 Feb 2026 15:18:18 -0800 (PST) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PULL 36/70] target/riscv: Remove unnecessary target_ulong type uses Date: Thu, 26 Feb 2026 00:13:36 +0100 Message-ID: <20260225231411.96482-37-philmd@linaro.org> X-Mailer: git-send-email 2.52.0 In-Reply-To: <20260225231411.96482-1-philmd@linaro.org> References: <20260225231411.96482-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::32c; envelope-from=philmd@linaro.org; helo=mail-wm1-x32c.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: 1772061824224158500 Reviewed-by: Pierrick Bouvier Reviewed-by: Daniel Henrique Barboza Reviewed-by: Chao Liu Signed-off-by: Philippe Mathieu-Daud=C3=A9 Message-ID: <20260219191955.83815-29-philmd@linaro.org> --- target/riscv/gdbstub.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/target/riscv/gdbstub.c b/target/riscv/gdbstub.c index f89b20ea84a..a053009ccd3 100644 --- a/target/riscv/gdbstub.c +++ b/target/riscv/gdbstub.c @@ -52,7 +52,7 @@ int riscv_cpu_gdb_read_register(CPUState *cs, GByteArray = *mem_buf, int n) RISCVCPUClass *mcc =3D RISCV_CPU_GET_CLASS(cs); RISCVCPU *cpu =3D RISCV_CPU(cs); CPURISCVState *env =3D &cpu->env; - target_ulong tmp; + uint64_t tmp; =20 if (n < 32) { tmp =3D env->gpr[n]; @@ -80,7 +80,7 @@ int riscv_cpu_gdb_write_register(CPUState *cs, uint8_t *m= em_buf, int n) RISCVCPU *cpu =3D RISCV_CPU(cs); CPURISCVState *env =3D &cpu->env; int length =3D 0; - target_ulong tmp; + uint64_t tmp; =20 switch (mcc->def->misa_mxl_max) { case MXL_RV32: @@ -194,7 +194,7 @@ static int riscv_gdb_set_csr(CPUState *cs, uint8_t *mem= _buf, int n) const unsigned regsz =3D riscv_cpu_is_32bit(cpu) ? 4 : 8; =20 if (n < CSR_TABLE_SIZE) { - target_ulong val =3D ldn_p(mem_buf, regsz); + uint64_t val =3D ldn_p(mem_buf, regsz); int result; =20 result =3D riscv_csrrw_debug(env, n, NULL, val, -1); @@ -215,7 +215,7 @@ static int riscv_gdb_get_virtual(CPUState *cs, GByteArr= ay *buf, int n) CPURISCVState *env =3D &cpu->env; =20 /* Per RiscV debug spec v1.0.0 rc4 */ - target_ulong vbit =3D (env->virt_enabled) ? BIT(2) : 0; + uint32_t vbit =3D (env->virt_enabled) ? BIT(2) : 0; =20 return gdb_get_regl(buf, env->priv | vbit); #endif --=20 2.52.0 From nobody Thu Apr 16 20:57:20 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=1772061773; cv=none; d=zohomail.com; s=zohoarc; b=IUo5WsP9EAgQUlllFzN/dzxK6hxcByiTKbLMmjYLINNnhRgl0OdtUPjYoAjBTuqUX18wbcNEy6vVZCgeap7ShUFSxZeJWhIVORzJQoUvC5NwZYw8tMUplZ5GAhmFFRQBKfhwF+H4CIjAa8iVT0XUeBPAKuq2KBszh1wagUMiPhc= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1772061773; h=Content-Type:Content-Transfer-Encoding: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:Cc; bh=SO+BmBnQLITRK+3WmiBg9o20m8SXEc4CsqPTzeBabiE=; b=Wj/xGLu31cbshq0KvMHZmvAk+4sr5UUilA4W7f3Q2PLO/SnQXWun1oElL03pSjYKrG18p5cxTSvN0KWOnlxq+xX8cA2icmi7Su3rlDwSF7N8IG4ljMtaMHvbilVoBd6OIOPEnbbSbON4RfuAU/+BUGf3X79UkS3PRxxn15N5RNM= 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 1772061773464101.68596459147966; Wed, 25 Feb 2026 15:22:53 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1vvO9N-0004t3-Gg; Wed, 25 Feb 2026 18:18:37 -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 1vvO9G-0004MT-25 for qemu-devel@nongnu.org; Wed, 25 Feb 2026 18:18:31 -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 1vvO9E-0003Bd-7w for qemu-devel@nongnu.org; Wed, 25 Feb 2026 18:18:29 -0500 Received: by mail-wr1-x42d.google.com with SMTP id ffacd0b85a97d-43992e14638so234050f8f.0 for ; Wed, 25 Feb 2026 15:18:27 -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-43970d4c95dsm41121204f8f.33.2026.02.25.15.18.24 for (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Wed, 25 Feb 2026 15:18:25 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1772061505; x=1772666305; 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=SO+BmBnQLITRK+3WmiBg9o20m8SXEc4CsqPTzeBabiE=; b=q5oUWSRE+ACcDsQAU67dnTNpaFeJ6yA4w6qikGYmwf2dmU4Ckf7E+VBq/qB57ivxaX eka6UWsUxHNQbDt/9cmjKp9IHD36KH/C1kPZwlfYvsNy3oUqsL8b1pRowaQ9bLqS6BjN /lnQ/AKNzFk6+rRKGG6XOpAI5NMU0CU+bXRgjme25+pBgTGnA3tEZ/Wl5Yjon8vU6UC2 j5/FyJLty/7cB0NSzLbEoRgIJPXu0zRMCxVeXp/Zf/6fyjhH85rhlic0qtAUolJId224 Hnf23sbl/C0VqKBqls1WFYdEmrnq8d1JbhyO9/qrDpVntr0w/yrfqXuwn44cAINIPX2N m20g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1772061505; x=1772666305; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-gg:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to; bh=SO+BmBnQLITRK+3WmiBg9o20m8SXEc4CsqPTzeBabiE=; b=GYzgy1AirEcb36mrl/Ly+fMLG9/rjmq9IszaM1QZceU3cPEKI0sMdAe5vcTJ3WkSCG ybWhHRtQWDvtqTOCotIASMjeVYQo5u5+EB+QNv78FDlyPWJm0+KdRKtRPt9PtDtTHCA7 19k7leSU052wTRsSz2p5t3kqbtoxHsjYj23EnBtZGvrt1El4kFNGUdts96aDm9aRdUfp xw2w2rQuWuuMJrlwm4T2/gSNw6LkakwQnTEbn8Z9+xQTW9d9Wdr/IGnXg4+s8cropgTq 7AcP1xmD5pjsqzOsjzaHwTb45JRQ3J/JZAAtsJAHfXGJMWZfWRgjotNMF/2LZxwhhtpK sWfg== X-Gm-Message-State: AOJu0Yz3Duv+UIPzmRyO5wzg6k70UEpg7sLhS9GeNNBoKwrrSDh7GmQi x9VvpPkvxC2wxq3aEE56W4Tj5439prJuHIaeOP0RZWc9VdJ0XxhXU7IjUI83TuS86F6FDo/JcP9 etqunPCk= X-Gm-Gg: ATEYQzxRVOy+hGgy8Wg+cz+UJvltQsL2x1q9+/Gb2yi0Udy56lR3986i/U34GIMgGr3 E4dN1ryAaBRkhGfz1MpcWzoSuPS+mfprNBYt97mOJ34hEMM2ov8xCEreCrIfvxcCyjKVs0zTfUJ eX0TySe/1dt0WQK5/CeUdQHBVCvq+BZ29DzUK7ES325zqxQboO9rim7OWdNIAyV5l7N6CdyXyAl dSDuR1WbG6MU0miIfh4J/tBWbgqkHFTAO4Jeqvd9A1a0YLW2IFl12e/KA5a/UDOc4eXPGXNnbFo g1QfhpVeaNVqvEaNTC6vt2ySgjAtPQqslmXXiBBWUfHkGWeyTFuGKrX/aHK7QISUZInXPl7hkbL Wedv+khxsy5WBGO53dDWlZwmi+I+4LwdN+ac/OoMZqWNZcRbim0YETloZjnwTcxf3tP7jSNi2Q0 8Gho7yu5poWMhfiNjbJs5s2G6e6X2isno7Ejq2ltOKKp5jtF2bJQbiUKVHYPgD6xejvbDqg1Th X-Received: by 2002:adf:f6d2:0:b0:439:872f:b49c with SMTP id ffacd0b85a97d-439872fb5e8mr11611025f8f.3.1772061505516; Wed, 25 Feb 2026 15:18:25 -0800 (PST) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PULL 37/70] target/i386: Replace ldtul_p() -> ldn_p() Date: Thu, 26 Feb 2026 00:13:37 +0100 Message-ID: <20260225231411.96482-38-philmd@linaro.org> X-Mailer: git-send-email 2.52.0 In-Reply-To: <20260225231411.96482-1-philmd@linaro.org> References: <20260225231411.96482-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=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: 1772061773956158500 Prefer ldn_p(target_long_bits) over target-specific ldtul_p(). Reviewed-by: Richard Henderson Reviewed-by: Zhao Liu Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Pierrick Bouvier Message-ID: <20260219191955.83815-30-philmd@linaro.org> --- target/i386/gdbstub.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/target/i386/gdbstub.c b/target/i386/gdbstub.c index 291d56b8e13..f358bcf9e86 100644 --- a/target/i386/gdbstub.c +++ b/target/i386/gdbstub.c @@ -459,6 +459,7 @@ static int i386_cpu_gdb_get_egprs(CPUState *cs, GByteAr= ray *mem_buf, int n) =20 static int i386_cpu_gdb_set_egprs(CPUState *cs, uint8_t *mem_buf, int n) { + const unsigned regsz =3D target_long_bits() / 8; CPUX86State *env =3D &X86_CPU(cs)->env; =20 if (n >=3D 0 && n < EGPR_NUM) { @@ -467,7 +468,7 @@ static int i386_cpu_gdb_set_egprs(CPUState *cs, uint8_t= *mem_buf, int n) * XCR0[APX_F] (at least for modification in gdbstub) to be enable= d. */ if (env->hflags & HF_CS64_MASK && env->xcr0 & XSTATE_APX_MASK) { - env->regs[gpr_map[n + CPU_NB_REGS]] =3D ldtul_p(mem_buf); + env->regs[gpr_map[n + CPU_NB_REGS]] =3D ldn_p(mem_buf, regsz); =20 /* * Per SDM Vol 1, "Processor Tracking of XSAVE-Managed State", @@ -486,7 +487,7 @@ static int i386_cpu_gdb_set_egprs(CPUState *cs, uint8_t= *mem_buf, int n) env->xstate_bv |=3D XSTATE_APX_MASK; } } - return sizeof(target_ulong); + return regsz; } return 0; } --=20 2.52.0 From nobody Thu Apr 16 20:57:20 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=1772061784; cv=none; d=zohomail.com; s=zohoarc; b=FiS+bZ4kZjf22NCVtv83V6qNnFRg0ymWW3jUUWSZavgP6NpBVJsAY6qrx+dV0z4EodMXJCVY5T3cPO/SFaQ335FnsTtNyrswcwZYRFhrYs+daXe6O9EsjQ1dHfKuKGLcDIoeuTyM08uzkWlUPikW6KE3Y6YJD3AGefRawHORFkc= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1772061784; h=Content-Type:Content-Transfer-Encoding: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:Cc; bh=AkKI2RdGaiNs8TMm8UyYiEPvcsxkUPXWk89sTv3xAII=; b=NNty92pJaSmLg5kFCiBuBA8oO3dt0Epboo3kXyFdj7gDgQ5mKgYNTDXqXc2x7KSF5aSs0VS130Sy2Sq5aBVHRfN1dDBStCm8QQBYU5fWQKpWgb427mzLRlGGCETKuVQ2CMb9AFnUADQKE8RYM8/tDVd+cIesSD2LCGxIJ3JwFCY= 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 1772061784155288.8219255719155; Wed, 25 Feb 2026 15:23:04 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1vvO9O-0004vW-8A; Wed, 25 Feb 2026 18:18:38 -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 1vvO9M-0004po-GT for qemu-devel@nongnu.org; Wed, 25 Feb 2026 18:18:36 -0500 Received: from mail-wr1-x435.google.com ([2a00:1450:4864:20::435]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1vvO9K-0003CH-QG for qemu-devel@nongnu.org; Wed, 25 Feb 2026 18:18:36 -0500 Received: by mail-wr1-x435.google.com with SMTP id ffacd0b85a97d-43992e3f9b8so210144f8f.3 for ; Wed, 25 Feb 2026 15:18:34 -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-43970c00768sm35497765f8f.10.2026.02.25.15.18.31 for (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Wed, 25 Feb 2026 15:18:31 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1772061512; x=1772666312; 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=AkKI2RdGaiNs8TMm8UyYiEPvcsxkUPXWk89sTv3xAII=; b=Xb+SLGs64q3Y0+o5ZBh1dPcNvXkWScTDaoQxplnEFB8e3X9j/I10aKqpAWnBZYDsGD FA/ccVbrCC+b6NKQkZI/HvJkprmUwOUM0Cyw2hyYlE0s1lRieP4oKnGklMr5bbah2Dfp azyNoF7o8StcvibPHwy9WNhyjrc0GKThBi2lVd/NMGdFG8CfBXlYeE96iF9EbwXINvxm 4UL6nyDcx0esq/d+B20SXa0p9apRUFg9IZhxJUkGHSeMnPYTqAXncEOmK51wtG3nCbXz cFI2KBaO+AYNS6NTWYrm4q+7C/lyIccTYfhf1xSPL4ApNkHamhIevqQ683B5c5FZOaWb RlKQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1772061512; x=1772666312; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-gg:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to; bh=AkKI2RdGaiNs8TMm8UyYiEPvcsxkUPXWk89sTv3xAII=; b=a2pmIpCun1Nmfo4Efk/UN1GBmaNLeSkTRyMQoLl5/3G57dJx+o3p/oEkCqFOAjkPZx 1LHrcS74FVTMtnakeNhgKAFiUvJzW2E9FqXQj5Cji5iZtAFjmdhslnYU+Du8OmADQBPZ WyyCi7zYapbDIlKg4HrV9dpd91TphYRIJ1dvuZumwLXWgtJvDrPhTg/TNO/TG3xwPsPP HcMUzY5nWX0Fz/rMLigxy7i710F3Kn1Z10WzZr36FF4/Fu/CJCkFRd+IEyIptmLt+dVP X7K1CrBEKTAKwvg4u2OgsdAs4O1s7OVO9/SuXxQrPA98bTJ4To7F+LmnEcn/kMof2UON l9zw== X-Gm-Message-State: AOJu0YweRt+rwTpMXQhzo5K0KdImjx/bzKtnd0JguiBMUJpQOvFmLZy3 phIJkwoPBXg48FsOjEBkYD/sSrzp+6tu/jgg2/sQo/KVn3YySQsZDBRxODh3oyUcSQtoBrZ+0EA G6qKqkmQ= X-Gm-Gg: ATEYQzweOcUDeyNMho8VwUpbi7LaySjnvYpMIFngdYwgosRb7RVMzYRHqhpvNqZ3Frj AsAM08dktCp+L0gFFINF8Jhq88bNXESraerGynIAZ7WQIiWDavHjndXRsmsU4/4mUEn5IfYqmex 6IKcBUtdF3iWc5/iMSnNbD29djpqWgoHNgYk5TljSDacOnmtlpddDgsv/Eq5yNEUez0jM4xcXhE LatMZ09oFpN+POhNu9suLTb5WaeYaMzkYwOQfJ3vfd7YBxdYtWpr59tuA86O5hG7LvKTICbk4Ve npuSdZMIPZWC5Hh2mUL4ca+RlR+w/L/yMc1YZFRPEYQGd01eaadX7jnaS0V3Bgg6aCOYQeSVAWF yk2Nf8jDbrkW0L9dZM/zmU/vBAE9yRRNrioe+rajcJuJfnSLSpoIxwZQAA5LWSa7uYbYpPj+d+c vUvcHvKbGeICUUVc4j/N+HCU2cfirba0IpXjPbin2LEnuulDRcF04Au9ZUwhALb6H5QrFF0EEQ X-Received: by 2002:a05:6000:2511:b0:435:e440:f518 with SMTP id ffacd0b85a97d-439942fddd2mr4240829f8f.54.1772061512031; Wed, 25 Feb 2026 15:18:32 -0800 (PST) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PULL 38/70] target/i386: Expand 64-bit definitions when TARGET_LONG_BITS == 64 Date: Thu, 26 Feb 2026 00:13:38 +0100 Message-ID: <20260225231411.96482-39-philmd@linaro.org> X-Mailer: git-send-email 2.52.0 In-Reply-To: <20260225231411.96482-1-philmd@linaro.org> References: <20260225231411.96482-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::435; envelope-from=philmd@linaro.org; helo=mail-wr1-x435.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: 1772061786081158500 Where both gdb_read/write_register() functions check for 'TARGET_LONG_BITS =3D=3D 64' we can expand the following definitions: ldtul_p() -> ldq_p() gdb_get_regl() -> gdb_get_reg64() Do the same in i386_cpu_gdb_get_egprs(): check TARGET_LONG_BITS to effectively inline gdb_get_regl(). Reviewed-by: Pierrick Bouvier Signed-off-by: Philippe Mathieu-Daud=C3=A9 Message-ID: <20260219191955.83815-31-philmd@linaro.org> --- target/i386/gdbstub.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/target/i386/gdbstub.c b/target/i386/gdbstub.c index f358bcf9e86..f1ce90a046e 100644 --- a/target/i386/gdbstub.c +++ b/target/i386/gdbstub.c @@ -129,7 +129,7 @@ int x86_cpu_gdb_read_register(CPUState *cs, GByteArray = *mem_buf, int n) return gdb_get_reg64(mem_buf, env->regs[gpr_map[n]] & 0xffffffffUL); } else { - return gdb_get_regl(mem_buf, 0); + return gdb_get_reg64(mem_buf, 0); } } else { return gdb_get_reg32(mem_buf, env->regs[gpr_map32[n]]); @@ -283,9 +283,9 @@ int x86_cpu_gdb_write_register(CPUState *cs, uint8_t *m= em_buf, int n) if (n < CPU_NB_REGS) { if (TARGET_LONG_BITS =3D=3D 64) { if (env->hflags & HF_CS64_MASK) { - env->regs[gpr_map[n]] =3D ldtul_p(mem_buf); + env->regs[gpr_map[n]] =3D ldq_p(mem_buf); } else if (n < CPU_NB_REGS32) { - env->regs[gpr_map[n]] =3D ldtul_p(mem_buf) & 0xffffffffUL; + env->regs[gpr_map[n]] =3D ldq_p(mem_buf) & 0xffffffffUL; } return sizeof(target_ulong); } else if (n < CPU_NB_REGS32) { @@ -449,8 +449,10 @@ static int i386_cpu_gdb_get_egprs(CPUState *cs, GByteA= rray *mem_buf, int n) /* EGPRs can be only directly accessible in 64-bit mode. */ if (env->hflags & HF_CS64_MASK) { return gdb_get_reg64(mem_buf, env->regs[gpr_map[n + CPU_NB_REG= S]]); + } else if (TARGET_LONG_BITS =3D=3D 64) { + return gdb_get_reg64(mem_buf, 0); } else { - return gdb_get_regl(mem_buf, 0); + return gdb_get_reg32(mem_buf, 0); } } =20 --=20 2.52.0 From nobody Thu Apr 16 20:57:20 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=1772061885; cv=none; d=zohomail.com; s=zohoarc; b=mrMCpLNCwoAC7ehGjw1O2MWO5nd2JInAqIEbF0z0hVhyVjru3NOtosCgwt1LkV7viFH7YySs7l76qW4E+yBqVaJgmKR1S7Ejw7AHBQ3/kgC9QsETfMMXHL3gF1qOCF5GJ1nK+QCa7gFXU4wtH60mqClkV7Rap4wT/6pWTvQKe6g= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1772061885; h=Content-Type:Content-Transfer-Encoding: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:Cc; bh=L72HHxccWxsDctKu9kcpcvWnB87hWFYOeaRRdfdcF/0=; b=ESLqzVcypr/GRf9vn6FV8ZKqokvTeanCdC0Ma9TbDdAiy8X0HCjjVnECqToFJOZI8WCERuzOCtc9mTUZmK+p+6ussC90s0tZZ3TE7osBhW9QjznY+LtcLlWf8bwsoxvm3n6f6W/T3jYvMiStY1Dxu3Bufv0Sh3O6n3c3c9uVby4= 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 1772061885415217.53697920781133; Wed, 25 Feb 2026 15:24:45 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1vvO9U-0005yo-Rn; Wed, 25 Feb 2026 18:18:44 -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 1vvO9T-0005ky-8T for qemu-devel@nongnu.org; Wed, 25 Feb 2026 18:18:43 -0500 Received: from mail-wm1-x32c.google.com ([2a00:1450:4864:20::32c]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1vvO9R-0003Cu-Ll for qemu-devel@nongnu.org; Wed, 25 Feb 2026 18:18:42 -0500 Received: by mail-wm1-x32c.google.com with SMTP id 5b1f17b1804b1-483770e0b25so2518895e9.0 for ; Wed, 25 Feb 2026 15:18:41 -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-43970d4bf89sm34951120f8f.29.2026.02.25.15.18.37 for (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Wed, 25 Feb 2026 15:18:38 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1772061520; x=1772666320; 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=L72HHxccWxsDctKu9kcpcvWnB87hWFYOeaRRdfdcF/0=; b=J9s630NttkwDeYEble+OlfCspoSMXW1TzSGbl+jDY+nWjkD1YbZl3kcUlyUKAvuhbM aEuuiaieHU5w+x4O7M/2RbQa6e7d2dkGyMKcE79WnW4cDU+lzsy55NY4sVCLsprlJgQN m+hvmg6OIVJ6OOvl4VFgimNETYM1p0r4FOYmFyJ37XLqCWOx31Uyp9WXZLaSnOnDmtQA 3Gvlhk+5g4VquQB9I6ZdgHtlgmTdY4M7axBX0YaLcz57GuP4w/4xsjWytgOnWvXk4pxI I5V3e11WrefUuNxgNyVq8nGwHFy6fb9N7nmXq1mFJhISsek8x6gQPWd0bUm5yLNRbacp KM7g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1772061520; x=1772666320; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-gg:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to; bh=L72HHxccWxsDctKu9kcpcvWnB87hWFYOeaRRdfdcF/0=; b=h0L5WDAz0kfY+OgG2x6q9TGVJzW9gW3kp5BanglP5e+ooiM7we0r3kRcXT4/1O/o5e 7ciF2wJZ35de+9MRBq68IBMLjyHF+w9DtCw7eyV4EQMFN6QGaLmsZn1Nr9hNmldwqtOo N+RYfmj5taQM6M/RdB9EdRJrNIBlXIGw8EbMf424OrSHRmglSi73vabl+C6Eu0/B44mn irjzxBaKJJFqspOhvxDxw4P5NFD5duLC7vokfFMKT8sS8tnAZN1nLUDZTUTaKthbpZRL 5/ySprSrg8uqmO5NF7k+IzNpsdDaIwV0/1ii3/6n9U74n4Wvwow15qgEi68W9iJ/r39z 7IJA== X-Gm-Message-State: AOJu0Yy9DMtuUpcP1hcUVepb/Z/BkCZiYT1qMc+aHz6vSGMjvmATBBDp uLavwagXSd0VFLR/OViDXJkLbb/asQroF7zNTT3goF86Gje5VqdRn889cqH4aaaP40ipvop6b2v oCsWNblo= X-Gm-Gg: ATEYQzx+WunyUvfgBURjA9L86JGFQsajzMogj8D5aQoU59sIkDWrHJj9+AYuX53RLTJ WT2wjiQdOyVlyISrj8q25ImvQEC3VNdqQ8oAugdkGXPHTPHsxB8r8yIzd497k31vBn/AzypVtrY RmrnHg8Xa6VqknZIm6sjbyxYNFnbDtpwGOS2ghGIMHxzM6GLGT0/Wg5MEbpxbzHjJhhmlCa7mQH IDrYz8PimEKzJvYk36euAQz3rRCpmWec27gNXbnPsOz6GCwMo/fEcJ25MKVZBoOLyCxOkvJkGJC AI6Hn3igREvvvftuxZId839hiilFqJT6/UvSU07yKLKnnG4jrqRRucSzOcnX3imPRyJNmzsK1KA qNTV94aPmrasxffpEAmwfLOkrtj2FSkyOME7TDT6YCB1rr5K3gGWqdUIDQ6wVbCEbn4yOqWe1m/ aw8mQRDkZHVVmInR8shD97OSta+kVXe55iwKR8i68UcOnKmMW2xn33cBDoVd45bbzLYl0mMLX+ X-Received: by 2002:a05:600c:314a:b0:47e:e20e:bbb4 with SMTP id 5b1f17b1804b1-483a9637a24mr263294395e9.26.1772061519738; Wed, 25 Feb 2026 15:18:39 -0800 (PST) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PULL 39/70] gdbstub: Remove ldtul*() macros Date: Thu, 26 Feb 2026 00:13:39 +0100 Message-ID: <20260225231411.96482-40-philmd@linaro.org> X-Mailer: git-send-email 2.52.0 In-Reply-To: <20260225231411.96482-1-philmd@linaro.org> References: <20260225231411.96482-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::32c; envelope-from=philmd@linaro.org; helo=mail-wm1-x32c.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: 1772061886364158500 These macros aren't used anymore, remove them to avoid further uses creeping back in. Reviewed-by: Pierrick Bouvier Signed-off-by: Philippe Mathieu-Daud=C3=A9 Message-ID: <20260219191955.83815-32-philmd@linaro.org> --- include/gdbstub/helpers.h | 6 ------ 1 file changed, 6 deletions(-) diff --git a/include/gdbstub/helpers.h b/include/gdbstub/helpers.h index 197592036bf..402514716d7 100644 --- a/include/gdbstub/helpers.h +++ b/include/gdbstub/helpers.h @@ -104,14 +104,8 @@ static inline uint8_t *gdb_get_reg_ptr(GByteArray *buf= , int len) #ifdef COMPILING_PER_TARGET #if TARGET_LONG_BITS =3D=3D 64 #define gdb_get_regl(buf, val) gdb_get_reg64(buf, val) -#define ldtul_p(addr) ldq_p(addr) -#define ldtul_le_p(addr) ldq_le_p(addr) -#define ldtul_be_p(addr) ldq_be_p(addr) #else #define gdb_get_regl(buf, val) gdb_get_reg32(buf, val) -#define ldtul_p(addr) ldl_p(addr) -#define ldtul_le_p(addr) ldl_le_p(addr) -#define ldtul_be_p(addr) ldl_be_p(addr) #endif #endif /* COMPILING_PER_TARGET */ =20 --=20 2.52.0 From nobody Thu Apr 16 20:57:20 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=1772061811; cv=none; d=zohomail.com; s=zohoarc; b=doxw4qcmYypu7v+WdIQNYsyyRrey28wX+atBlHHUWsXmpGpnZzvJ01VrTEfMMjYYzf6p/CTyWh/B046o1uRSwSYI6Cr6iVEFzFbIyYo1qgk/CFp3Vj5NY/5YMhMnzcrtsljJWoEbg3oDzxkFUJyl3JcN5zau3CrDnV+6kuM9y3I= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1772061811; h=Content-Type:Content-Transfer-Encoding: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:Cc; bh=dkWIniAQ+It75l/bddGUnOi+yHE3TEnUoQyjPEfTCYo=; b=eFWWdIcLldZtVjspi5TyCjK0SctxHt1QxEJcgSxs3kMbVNh5cZ6FzUkJTJ5NBP7ordQwfw/H4uGz3jHFRvy4jtJ56CrtfSn86VA6k1vh+vDLcc9doSyuaLAzo86+hviEvkScWuOnF+uulF7RFq6Z0lD7DdhAut2aiedKH87lRXA= 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 1772061811930305.0192546289529; Wed, 25 Feb 2026 15:23:31 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1vvO9b-0006aI-J4; Wed, 25 Feb 2026 18:18:51 -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 1vvO9Z-0006ZK-Ic for qemu-devel@nongnu.org; Wed, 25 Feb 2026 18:18:49 -0500 Received: from mail-wm1-x32b.google.com ([2a00:1450:4864:20::32b]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1vvO9Y-0003EZ-3D for qemu-devel@nongnu.org; Wed, 25 Feb 2026 18:18:49 -0500 Received: by mail-wm1-x32b.google.com with SMTP id 5b1f17b1804b1-48370174e18so1471795e9.2 for ; Wed, 25 Feb 2026 15:18:47 -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-43987f3ed03sm16948102f8f.16.2026.02.25.15.18.45 for (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Wed, 25 Feb 2026 15:18:45 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1772061526; x=1772666326; 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=dkWIniAQ+It75l/bddGUnOi+yHE3TEnUoQyjPEfTCYo=; b=TYxunxTdHzeuLwJb0Vr/pBGVwjHOokRmU4P4+TOyMuMb6kuMkUAIJ2+MpAt9HzdjxY IDSSsHS0/lnwEh4bIyQR/dzayZhlBZd78qGhtmtMyyGxzrJqAZADknn0/ump8uOEJoJK K1j8YamPWUkSrVZSzPWTV/s8hg/x51bHBSW/5B9/1rIw3F6gdJGsavUIYA7le3b4hJK7 AhY4Jc8zwh/7jwVL0sH9TBMamOVmWrwlwhgId5zx3Mk3TCg2uTs6ytOUJN9MW2QtXhtJ 9JrQHyPnMIq3s9ZGUWbNEmiUzCJ+rjlkhiJhAvfwIfY6+Yf7yDMbvTH4eP5b+aV8pCbe DI1w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1772061526; x=1772666326; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-gg:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to; bh=dkWIniAQ+It75l/bddGUnOi+yHE3TEnUoQyjPEfTCYo=; b=Ya/0nq/3ixQ+HYAnJjM8tXaFnt+6c+bAD7WCyvct8LJpA5IFexx86K5jrnOS5YTxL7 TY9ATYxO9Yrlch7Kb275Ib8gMycRObQgUcwRnfMS9kHEY7a0zub0usCmG2QlggvVGH0M oiqXrUwDNHogeclZVhKpoACjawGby12cJByATP52qyl1e6OfJN71lf3IoMqQ7c7sb8Po BlvtPnQKF5B+L/0Scwra/cYJMlNOHaxrVn8N8/k1YQkTg/a4AMG5Sc+NCb6Wcau6kmin e/sbeSLpjUceOyqGTQFBxHkyDhIM9gdw3fVM4sIZmarFErqgDFIr4yJmQtg48ZS+MbfO VYLA== X-Gm-Message-State: AOJu0Yy0orNsQ83bOeR2VqJnhqxmz81hUitYZ0kUV5pNYWsiVsOkmSl5 otKYWlDFM1sgCMUnw9bm/5l8F7BqciqN5yNgM5FPi6iaHZJpZSUmi0G3QVCLQ2Wu2Ohbx7U7jsi l9CYNuJ0= X-Gm-Gg: ATEYQzx5nYk7D1drWRsV7qf7AVy2sFHZrrTRYCf+My1/JTxPPnhWPDm8QqYlM2pdOi+ GwuMmKwZZTPwQjoEGX/a7LeXrtryMjYmoN4TmbN15HaJc/KJQhe8D1Bt7JrE5flRBfmuOqYU1Rv KZCjTBkXuaSMadbWvCyz7YAFpKBy45kIFRlry8+Zjph7QSNHgs5j2CSoNkvm9RAPQL98WCsj7Ww ANPZrXx4OPGsE8ZS3UMvTt2TSYnPU8OoXfUTAfRhmj0P/dktRLX6Dj8Zyp9wR7w6S7KDZgX6kRp xh4SnJ+42yDWBNhNrbVQNCAYTBQUPkY/cnek7QlVjKlQ/COXKh8b9FvGv2uP5jsINhfpjKq4Q+M oZoFs09Pe+b5usNPJBajv++yJu7XzoK+ghbKMi1ABN9eg//ej7VLivlDHJU9FEAoWyYjrW+6FGM ugYsHrGxg0uRHEYydoFHCb8NWdO1SZNo+6WaVZsTCOzOtVxOjUB8fyWjDYyAkcb5m5MM7aMeNI X-Received: by 2002:a05:600c:34c3:b0:47a:814c:eea1 with SMTP id 5b1f17b1804b1-483c21bd28emr40251475e9.35.1772061526287; Wed, 25 Feb 2026 15:18:46 -0800 (PST) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PULL 40/70] target/alpha: Expand gdb_get_regl() -> gdb_get_reg64() Date: Thu, 26 Feb 2026 00:13:40 +0100 Message-ID: <20260225231411.96482-41-philmd@linaro.org> X-Mailer: git-send-email 2.52.0 In-Reply-To: <20260225231411.96482-1-philmd@linaro.org> References: <20260225231411.96482-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::32b; envelope-from=philmd@linaro.org; helo=mail-wm1-x32b.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: 1772061812157158500 The Alpha targets are only built as 64-bit: $ git grep TARGET_LONG_BITS configs/targets/alpha-* configs/targets/alpha-linux-user.mak:4:TARGET_LONG_BITS=3D64 configs/targets/alpha-softmmu.mak:2:TARGET_LONG_BITS=3D64 Mechanically replace: gdb_get_regl() -> gdb_get_reg64() Reviewed-by: Pierrick Bouvier Signed-off-by: Philippe Mathieu-Daud=C3=A9 Message-ID: <20260219191955.83815-33-philmd@linaro.org> --- target/alpha/gdbstub.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target/alpha/gdbstub.c b/target/alpha/gdbstub.c index 7722eb46806..b458eadd7d9 100644 --- a/target/alpha/gdbstub.c +++ b/target/alpha/gdbstub.c @@ -53,7 +53,7 @@ int alpha_cpu_gdb_read_register(CPUState *cs, GByteArray = *mem_buf, int n) default: return 0; } - return gdb_get_regl(mem_buf, val); + return gdb_get_reg64(mem_buf, val); } =20 int alpha_cpu_gdb_write_register(CPUState *cs, uint8_t *mem_buf, int n) --=20 2.52.0 From nobody Thu Apr 16 20:57:20 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=1772061835; cv=none; d=zohomail.com; s=zohoarc; b=nnt3M3GJ4XQPzRkems4Aew+yXjCJLDR11S4l2rkWmB8oFR0pLLbiEeCBCjqwLTWFMVGasD5e0NjsYJdOUffegPibHfsm0Fef1TAjug5sNTefUhQOpBgN/tgE/w9fTBEBLFKQt2SFEkVUC3f6cQ4UXvpQmO/9cnnOuXD4rlN6xvk= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1772061835; h=Content-Type:Content-Transfer-Encoding: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:Cc; bh=9QVxu1A064iUxwpVmsQIbDTx89e1GwGXO7Kjzj1g25o=; b=KHOgnPAM2kP4qZrPFKa/H3dgMOkaIsd3yLTQf4EsaXdkA9JcQW3zmFCHeaZpMaov6uH407aCKwicHZcOIwQjOIC280AkwOJAf/N/jOwRIgOQSHWxugoHafCj2Mldt66Ypo7UPtW7VkrOXZsvXGU59zjM13PTl7i/EEUfmsWHyYM= 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 1772061835421737.1372584474899; Wed, 25 Feb 2026 15:23:55 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1vvO9j-0006iB-TH; Wed, 25 Feb 2026 18:18:59 -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 1vvO9g-0006bv-T3 for qemu-devel@nongnu.org; Wed, 25 Feb 2026 18:18:58 -0500 Received: from mail-wr1-x435.google.com ([2a00:1450:4864:20::435]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1vvO9e-0003MQ-Ng for qemu-devel@nongnu.org; Wed, 25 Feb 2026 18:18:56 -0500 Received: by mail-wr1-x435.google.com with SMTP id ffacd0b85a97d-43991cc3155so210318f8f.0 for ; Wed, 25 Feb 2026 15:18:54 -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-43970d3fc12sm35205327f8f.24.2026.02.25.15.18.52 for (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Wed, 25 Feb 2026 15:18:52 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1772061533; x=1772666333; 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=9QVxu1A064iUxwpVmsQIbDTx89e1GwGXO7Kjzj1g25o=; b=C6NyH98PLTRHJDEMiEgZVfeABhtKvC/xlANjA9KuTMM+Sp7mdKX8bNXdUszfsj9YEd YWUlajw4TrGu9zQ2r41TYoTp3isVc1C+rQ5Oqr/0sprcypHgNYfTTywcYnY5RwrbTFZ8 phE74e7GyPVUjdvNjanxQNsg7DBpHREmAfzf/zvmMg8I7kcr//SSgLMd3ojBtV8NNwPM Gc2iAYs5yhJ8BDcCVo+f7uPmDpQzWU4sDt889RZjhcQm3jeWidSWjhfPof8MHb78XEGI JdUOsfKwM8idOzfab7NdEpB7A2ldMKOv4YjM+63q3pYhaVoViDCU0KPuekIT0qBAFQ+E tstw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1772061533; x=1772666333; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-gg:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to; bh=9QVxu1A064iUxwpVmsQIbDTx89e1GwGXO7Kjzj1g25o=; b=fCmQOM3eFFzsGPhjhcsDfZkuxMKKKHSn+BPBERiJns7BA1tFQoX5IFMMTxSB2ehMDr 258H3PX9v1Gt1GcphO8p2Q42lPEl7IcAu1F1pZr0eb46JBw6JFCgtOOpaPj+l5QgBHz2 LVKFl7z8KyMJBJ6ytHWbcNrJ8c9O/uWqnckQSUY+vvFhf/I+e2pLQJH9qjqu25ZeAkbl W3R6F+s9cNS5wOgfLk0wihQ40CRvXo6qiFXM1Oqa6tTPpjZRuX5QyYN8LezZTC6Ju0xC +lhlWN9+jcIrLPbkdPe3Rd4MSMMvDrNStj+A4Sw8Wnt/KNnCfm3D3N6IZF8KfIecUFh1 YbpA== X-Gm-Message-State: AOJu0YxCXg3d66PxCOdyJnO4KNM4RRIIdfQSCUIZQTUVhSmfMvdbIt+m OGfyCHlttfJxqZnrkkd4WAQUu3e6w/lVlBXAvfErCBrOZL7LEWDnvpUayw/uKnjH5w8S7EjvnGP sIYKjOD4= X-Gm-Gg: ATEYQzxFSTXS1+39QBRAl2BwGf7uhVOl3r5qw4QXIxkqdzAGH6FFloUpNTT1DMtq2XJ YxK8cTpelRThYy2OIX/LQKaQaJPrW4wHqNKJNg0rlbR9xUMRhcpgsk6PptYUMneVUvhC/up+dkI h39WJivrz/rMJUnGKGkSlLj/jrT6BrkUKK803S1ezhJhM3qyvgCJ78fUpXalAKBuXuKFc84PskX 20ztIc2hahxm7b89C2qGMD6ZbKKtNRfDgQyAwQTt3lafXwt+c/G0Z56mlQg83DWUKen8udcDNc4 oJPlu2qq4IpvYdMb4mB8nyeIXqXaONGSGqGa4J3LnRa532WPccoD6hAjPfGUtim3MMeLlgtx3ir nyuFC++OJ5/w4tprr4myjEMwTC4RSv9JnAv6qFxN8sl77jlTdxxVtcogVO1YhEGks3p1RqctUyZ /3MAUxTs1iMNgqGSPd6u/Fn56/PNxT7sQgnQ6Kv8OPioowX5/78YdsMrZvsW8uzbLz27pvFYiJ X-Received: by 2002:a05:6000:144d:b0:439:9799:dd4a with SMTP id ffacd0b85a97d-43997f316b8mr523341f8f.27.1772061532695; Wed, 25 Feb 2026 15:18:52 -0800 (PST) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PULL 41/70] target/hexagon: Expand gdb_get_regl() -> gdb_get_reg32() Date: Thu, 26 Feb 2026 00:13:41 +0100 Message-ID: <20260225231411.96482-42-philmd@linaro.org> X-Mailer: git-send-email 2.52.0 In-Reply-To: <20260225231411.96482-1-philmd@linaro.org> References: <20260225231411.96482-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::435; envelope-from=philmd@linaro.org; helo=mail-wr1-x435.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: 1772061836270158500 The Hexagon target is only built as 32-bit: $ git grep TARGET_LONG_BITS configs/targets/hexagon* configs/targets/hexagon-linux-user.mak:5:TARGET_LONG_BITS=3D32 Mechanically replace: gdb_get_regl() -> gdb_get_reg32() Reviewed-by: Brian Cain Reviewed-by: Pierrick Bouvier Signed-off-by: Philippe Mathieu-Daud=C3=A9 Message-ID: <20260219191955.83815-34-philmd@linaro.org> --- target/hexagon/gdbstub.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/target/hexagon/gdbstub.c b/target/hexagon/gdbstub.c index 12d6b3bbcbb..b9856cfc978 100644 --- a/target/hexagon/gdbstub.c +++ b/target/hexagon/gdbstub.c @@ -29,11 +29,11 @@ int hexagon_gdb_read_register(CPUState *cs, GByteArray = *mem_buf, int n) for (int i =3D 0; i < NUM_PREGS; i++) { p3_0 =3D deposit32(p3_0, i * 8, 8, env->pred[i]); } - return gdb_get_regl(mem_buf, p3_0); + return gdb_get_reg32(mem_buf, p3_0); } =20 if (n < TOTAL_PER_THREAD_REGS) { - return gdb_get_regl(mem_buf, env->gpr[n]); + return gdb_get_reg32(mem_buf, env->gpr[n]); } =20 n -=3D TOTAL_PER_THREAD_REGS; @@ -56,12 +56,12 @@ int hexagon_gdb_write_register(CPUState *cs, uint8_t *m= em_buf, int n) for (int i =3D 0; i < NUM_PREGS; i++) { env->pred[i] =3D extract32(p3_0, i * 8, 8); } - return sizeof(target_ulong); + return 4; } =20 if (n < TOTAL_PER_THREAD_REGS) { env->gpr[n] =3D ldl_le_p(mem_buf); - return sizeof(target_ulong); + return 4; } =20 n -=3D TOTAL_PER_THREAD_REGS; @@ -81,7 +81,7 @@ static int gdb_get_vreg(CPUHexagonState *env, GByteArray = *mem_buf, int n) int total =3D 0; int i; for (i =3D 0; i < ARRAY_SIZE(env->VRegs[n].uw); i++) { - total +=3D gdb_get_regl(mem_buf, env->VRegs[n].uw[i]); + total +=3D gdb_get_reg32(mem_buf, env->VRegs[n].uw[i]); } return total; } @@ -91,7 +91,7 @@ static int gdb_get_qreg(CPUHexagonState *env, GByteArray = *mem_buf, int n) int total =3D 0; int i; for (i =3D 0; i < ARRAY_SIZE(env->QRegs[n].uw); i++) { - total +=3D gdb_get_regl(mem_buf, env->QRegs[n].uw[i]); + total +=3D gdb_get_reg32(mem_buf, env->QRegs[n].uw[i]); } return total; } --=20 2.52.0 From nobody Thu Apr 16 20:57:20 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=1772061811; cv=none; d=zohomail.com; s=zohoarc; b=C5Uo6MvnhY3gxCJmZYi9sH7q0vE2AF29VwRTAgRsDI1MNCNEi3vfUz2o/WgPKlBdu7Nl4iHLm3WbEAeDUYqpMc8YLXsJWGqpK+G9npTEZlvZXWp5KhrWy4bDDHVIkShhQ6Zn2k3mVc+UDyixqicEEqfv646uFYMMUupheVwdsmM= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1772061811; h=Content-Type:Content-Transfer-Encoding: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:Cc; bh=PEa1I4PUq5js8xe3wd/G3RCIRdUkaAjJuHmk8sEwGKA=; b=dxfBLIutEdgnYJjqcTe3vbJAzmZYirddHsVbKaZUG4OrZpKA0VG9M/DxXNmCt64+jDtTO7kGo0tocSM3IsB0gy2+/kL5uvDeJ7/MwspjUmCcJPh4SEX5FcZRTXmKruYNaG0t+0fbsFkW2t2rqMyqIZoikbX/R9srLlgM+XlWO8w= 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 1772061811078314.96263220724234; Wed, 25 Feb 2026 15:23:31 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1vvOA7-00079N-AY; Wed, 25 Feb 2026 18:19:26 -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 1vvO9p-00074E-DK for qemu-devel@nongnu.org; Wed, 25 Feb 2026 18:19:05 -0500 Received: from mail-wm1-x333.google.com ([2a00:1450:4864:20::333]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1vvO9n-0003Qs-M4 for qemu-devel@nongnu.org; Wed, 25 Feb 2026 18:19:05 -0500 Received: by mail-wm1-x333.google.com with SMTP id 5b1f17b1804b1-483487335c2so2365305e9.2 for ; Wed, 25 Feb 2026 15:19:03 -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-483bfb776a3sm31172885e9.7.2026.02.25.15.18.58 for (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Wed, 25 Feb 2026 15:18:59 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1772061542; x=1772666342; 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=PEa1I4PUq5js8xe3wd/G3RCIRdUkaAjJuHmk8sEwGKA=; b=jqpBROlwz4091UHV+/osz/QsULh6aMflqtDRGnaN7l1wLBi5rGfhwpO35iI7NCaET4 NvUEwlNOOIL0aKSO58lOEYFN4+3Sl4ojnt81VMVskv+j1CbztDnVlVtWr3RhHrj7z5rf CgLCcrjW9RvGWQFBDJBdMCd03O3/V/0Q7lHAT47B52TiFHq5qGurX07m+2tonX4cqS48 0gfwnbl4uds85udWtmBl3jU6VtfenyVVaLZb3UoRgXe1wanujhpC+KzmGj3LRjbsdovQ MWrhX1rinjlgg923FrYdaw8AXcxTgtj+tiCRqTS7//u0AWppATSZGPw7zchcpyOgaC0V cAcA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1772061542; x=1772666342; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-gg:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to; bh=PEa1I4PUq5js8xe3wd/G3RCIRdUkaAjJuHmk8sEwGKA=; b=RKr09OO1uxe3/yqkP/XKjcek4SdV/zdDIPfKsrqgXbr0lQ3lUgBNADFX03p6IExbje 4Zt8uCPbi6GKd3euSyijOgRZtTkoLG9saigAQ5xeSrnHuBeISQ6H5Qt9fVvG/v6kwQI/ OoQf85CRNLKm84qWUEK0sxJM11HujVk91kkW2DYOFrBvAZ6/0AZO1Y95weJes69FdB26 em5b7fGtTsY5STRDxenOXsnLJjHd3TlU2W2p3wwHBV35VXxu7Q1tQhf4AhKpV/L+W/9d ywvLih+zadUPmk5WsQlW1tRx7Y18THf1pk9EfHXCz6B1FWu7VF40qnjU2xcyFH21WLrq WJEA== X-Gm-Message-State: AOJu0YzHSUK2xmitgazK7UBSbttX0UFftJdT/WY3ph39XOG8ctBRSBd7 mpNx/lhNEgCGUdGRqxlvUZl+kMbo2vAMM5h5JejucAFbURkShlet/WnUboDj8HivEseYP2AiuNb jTkLAMz0= X-Gm-Gg: ATEYQzxmuAWUmQqChjLk9qtdarMFC6rE/WTszIrpqSMjMG2G1sasi5EhyN9ZHPhx4p+ tl65N6MY9fEb3zy+WEF36FnUn795r0lH8DCfAKg8m0vsHg2YQKm0+PC06/cyaldktgEX05bi4kP NFvKxikeqKvkYiJAN4UXr5hTaM3kz1p87Z5KTYHq+v3+XlXOVuYC8H3oBMwoBGV5FhxuBsipvG0 xBRqk+xd/R10bhRIEzlyIAX/ZAWY55NHo3WLFEN4hmQJiX3//IkbHWcPwANvidVl+is9ziYrYjf qDypsuWbeFTC1e433b8LABjLhuoua8kXFyy0fYjZI23J9pRlVT84GJeqveqItQmAB8CqMt79Q4W dxzbtf0r702FwD2PbjuaRaEHX2So1/RhtgHqUWCF8yimjL/iVpcYWVktyCdu7ie6PQ+FF4N9gj0 n+c0Mt1hNLze94yICgPekCcfDIuxr/qk3hOHa22Bji5pF9lEzlhjUokyD08v+sU1JW84nE9g+j X-Received: by 2002:a05:600c:3e05:b0:477:7f4a:44b4 with SMTP id 5b1f17b1804b1-483a95b3df6mr295360655e9.1.1772061541619; Wed, 25 Feb 2026 15:19:01 -0800 (PST) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PULL 42/70] target/rx: Expand gdb_get_regl() -> gdb_get_reg32() Date: Thu, 26 Feb 2026 00:13:42 +0100 Message-ID: <20260225231411.96482-43-philmd@linaro.org> X-Mailer: git-send-email 2.52.0 In-Reply-To: <20260225231411.96482-1-philmd@linaro.org> References: <20260225231411.96482-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::333; envelope-from=philmd@linaro.org; helo=mail-wm1-x333.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: 1772061813048158500 The Renesas RX target is only built as 32-bit: $ git grep TARGET_LONG_BITS configs/targets/rx* configs/targets/rx-softmmu.mak:5:TARGET_LONG_BITS=3D32 Mechanically replace: gdb_get_regl() -> gdb_get_reg32() Reviewed-by: Pierrick Bouvier Signed-off-by: Philippe Mathieu-Daud=C3=A9 Message-ID: <20260219191955.83815-35-philmd@linaro.org> --- target/rx/gdbstub.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/target/rx/gdbstub.c b/target/rx/gdbstub.c index 30074c9da7b..8be5141f5bc 100644 --- a/target/rx/gdbstub.c +++ b/target/rx/gdbstub.c @@ -25,25 +25,25 @@ int rx_cpu_gdb_read_register(CPUState *cs, GByteArray *= mem_buf, int n) =20 switch (n) { case 0 ... 15: - return gdb_get_regl(mem_buf, env->regs[n]); + return gdb_get_reg32(mem_buf, env->regs[n]); case 16: - return gdb_get_regl(mem_buf, (env->psw_u) ? env->regs[0] : env->us= p); + return gdb_get_reg32(mem_buf, (env->psw_u) ? env->regs[0] : env->u= sp); case 17: - return gdb_get_regl(mem_buf, (!env->psw_u) ? env->regs[0] : env->i= sp); + return gdb_get_reg32(mem_buf, (!env->psw_u) ? env->regs[0] : env->= isp); case 18: - return gdb_get_regl(mem_buf, rx_cpu_pack_psw(env)); + return gdb_get_reg32(mem_buf, rx_cpu_pack_psw(env)); case 19: - return gdb_get_regl(mem_buf, env->pc); + return gdb_get_reg32(mem_buf, env->pc); case 20: - return gdb_get_regl(mem_buf, env->intb); + return gdb_get_reg32(mem_buf, env->intb); case 21: - return gdb_get_regl(mem_buf, env->bpsw); + return gdb_get_reg32(mem_buf, env->bpsw); case 22: - return gdb_get_regl(mem_buf, env->bpc); + return gdb_get_reg32(mem_buf, env->bpc); case 23: - return gdb_get_regl(mem_buf, env->fintv); + return gdb_get_reg32(mem_buf, env->fintv); case 24: - return gdb_get_regl(mem_buf, env->fpsw); + return gdb_get_reg32(mem_buf, env->fpsw); case 25: return 0; } --=20 2.52.0 From nobody Thu Apr 16 20:57:20 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=1772061916; cv=none; d=zohomail.com; s=zohoarc; b=eUAYErNxeO+5M7sdhi1U71YYmm3PSz5BBL7diEhgxM/cw1KiwXg3UjtfAzFaWR3ngmdZKn/3VEbiXulZUw6oRcdVxnXCzqtyNxbe8wXxi5nG41m6Idq+z0iT7YuWR7U3ggLQolilg6y3u+jg6Bt8JEHPyg/Oc0rfIGlkoSVgcOI= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1772061916; h=Content-Type:Content-Transfer-Encoding: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:Cc; bh=UOwcsNYx5lvxmM9HIkeoZLS1sLoRQuqq5LOWsdVgJ+A=; b=LL15uvqvSac42O7zIoLc2dJP/mbgovLNu8yqsjn914mYe7lq5+U4VgHO4APyTAgGYY+2zid8SfBD6eFmqnF4M8he/dINwShHMuur8reEoq3OMfSxukAiS7alpECHKcJtETAVSNtvdjfxuhOaO6BdRe7VvHeoX2xQDfkQ5XJkpoA= 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 17720619169501017.2431625561807; Wed, 25 Feb 2026 15: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 1vvOAF-0007D8-Re; Wed, 25 Feb 2026 18:19:32 -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 1vvO9z-00079K-01 for qemu-devel@nongnu.org; Wed, 25 Feb 2026 18:19:18 -0500 Received: from mail-wm1-x332.google.com ([2a00:1450:4864:20::332]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1vvO9x-0003RF-Dc for qemu-devel@nongnu.org; Wed, 25 Feb 2026 18:19:14 -0500 Received: by mail-wm1-x332.google.com with SMTP id 5b1f17b1804b1-4837f27cf2dso2455615e9.2 for ; Wed, 25 Feb 2026 15:19:09 -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-483c3b3ce8fsm4360355e9.4.2026.02.25.15.19.07 for (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Wed, 25 Feb 2026 15:19:07 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1772061548; x=1772666348; 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=UOwcsNYx5lvxmM9HIkeoZLS1sLoRQuqq5LOWsdVgJ+A=; b=NxKgI0fcoyISH0U8gjUDpdthGsYFA4cKHOlopDt91KkGikHctRfVm2+UY3DQaiH5wA q+YfA3BiylfvXiMPmnvWl9MSzwMQ0Tf3T/DeDnsNEARfoakSNzMNkWBsimEwqSlEvO56 joNcujMXLU5Sl3y/wEutEPWI4JN/NvfA11k2rqNlPq9T36pzsdJIWqBo63MtaAd9f7mo YsA3uDF/V5hfyJnhsZwjpMt1D57xfdb46L+mnLp5mB8uAYkg04vkByNxqKzgrVEsxWrl pCspzR2hPKVkTIC5eLtekNQUpaTt3DozkPZUoXcG2UM4rfb0MkxwO1H2lNM9q9l56mii 4JBQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1772061548; x=1772666348; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-gg:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to; bh=UOwcsNYx5lvxmM9HIkeoZLS1sLoRQuqq5LOWsdVgJ+A=; b=oZro90Io2mZllnNCN6Y1njFh22hx7EViUdouGYCMTt4FNHCujBUJPZCn8KpYgkrcVo ngZlYR0ey4U3R7FEdQlPqC9G5hp6b4wFRJbUebOmeYfgveEHuSmWwyFiAlkFK6Mn1CN2 vYTPm7Ws9y3OI9ItIrOeHsQlXlPPGwk7VNdBa63RVC2El/ihKFoXgpYGTOLce7XbJ/5N LlK2UqgMokl5pFxbC9xTNG+Gl/lN4pg13iZWyiJJ9W4vweGYyIWTHFQnp/Q0Sy8hXMlY /RD0GdD3B2ZRknZ1U2bB0M5F0zADgndxCfirqHqdFWvaI97+/DwxtBL1lCgsT23BogZ4 jWPQ== X-Gm-Message-State: AOJu0Yy7cUnNaZD8xQMhFn5mooUrNgue3sp50hbq46022j7gnk8M/zW3 KkepOrLyLF70mqPPUlWOhDozQe2tKcDbuvYM/pfcgyNEAYQIvaA91BYW/+QoGwfegrOWe58A186 bGeZQL9A= X-Gm-Gg: ATEYQzxWCKDoy6LXc+jyrMyuW/668YkPjx42K0ldj7Ary8zRyQXg667UcgTdjCZxtzt ADbYXrca/kurykI9qKwacyTYdErx43DQsIxEYZ037Jhs5y93e/Ov3ERD9JR+Q65RHzwfv0f/0Q+ JEQbnDB8PK4QhHKzZwtWLOi52HBvrNNIGmmOVZmITdr60gmokIZNx2k6YcgEESRAgjO8JxAjanG 2DmqHM1SeXvfAEgOnvIZVGfNkBBafqXVAe4Rw7aew76t4S5xvEadWPbFrY66WC7eaYv9zjQ6q/u BwQTPfA9QAaSpy+D+k6V+xLHcdd+V6ATd4dO3lHFnMsX5HU6Y+tRlctYJsz0tZfS5dkpkdcS5VC c3VwK0zYXoCxmhVDPBVjcua/NC2f+t6gJhFo2/+0AjnCIZ1bPUGzHPHBJIOcgkTN96Seojvmzga alJ2LIRDVP+/2Y3+PFosGlGGgaedewwX0pbOA9+DVuDGWqAY3t7h8fqAZ/nOJb3QPUMxGYWDMU X-Received: by 2002:a05:600c:6217:b0:471:14af:c715 with SMTP id 5b1f17b1804b1-483a95eb550mr276028245e9.3.1772061548081; Wed, 25 Feb 2026 15:19:08 -0800 (PST) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PULL 43/70] target/sh4: Expand gdb_get_regl() -> gdb_get_reg32() Date: Thu, 26 Feb 2026 00:13:43 +0100 Message-ID: <20260225231411.96482-44-philmd@linaro.org> X-Mailer: git-send-email 2.52.0 In-Reply-To: <20260225231411.96482-1-philmd@linaro.org> References: <20260225231411.96482-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::332; envelope-from=philmd@linaro.org; helo=mail-wm1-x332.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: 1772061918523158500 The SH4 targets are only built as 32-bit: $ git grep TARGET_LONG_BITS configs/targets/sh4* configs/targets/sh4-linux-user.mak:5:TARGET_LONG_BITS=3D32 configs/targets/sh4-softmmu.mak:2:TARGET_LONG_BITS=3D32 configs/targets/sh4eb-linux-user.mak:6:TARGET_LONG_BITS=3D32 configs/targets/sh4eb-softmmu.mak:3:TARGET_LONG_BITS=3D32 Mechanically replace: gdb_get_regl() -> gdb_get_reg32() Reviewed-by: Pierrick Bouvier Signed-off-by: Philippe Mathieu-Daud=C3=A9 Message-ID: <20260219191955.83815-36-philmd@linaro.org> --- target/sh4/gdbstub.c | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/target/sh4/gdbstub.c b/target/sh4/gdbstub.c index 75926d4e049..4f36e800d2c 100644 --- a/target/sh4/gdbstub.c +++ b/target/sh4/gdbstub.c @@ -31,43 +31,43 @@ int superh_cpu_gdb_read_register(CPUState *cs, GByteArr= ay *mem_buf, int n) switch (n) { case 0 ... 7: if ((env->sr & (1u << SR_MD)) && (env->sr & (1u << SR_RB))) { - return gdb_get_regl(mem_buf, env->gregs[n + 16]); + return gdb_get_reg32(mem_buf, env->gregs[n + 16]); } else { - return gdb_get_regl(mem_buf, env->gregs[n]); + return gdb_get_reg32(mem_buf, env->gregs[n]); } case 8 ... 15: - return gdb_get_regl(mem_buf, env->gregs[n]); + return gdb_get_reg32(mem_buf, env->gregs[n]); case 16: - return gdb_get_regl(mem_buf, env->pc); + return gdb_get_reg32(mem_buf, env->pc); case 17: - return gdb_get_regl(mem_buf, env->pr); + return gdb_get_reg32(mem_buf, env->pr); case 18: - return gdb_get_regl(mem_buf, env->gbr); + return gdb_get_reg32(mem_buf, env->gbr); case 19: - return gdb_get_regl(mem_buf, env->vbr); + return gdb_get_reg32(mem_buf, env->vbr); case 20: - return gdb_get_regl(mem_buf, env->mach); + return gdb_get_reg32(mem_buf, env->mach); case 21: - return gdb_get_regl(mem_buf, env->macl); + return gdb_get_reg32(mem_buf, env->macl); case 22: - return gdb_get_regl(mem_buf, cpu_read_sr(env)); + return gdb_get_reg32(mem_buf, cpu_read_sr(env)); case 23: - return gdb_get_regl(mem_buf, env->fpul); + return gdb_get_reg32(mem_buf, env->fpul); case 24: - return gdb_get_regl(mem_buf, env->fpscr); + return gdb_get_reg32(mem_buf, env->fpscr); case 25 ... 40: if (env->fpscr & FPSCR_FR) { return gdb_get_reg32(mem_buf, env->fregs[n - 9]); } return gdb_get_reg32(mem_buf, env->fregs[n - 25]); case 41: - return gdb_get_regl(mem_buf, env->ssr); + return gdb_get_reg32(mem_buf, env->ssr); case 42: - return gdb_get_regl(mem_buf, env->spc); + return gdb_get_reg32(mem_buf, env->spc); case 43 ... 50: - return gdb_get_regl(mem_buf, env->gregs[n - 43]); + return gdb_get_reg32(mem_buf, env->gregs[n - 43]); case 51 ... 58: - return gdb_get_regl(mem_buf, env->gregs[n - (51 - 16)]); + return gdb_get_reg32(mem_buf, env->gregs[n - (51 - 16)]); } =20 return 0; --=20 2.52.0 From nobody Thu Apr 16 20:57:20 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=1772061758; cv=none; d=zohomail.com; s=zohoarc; b=nHRK8FQmDpG0uvnMj4FIYvHAsnY1zattcLvV9+H/oc8dunkndtBQSgYiUtNrPHaqcplFyzBSQbKu2EcJI9uPqd+jlw4PWup27VcpS8XSFaSBehQOkBLFCHb1Eyuf90pdbtVZwObCMM7KQDOL+S+Kb+F88tAa/g1Z8WfAzAClJT8= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1772061758; h=Content-Type:Content-Transfer-Encoding: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:Cc; bh=3PMPYRPo9wawXBw9HepTAWPF5vs6ZhQZDkMazwroLWM=; b=QyPfVXZaGuF7KKBalv2rKj/Djpo3JjumLIqScBDqQbuMk5AgPz+sqhHc2yGA8UTeieot4se8xi7OCdYsNXdgUDcdlqnhTmZzeljUUeORIMCqdmHOPuI5K8K9EZdDOXKRANZTtKeYgVu+h9K6d6lWutE0mpzXCKFbAuMJBIM0Ovw= 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 1772061758131206.1756233630291; Wed, 25 Feb 2026 15:22:38 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1vvOAH-0007GZ-Rc; Wed, 25 Feb 2026 18:19: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 1vvOA3-00079x-HT for qemu-devel@nongnu.org; Wed, 25 Feb 2026 18:19:22 -0500 Received: from mail-wm1-x32a.google.com ([2a00:1450:4864:20::32a]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1vvOA0-0003Rq-CV for qemu-devel@nongnu.org; Wed, 25 Feb 2026 18:19:18 -0500 Received: by mail-wm1-x32a.google.com with SMTP id 5b1f17b1804b1-483703e4b08so1954165e9.1 for ; Wed, 25 Feb 2026 15:19:15 -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-483c3b84023sm4007815e9.12.2026.02.25.15.19.13 for (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Wed, 25 Feb 2026 15:19:14 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1772061554; x=1772666354; 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=3PMPYRPo9wawXBw9HepTAWPF5vs6ZhQZDkMazwroLWM=; b=JEVaHyh6TERarEAJbQeVTH8QLtMc58Dl0Q/HwksSvtPIPR5PyixrnNG5c2VM6tXjo/ INVNGRsSibSNq1hPv4TZ0YCPU4uluawxB2idAGiftd/vqUGgnOiRwWOGV8f3wRxVRhT3 A4lKWRgS7vWEN5aaN9Qn3B+Dmv08JE1JU4xrnnsNtFhpyjhLrRuIjzy1+uSYqGbPXAJb 5MdGtIxLpBhaxGTGgpbrrZvJMfjvN7woEIaS32KoQ6jenROW2Z5KSqUnsWw80XpJJdzB MG0LWezVMfjRQYN4FxcVAocrPib7l1ldobUrKEc5nQNPJnITxhG2ToKEDZp5a+B+18jf f45A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1772061554; x=1772666354; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-gg:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to; bh=3PMPYRPo9wawXBw9HepTAWPF5vs6ZhQZDkMazwroLWM=; b=YpxxQ0DJXZULMdk6Ul4XtJoqh08TY1xchWoSztZoEWtf2SxgRtLRSIOyrLuyp4QxZQ 3Xb26gnrULoU3+7s4wFYt0zAj7KEgARELTaDYjP7FFQENItmKV5EbsIQyictCaR8aZbS iwt8CKPjfKrAiMrokWVtVbOPZ0IZGEAN6u7Pl/yRfynkgE9gX2Obn6NxLvwzuHLPREkF HYNV2JfgcdrZKYI4qsaVsz7r+JQA0xRDiDoiw5mC6Izk+KlxqcYeSmw8/urTSmVX964B w/42VXvwuYWHjLPgi2GX0YEj4Of0psqbRgPBxaTTwAAekWfB/kydc/nBy8lK4UgXFxQW MLyg== X-Gm-Message-State: AOJu0YxHLeRpu+ncoa5t6+fq4pnBAltdE+DNZEVbpJuiNnFg1h4X+6fR 2Ld1o/3Lvh7MZ74xBDVn2aQasjDD/NJp2B3NB5HZeq6yt2vzvPbpmKvQAPfP1xocD5ui+ulgd68 IWoXh+P8= X-Gm-Gg: ATEYQzy+O3SI9Uy/eNFFNVmO8tExHtsaJfxLUNnaV3yRTZGhwCokKBceZaUqOc1bIUm vp2RBanTbR+KVmR380WFLjx69SPaAe2s8QrThIWOHAKI8Ykftk8buregMxmgUiKlgHsejhOWNI3 wNflsfLUL9ygDCw44zhDiOv/t4zZuiLvetLYc3gKI3d9l0y0XrQzWcXyTK48I0vuOUIny62MJIp MLv5JvdQ8Z07YY2GLy0Vy2mhhzxN4AuqLd9VvF5EV2/9yCNxE2IJEEhRRDRxlwc4BMZZSavUhoM CMi8rNWdoseIJjTGTqixWyS97Pzxm/nBeB/IJ899/2HsSxxBWwHIQN6S33w2sUa/6mw3s1rauS6 M4GaCsb5pLTZjhV/AB16JbmiWUvIr+rYrD3ssl7Vlh6mQbSwg+oZzdYMklk+GShNNxRU75FDXa1 R1UGbxpMgKN7PxrWFadBeV3IDqa73dGKZcZwhZWbQbc/7u1Q3Ee0C+Sv5pdfwn5VLiOmOOUrBA X-Received: by 2002:a05:600c:3510:b0:475:ddad:c3a9 with SMTP id 5b1f17b1804b1-483c33d6447mr12927625e9.13.1772061554539; Wed, 25 Feb 2026 15:19:14 -0800 (PST) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PULL 44/70] target/sparc: Expand gdb_get_regl() in gdb_get_rega() Date: Thu, 26 Feb 2026 00:13:44 +0100 Message-ID: <20260225231411.96482-45-philmd@linaro.org> X-Mailer: git-send-email 2.52.0 In-Reply-To: <20260225231411.96482-1-philmd@linaro.org> References: <20260225231411.96482-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::32a; envelope-from=philmd@linaro.org; helo=mail-wm1-x32a.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: 1772061759978158500 Convert the gdb_get_rega() macro to an inlined function, expanding gdb_get_regl() via a TARGET_SPARC64 definition check. Reviewed-by: Pierrick Bouvier Signed-off-by: Philippe Mathieu-Daud=C3=A9 Message-ID: <20260219191955.83815-37-philmd@linaro.org> --- target/sparc/gdbstub.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/target/sparc/gdbstub.c b/target/sparc/gdbstub.c index d19819cd1a9..792bf70a145 100644 --- a/target/sparc/gdbstub.c +++ b/target/sparc/gdbstub.c @@ -22,11 +22,14 @@ #include "cpu.h" #include "gdbstub/helpers.h" =20 -#ifdef TARGET_ABI32 -#define gdb_get_rega(buf, val) gdb_get_reg32(buf, val) +static inline int gdb_get_rega(GByteArray *buf, uint64_t val) +{ +#if defined(TARGET_ABI32) || !defined(TARGET_SPARC64) + return gdb_get_reg32(buf, val); #else -#define gdb_get_rega(buf, val) gdb_get_regl(buf, val) + return gdb_get_reg64(buf, val); #endif +} =20 int sparc_cpu_gdb_read_register(CPUState *cs, GByteArray *mem_buf, int n) { --=20 2.52.0 From nobody Thu Apr 16 20:57:20 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=1772061784; cv=none; d=zohomail.com; s=zohoarc; b=iWw1gYTNSUgzLal6EJQCyT1Fw7LR5IUWa4K9gfQY4sUOfqAhBfYaGYkCY9GSXMhSzpQiFrFqo8JQZme0xE1AQVnLFHTJNbMSxqVDa+0FrnVjF3mjJV+SGa9KVicwHwJfRqqU9Mpk5WIb9hHJu5nFdDOdiHfQ/eUhZTE2+nMPAgU= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1772061784; h=Content-Type:Content-Transfer-Encoding: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:Cc; bh=lMJ2aUNCM5aUuy6BHxWLWg+FGSreU8pqwVtxyYC+Q9A=; b=ge71Y4WPq3giayjxEAKdXUVTOfIMdAiSWmz8xGIEPzs1I+JauoHD6Cs3YvDQi4G44DiD6JXo1HhFd+h13PP5UcI4SCvjczXbJnfkPOY3WTSitQ4Std9ZrEWTNUBag0ncWbkTc63CjfV7UOHUFAr8r/DUo/AlE+rV3ooomR5VE1E= 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 1772061784675588.5054206150244; Wed, 25 Feb 2026 15:23:04 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1vvOAH-0007Fc-NS; Wed, 25 Feb 2026 18:19: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 1vvOA8-0007Aj-PK for qemu-devel@nongnu.org; Wed, 25 Feb 2026 18:19:26 -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 1vvOA7-0003SD-A8 for qemu-devel@nongnu.org; Wed, 25 Feb 2026 18:19:24 -0500 Received: by mail-wr1-x42d.google.com with SMTP id ffacd0b85a97d-4327790c4e9so154418f8f.2 for ; Wed, 25 Feb 2026 15:19: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-43970d3ff1csm35875932f8f.20.2026.02.25.15.19.20 for (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Wed, 25 Feb 2026 15:19:20 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1772061561; x=1772666361; 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=lMJ2aUNCM5aUuy6BHxWLWg+FGSreU8pqwVtxyYC+Q9A=; b=Vfhw0j++lzmNvR/9QaWET/mC3lODwlQc9co8s42BJ1UjS/bIR4ePt7OHNl5Y76AMrD z96jseDIeLQvYkaOu8aDuJYZZZtLqeoFwV75jRnWZjhqu2QvRxo/OR875gC26VKFcvwJ 9Bvsu9i/Lm4n59T3QYLPSpoiMouk9NRP0gQ/m+t0oYtPkBpwai80RPG2C48oI5jz1Fxk K5EkhJJE1Y6sYP+gAEawKXPfi2DSfz4lI/7iHZslrpsErJXona/cLFzq769RbL5WvNBd vA/g9rp/lLD7M74dOVf6NO2EX5XVafOz/d+CDnbHulqIhzu7tvvJtoYUZyqObO+OhrJ2 560w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1772061561; x=1772666361; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-gg:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to; bh=lMJ2aUNCM5aUuy6BHxWLWg+FGSreU8pqwVtxyYC+Q9A=; b=OQI+Au8P9W7rl8aXn3lx7fRJzyfIkhHj2jASVt1vL4h0EJZ36pjWTi2KXMB+ptV4jN JfMKo1e2Cs+W63dq40zCWKN1s48T0GhNefMkP2M2DIt6CCjLkLyDe+a/ce0AK06WPdeV gbn4WM3dmtUnW4mPPgJ853RTooDc6lbdiy5pEgRc8RQwjGcbyczEGBGfUKcj4QYSSeoJ i2Fkp3MrA8SA7l690pdbHq1ZX8N+SQVNvD4I5HIpA/crCFwgbHAa1376TPiH9+pwjWbK jEGI1DuygkKj+xX940G49z3swOKh2l+WFvfX4tegcH3hakGEVHELwdhPzG/R6ARQrAnf 8PGg== X-Gm-Message-State: AOJu0YwNzYX6bGUkrvx2igm9SWx2huc3q52VcYXMpSjNGkiUFQBHvz1h bVDNxpM2CbcLtktdz+JxCXLQfJ3ovVyukpZrr+ZXYKoEjPCYa8Ld9p/5Yk4L3HT0g4l5iFIzQ0c w6uF3Nm8= X-Gm-Gg: ATEYQzxU5vWpenBp6rl+0AaUyAFku3cZrvT2Q+/ty2z05rNVp5rLyvwRP+A3a0O1zZK YGgoHjBZGqIfekxxvG49fynDLbDOspDZbGaCvRNSj0u+1MuCMVyx5x0i9nd6G3zS3mtF06yVufh dvDMRbXoTj69skn2tJYLxaD4t5GreulkEJ5c1i93uHON2m0fUr+TlmcslELuK/LIZUIBqlR5vh+ 0lqH2Ppwai7BHEmg0TLvzPaxejTnLFYBeXIxhrqEVkHUqkum41iXz4ihCPj1i1EKBJVVQSVPFb+ lIC/6OCy5XoNOe9S15+eYs6mZmg69pobDtfpYq/GU1NmTSz8KhrSeso8huRafVALvZcqysDijt6 yHuCl2Jmq5CCcq/vaLu49U8HBq2OREKWU6LePHLYy5GqielMM3QPmfprpAg3NKGdxF8pMx1o7uc pFPy2fuzOKdP5cJkofHXUxbFB2XjBtBqDX+zPqlO5SfmrlffskNitFNtcMXSZwa5RSdQ3Hwdfj X-Received: by 2002:a05:6000:2508:b0:439:8f32:8668 with SMTP id ffacd0b85a97d-4398f32883amr8251675f8f.58.1772061561184; Wed, 25 Feb 2026 15:19:21 -0800 (PST) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PULL 45/70] gdbstub/helpers: Convert gdb_get_regl() macro to inlined helper Date: Thu, 26 Feb 2026 00:13:45 +0100 Message-ID: <20260225231411.96482-46-philmd@linaro.org> X-Mailer: git-send-email 2.52.0 In-Reply-To: <20260225231411.96482-1-philmd@linaro.org> References: <20260225231411.96482-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=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: 1772061786028158500 Rather than checking TARGET_LONG_BITS at build time, check target_long_bits() at runtime. Reviewed-by: Pierrick Bouvier Signed-off-by: Philippe Mathieu-Daud=C3=A9 Message-ID: <20260219191955.83815-38-philmd@linaro.org> --- include/gdbstub/helpers.h | 22 ++++++++++++++-------- 1 file changed, 14 insertions(+), 8 deletions(-) diff --git a/include/gdbstub/helpers.h b/include/gdbstub/helpers.h index 402514716d7..b2f41d6d280 100644 --- a/include/gdbstub/helpers.h +++ b/include/gdbstub/helpers.h @@ -88,6 +88,20 @@ static inline int gdb_get_zeroes(GByteArray *array, size= _t len) return len; } =20 +/** + * gdb_get_regl: append @val in @buf using 32 or 64-bit, depending on targ= et + * + * This function is legacy and deprecated, thus should not be used in new = code. + */ +static inline int gdb_get_regl(GByteArray *buf, uint64_t val) +{ + if (target_long_bits() =3D=3D 64) { + return gdb_get_reg64(buf, val); + } else { + return gdb_get_reg32(buf, val); + } +} + /** * gdb_get_reg_ptr: get pointer to start of last element * @len: length of element @@ -101,12 +115,4 @@ static inline uint8_t *gdb_get_reg_ptr(GByteArray *buf= , int len) return buf->data + buf->len - len; } =20 -#ifdef COMPILING_PER_TARGET -#if TARGET_LONG_BITS =3D=3D 64 -#define gdb_get_regl(buf, val) gdb_get_reg64(buf, val) -#else -#define gdb_get_regl(buf, val) gdb_get_reg32(buf, val) -#endif -#endif /* COMPILING_PER_TARGET */ - #endif /* _GDBSTUB_HELPERS_H_ */ --=20 2.52.0 From nobody Thu Apr 16 20:57:20 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=1772061845; cv=none; d=zohomail.com; s=zohoarc; b=BcnKTxD8T4S9YmkMmNQylsXd3RdoOwpjIwc1+uPTtrHdsoqkqRpK4bi7PCMc8x3U589LbazE+Qhm6bUEYA6jhYme3fOswgOquqmX77blCYaMwEUNmNqSPT4hywBKr1dJEmbl07Yn+Jhhg1QYZittW83o9GoihVdKeLRD8c1YAWg= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1772061845; h=Content-Type:Content-Transfer-Encoding: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:Cc; bh=LYYfPvBKJeHUWebt5+j9ST6av3ymDgSZUVvb01/rGEE=; b=AN0YkR1wCDeACRvBe4WyyAjgKCFvm6mQTkd0VKPeeODwq6EH4QowQeKgF13WHMWGccqAY/aHv1L2wF/QZcHtME4G7TosU3bb1PD+yAzaVL2gsWddtkolzg/EwxUDSw7xIPIYNiMydPBDb0C/2hlVAizJiaCtcfSHB3D3JUpkNY4= 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 1772061845671608.0690138430896; Wed, 25 Feb 2026 15:24:05 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1vvOAJ-0007K8-3l; Wed, 25 Feb 2026 18:19:35 -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 1vvOAH-0007Fr-2E for qemu-devel@nongnu.org; Wed, 25 Feb 2026 18:19:33 -0500 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 1vvOAF-0003SW-H5 for qemu-devel@nongnu.org; Wed, 25 Feb 2026 18:19:32 -0500 Received: by mail-wm1-x334.google.com with SMTP id 5b1f17b1804b1-483770e0b25so2521525e9.0 for ; Wed, 25 Feb 2026 15:19:30 -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-483bfccff00sm22773025e9.25.2026.02.25.15.19.27 for (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Wed, 25 Feb 2026 15:19:28 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1772061569; x=1772666369; 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=LYYfPvBKJeHUWebt5+j9ST6av3ymDgSZUVvb01/rGEE=; b=iXAIEQ+EBQm+b4vzvQClAtF9RJHEhQV2mgtxMVWK/yPBCJGzbHXB8xQbC0eS8dXV2o Qdf5SsVHoeMhnwHRz//BRceJZloddReYvbL6ZLYhDhxFIUBSd9jEigtPtwc62vm19T3f J1tN5JkwkEIduKe4UnpzRq1tVi321wVkVcQ2rULINpE+agaAO3Xoph2ZB3U1MlJ9wqHu pqYd4XGRLWf1NoBzY7hbl2FCJSxM3y2kl2CgE2oybEG7wrzOFDGhJAatiW5GViKWtdjP b1KWUtn95DrxlG9R6ZixLtU+uNFt7dF5YWgq6me1BwDEdp0M8Qa/ay9ByaiBNmK+fgQb vHcw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1772061569; x=1772666369; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-gg:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to; bh=LYYfPvBKJeHUWebt5+j9ST6av3ymDgSZUVvb01/rGEE=; b=dz5j5GUOUmOSuUJi8LaB2KTAEJ35AJUChJm0tjs+6BTHIEVkurrE3deJz6aS0uvUKC s9HEI78xee0JxSRCTQ79LoD2+I2QS9CNmHdAP6Fu3Nztr8aqErrEP/Egb5r+IKBGI3wW ZBBVXGrW+ZFOFrhkC0Omi6rg8jMgAck3Gh/fReNr8yevdqzlP2RVMolq5WhEldCGGqRa zpghS9CnvVHC+7Mdphn7O858+Hy6GYNArA4NAT31wei/6pQL3YZTyBEF/Dbm+WbRIWiU 0JUcsmXEuS0HAOnSo+pMyg/2WcP7ZRXj3W4bXs7gX8ary4ZJqRZo6jPqR8bvxKETi4nq 0ocA== X-Gm-Message-State: AOJu0YwYydVBwiRcveizExqHJ4ie4VIOYOLRmO2RwQI2ncgyANB5/zju jX6SZ8Vaj8mqwb7RnKn9Ng8Cpeem5SoBJ6fRIEa2fhqSPHorKWJr6V+qWbpLlySwSaRxQ2Kmy79 yJf0Eir0= X-Gm-Gg: ATEYQzzm1NHztN01b8rflXpDBD3ZvfTiaoP8rZJ4hJ2qdpCnwyxTCp/GRBxHWSNgueG MC0ZAmnS6FKN2Tmep7rkG5+LcCyKJkrDmWxgKYtum1a0MAC2KqVTxakOBXjrrPkkfDXcLwse1+f z0vea6t/GYvxKf7+KRZxClWSkGj2R/yLyNzHWIs/NlvF53MgxpEgV1DuGEib2g1d1DAbPxV/z47 fzj41KbbFFbAxMpuj+RpJZz+4K2Q0rl92Q6lxaIovc2+PrVJ2LYJDT0PVdWX2X//XeCcWB29Zea B/RS5AA4DwDxJVpho88djp1JneYUVH+c62HN13oAxcwLPrmk+MGzFxkWsBO2X+Cu97eG6bX6CB4 qbtqdWolWjkbGGKJGgv/dYKNcAK4yBQ6FOfHEUXc00TBL9UpHE7Xe+eBJvqA1bO5pVw1TAsre1/ IZESoU4LcXmkeBgmSx+aB1cFOXJZWxZwvY8HZ4ZgGHeuLl37QifaBEKFgLg6cAHaidj+5pvMUw X-Received: by 2002:a05:600c:4057:b0:483:c12b:fe46 with SMTP id 5b1f17b1804b1-483c12bff6cmr36169825e9.10.1772061569374; Wed, 25 Feb 2026 15:19:29 -0800 (PST) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PULL 46/70] target/microblaze: Build 'gdbstub.c' once for system binaries Date: Thu, 26 Feb 2026 00:13:46 +0100 Message-ID: <20260225231411.96482-47-philmd@linaro.org> X-Mailer: git-send-email 2.52.0 In-Reply-To: <20260225231411.96482-1-philmd@linaro.org> References: <20260225231411.96482-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::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: 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: 1772061846302158500 'gdbstub.c' can now be built once for all qemu-system-microblaze* binaries. Reviewed-by: Pierrick Bouvier Signed-off-by: Philippe Mathieu-Daud=C3=A9 Message-ID: <20260219191955.83815-39-philmd@linaro.org> --- target/microblaze/meson.build | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/target/microblaze/meson.build b/target/microblaze/meson.build index b30b8f70ace..b86b37d9238 100644 --- a/target/microblaze/meson.build +++ b/target/microblaze/meson.build @@ -4,12 +4,17 @@ microblaze_ss =3D ss.source_set() microblaze_ss.add(gen) microblaze_ss.add(files( 'cpu.c', - 'gdbstub.c', 'helper.c', 'op_helper.c', 'translate.c', )) =20 +microblaze_user_ss =3D ss.source_set() +microblaze_user_ss.add(files('gdbstub.c')) + +microblaze_common_system_ss =3D ss.source_set() +microblaze_common_system_ss.add(files('gdbstub.c')) + microblaze_system_ss =3D ss.source_set() microblaze_system_ss.add(files( 'mmu.c', @@ -17,4 +22,6 @@ microblaze_system_ss.add(files( )) =20 target_arch +=3D {'microblaze': microblaze_ss} -target_common_system_arch +=3D {'microblaze': microblaze_system_ss} +target_user_arch +=3D {'microblaze': microblaze_user_ss} +target_system_arch +=3D {'microblaze': microblaze_system_ss} +target_common_system_arch +=3D {'microblaze': microblaze_common_system_ss} --=20 2.52.0 From nobody Thu Apr 16 20:57:20 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=1772061766; cv=none; d=zohomail.com; s=zohoarc; b=d1wJKs0hJXUD9N2XtDaPwaHZRqcR6k98pvMAjVATPtBesa9c3oB0lg3SXOXFDP+3Qlng3+ne/TFGaklrN5U1oIVuABG54SrACIMxWfYgpt4z2p8Y7BWXyu2AxG6m4vbfpoEekKDKB09VPQLGcfbIXWKMdhugEGpxsFmruOt1TkE= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1772061766; h=Content-Type:Content-Transfer-Encoding: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:Cc; bh=nVIDYsjJNo00V4RXjiOYkAXaiezQ6gZ368AnaXXRDiU=; b=DFXLFr2eqE6+YizpB8PptB0pafLmcOET3PlxtfveISl/kmLA24O2oCG/HokapVysgPqgLCNK9HUAIe68rwIyoO8I8nbV2uhQfI2hcjggqLXHKfuuJt6bLrKhVod+AyEzABp03b1I+VDcwyG1EGUCX3Hhi8Gpwakg9fsKRBMVvOY= 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 1772061766581937.3142648800011; Wed, 25 Feb 2026 15:22:46 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1vvOAP-0007OP-NS; Wed, 25 Feb 2026 18:19:41 -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 1vvOAN-0007O3-HM for qemu-devel@nongnu.org; Wed, 25 Feb 2026 18:19:39 -0500 Received: from mail-wr1-x42e.google.com ([2a00:1450:4864:20::42e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1vvOAL-0003TW-QT for qemu-devel@nongnu.org; Wed, 25 Feb 2026 18:19:39 -0500 Received: by mail-wr1-x42e.google.com with SMTP id ffacd0b85a97d-43996323357so109916f8f.0 for ; Wed, 25 Feb 2026 15:19:37 -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-43970c09897sm38194494f8f.17.2026.02.25.15.19.35 for (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Wed, 25 Feb 2026 15:19:35 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1772061576; x=1772666376; 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=nVIDYsjJNo00V4RXjiOYkAXaiezQ6gZ368AnaXXRDiU=; b=Tot1qQGmku+j+nnnbKE3XN6Ccse5a8Lym8GLNftgF4NrOUfj9dqdsVC3gVVVhwn6ad s8t5prGrUEItW4xfhLoh4t0cDebgbwTZVIxT/dyeRcwwt0rDWHhhpRRawyXeVwuSKvro Mi4VQHrsThu9Y1Vg+9TW78dTh1iCN4XLo364t6N8jxOkQG1j5VsQQXQQvoab9TAMNHo6 uzfAUygX7WVn6+lkFqEYBF9Lm4pgNG8Vxn5arKCzcnjAXmmj8qlZNqQjtLGWExHvgJxx RLV9+uLHU+rAUYC1GErJIPpYx91LoP5f8rUVtSQcf0VgSMJrn0KvuBe/Plc+L4vQLaYG hwsg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1772061576; x=1772666376; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-gg:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to; bh=nVIDYsjJNo00V4RXjiOYkAXaiezQ6gZ368AnaXXRDiU=; b=S7Mm4tSX9dKuzWSnvx0/Fl3ovkXMYxgEXNYvvqihPwA7buwW6Ispo/TqaG3QXJcqg6 EPrYmjpdOEgUQcCb6VsDjvgrk4oRWAbuD9ak+4dN9agRd0HrzhXyRbftvkBXOq8eXd71 mk6/o52WDCbCIUYSn9J82aeliGVh1R7waiS9XhW/swHsTU5KZn60qM94SsS6liZPduP1 hS4A8Pw0Ga9paBOot4AHeBfdwW/zrRN42IMzf73i+MW2T6VFam9M6qBclI5AE5MdDQup qcDDLmVWpWzt8kHr1PCJJTsTWHnilIAShoVwJkb9k9Gq9bKhYQQo2g6Vp8wMEtZz018K Pgpw== X-Gm-Message-State: AOJu0YxxeuCH/ZoP2o64sYdJ1hhB57Gpxr2mVEPuEI6pUb74Gmo6zIeE ZqdR2iBN+n3Pffsb9zXmSAvoE1GvxE50l8DUlLzABKcpRKwikZy2W4tNHujc6q4XkOrdxb/Al4K 8iK5g9Ho= X-Gm-Gg: ATEYQzwprLui2+36HL3aTQLdnYcwZ6oqTcKYLcZNzkGva71rUzglD37AE9IpLOsqLj2 IAcSdjnXubNN0piaar4IPV5hNtZ/eSakscnwGn/7c3VuOYcHA7FH1TXLzbHUBE2VW40dGUSMuh0 I9A/1ldOK3DA07nRQ6NJKUfsnlpiQZ4QqEAjoz06Y51FWwp7VveYZJWdIMLQxRnkEKxEcW/p6sX YOiPH9WyGuvQV9QNd9Xt6nvatd7J77JC66thIdmAusCYb4/9n8cyMBlVIzkqRQMRlUTrcxXPKlV Co7V7n1L0rcNe6BiGU3cNGK8zVUoycrjXK3UNJ15FOiO3UFWPMeN9ua39XhpFPuoe6zcadm5fqx XbCF/gt6PUz3wDFK/kgI5FtuXjRjK5uEpjuEg8iGIGm9gf7qa+ceRC3CwU9xyrswuFTCeR6Lavf iw7s3UZ/R4GVS2mCw2hfH0f3+/kbj8ZAMgReARjPg/LEYsJKHq+XBhbTZHxRv1Alxh6qxZNTBA X-Received: by 2002:a05:6000:2086:b0:437:70d3:44e7 with SMTP id ffacd0b85a97d-4396f182eafmr31539809f8f.30.1772061575845; Wed, 25 Feb 2026 15:19:35 -0800 (PST) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PULL 47/70] target/sh4: Build 'monitor.c' once for system binaries Date: Thu, 26 Feb 2026 00:13:47 +0100 Message-ID: <20260225231411.96482-48-philmd@linaro.org> X-Mailer: git-send-email 2.52.0 In-Reply-To: <20260225231411.96482-1-philmd@linaro.org> References: <20260225231411.96482-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::42e; envelope-from=philmd@linaro.org; helo=mail-wr1-x42e.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: 1772061767941158500 'monitor.c' can be built once for all qemu-system-sh4* binaries. Reviewed-by: Pierrick Bouvier Signed-off-by: Philippe Mathieu-Daud=C3=A9 Message-ID: <20260219191955.83815-40-philmd@linaro.org> --- target/sh4/meson.build | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/target/sh4/meson.build b/target/sh4/meson.build index 221700bcf8c..1327507dfc8 100644 --- a/target/sh4/meson.build +++ b/target/sh4/meson.build @@ -7,8 +7,10 @@ sh4_ss.add(files( 'translate.c', )) =20 -sh4_system_ss =3D ss.source_set() -sh4_system_ss.add(files('monitor.c')) +sh4_common_system_ss =3D ss.source_set() +sh4_common_system_ss.add(files( + 'monitor.c', +)) =20 target_arch +=3D {'sh4': sh4_ss} -target_common_system_arch +=3D {'sh4': sh4_system_ss} +target_common_system_arch +=3D {'sh4': sh4_common_system_ss} --=20 2.52.0 From nobody Thu Apr 16 20:57:20 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=1772061883; cv=none; d=zohomail.com; s=zohoarc; b=SvA7oJpX+efVS9rcB6Yt5MN1B1URYI6oskJ5sr+eC2vTl6BT+8hktkqcuQ7hZ7IGt4pJVQxZFMbwFKWcvyMlXRyashcTCsUAwMlpeRQ6nMMdgNM3q4BYZw5IEo7OpvXfMD0fTV7kinpcLgjr72JEjHzoXjtZq2gfWNz7E7HQHOc= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1772061883; h=Content-Type:Content-Transfer-Encoding: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:Cc; bh=txwgsK6qnNhvJOsrDFmGGS9GEAd+UggP9g1V6IJl2ds=; b=AKBDAUdvdqWPnDtnYUkLTDXaCMQwGBjrF/YCzin/pAVsNY6B61KyW5D1xWD7hZ7hIfNHEPVS65dyzx7UMWeji3Lqw5AP/uMpcAu7G8WTmZf2VGuGYga/JUg7LcEIvyBXUuiTH1luJfu4g0uf/z69wJBrvFpn0mEGB+ptWmqqWaU= 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 1772061883288146.64671826264828; Wed, 25 Feb 2026 15:24:43 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1vvOAW-0007QH-7G; Wed, 25 Feb 2026 18:19:48 -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 1vvOAT-0007PO-Sa for qemu-devel@nongnu.org; Wed, 25 Feb 2026 18:19:45 -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 1vvOAS-0003Tw-AG for qemu-devel@nongnu.org; Wed, 25 Feb 2026 18:19:45 -0500 Received: by mail-wm1-x32d.google.com with SMTP id 5b1f17b1804b1-48371119eacso2917875e9.2 for ; Wed, 25 Feb 2026 15:19: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 5b1f17b1804b1-483c3b84023sm4020995e9.12.2026.02.25.15.19.41 for (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Wed, 25 Feb 2026 15:19:41 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1772061582; x=1772666382; 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=txwgsK6qnNhvJOsrDFmGGS9GEAd+UggP9g1V6IJl2ds=; b=BzF2xfjhERh0+RGyS0QAMEnlYjk/LMz5XHL1hwyC5npgjEP5/3kHo+/6tZCaTjLCnm 4foW6aKTbXL2ZWf77fIhyvHk43RmyjB7/XVyY4nlRCTv6/TKvabve2RAiEm4kZGEtmF5 NRdqBo0PtFz+m51EXh8rycuxEca2g/bDJJ8b/NDGCJ0rfnmiiqv/JQKce68OAhKxKOM/ uFEd5EPMMqjIAtK8OwXTItp1hCqxumWgMkTHCvCEM92VjLbl4ln/GsdBoAYbNrqH9b8Z OGnTQPCdZtA36rbguiOsTXJhi2C8EVZim6oiEhvsyMeOxoe/qXpQ9mxV55nRredkAvB5 ywGw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1772061582; x=1772666382; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-gg:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to; bh=txwgsK6qnNhvJOsrDFmGGS9GEAd+UggP9g1V6IJl2ds=; b=j5iqOIyMWqRo4vHitBW+AqnZB9rOyoC9yJbZla091mq21QEuzaydDFzOso0y08RCh6 XI60R9ZnZJMCmM3Fa/mEes2ZtkOPd3lOlJfqVZFT5iJksa0CMEUyPy+wKo79ifXX3STT zvELUxANZdOAfRDEvW4PDuSs4Eq5Rjn0gfpTYQJXExoS3RmmlG+7oE7Eqyfpa0QAUwwz rUAj9Wt+0RKaKiY87v83Kex8N08nqBjPPwe2oQus8CRTeKd3vd0m9t+3preSdfh3hzcg yx+ifLQb8V3CtWDDBoPbXtwzFxw96wCwxq9GfXPpDjqnvlEuT9YttNnT6gXVlnd8rXZ7 QZdw== X-Gm-Message-State: AOJu0YyGpCZN4cpL9/qkq/q5H/YaPQpNUlTSx/XUmWKeQRJjTOD9HuPd +RWdL3E3Oi448jaz6k8RMcqV7X2O0UsITOh5t4Sghn9yGeASkIeS8f0hPIV9DheRcF5va6lxbIO 0m70O21A= X-Gm-Gg: ATEYQzyVrMlJsSBe6jcHInNdeKsK+go6oe87PYQxrRzzRJrwAIe/lHqAxH4F/kYycJt TcnOH+ByFBY08SXoEmMMqMXmi1IIcN0xC5bfVXZLdbGqCO8rqTVcLUnekuBGUTC5VGD5E9tHMR2 +3bJYctvmsjPrQsqX/oBQdQpvnuRB5dcWEbb38xzlakk7kmrZlU3nGg/56ji4ZJcf+Mw+ct/sF/ +TK9VDTv5YfH1gxw7nHIDSF/0XErFoVp+nqsxdriyWQYRXuQxM07g+P7HXzDZgfu7rRWmLAGSjZ wBa0Gw4yCGHxL/CtuBS0l/LXBkfCVjtD/JSRQOaVcsCd5NyxZHIKmDB7e8upMVPV+cUQzsWldt+ 3az7DfuPMn4zQNzV4Jps54rGI57p+OAy5Gy/hRt04h9zTBKt69YCxzN4wR8yOlEKZOWpuAprdhQ haCHjIcr6xI3em1w9fuRC4YuVYFYCVhpZIdnZbX3w7GE3AWjT4uwX/zh/IYUqfVmUezKDCwyTW X-Received: by 2002:a05:600c:348f:b0:47e:e91d:73c0 with SMTP id 5b1f17b1804b1-483c3dd7806mr1308575e9.19.1772061582382; Wed, 25 Feb 2026 15:19:42 -0800 (PST) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PULL 48/70] target/sh4: Build 'gdbstub.c' once for system binaries Date: Thu, 26 Feb 2026 00:13:48 +0100 Message-ID: <20260225231411.96482-49-philmd@linaro.org> X-Mailer: git-send-email 2.52.0 In-Reply-To: <20260225231411.96482-1-philmd@linaro.org> References: <20260225231411.96482-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=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: 1772061884370158500 'gdbstub.c' can now be built once for all qemu-system-sh4* binaries. Reviewed-by: Pierrick Bouvier Signed-off-by: Philippe Mathieu-Daud=C3=A9 Message-ID: <20260219191955.83815-41-philmd@linaro.org> --- target/sh4/meson.build | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/target/sh4/meson.build b/target/sh4/meson.build index 1327507dfc8..3861d9b194a 100644 --- a/target/sh4/meson.build +++ b/target/sh4/meson.build @@ -1,7 +1,6 @@ sh4_ss =3D ss.source_set() sh4_ss.add(files( 'cpu.c', - 'gdbstub.c', 'helper.c', 'op_helper.c', 'translate.c', @@ -9,8 +8,13 @@ sh4_ss.add(files( =20 sh4_common_system_ss =3D ss.source_set() sh4_common_system_ss.add(files( + 'gdbstub.c', 'monitor.c', )) =20 +sh4_user_ss =3D ss.source_set() +sh4_user_ss.add(files('gdbstub.c')) + target_arch +=3D {'sh4': sh4_ss} +target_user_arch +=3D {'sh4': sh4_user_ss} target_common_system_arch +=3D {'sh4': sh4_common_system_ss} --=20 2.52.0 From nobody Thu Apr 16 20:57:20 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=1772061726; cv=none; d=zohomail.com; s=zohoarc; b=jkKz0rP9z3SjmTbZNh0xppm029fNVAyLPRHZKJoqQb9Xemqa9POU5v8+hQh9ikm+/tYMLmop8QNw3sKbMDm1joohSxCKP6LUauz1bFnmcszIIMozTUIF7cWsYmjPofxW+Hv3j3V7WrPlM87afiffAVUHnVgb/Hm31O1cEmjjwug= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1772061726; h=Content-Type:Content-Transfer-Encoding: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:Cc; bh=3Tr/RjfOe6IjCItdEvRBAstz9dZRVJOfGHzOcEgiwtI=; b=YRhebn4FMTEXnqCf8VHgQLJkPRHsHNi87gr1ixubvRcYUxWRuiS78FrtC9r5eRXvXhI3YMklevJ+Meei3wGlW3AHEmYTuRtveaaPrfYrt5juE6oKo3BDXydp91hZS6Wto9pkSSyBWXzZ8MuWpzzAYrBodo2OJ7oWGq2CTg7l2pA= 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 1772061726606837.3605551018087; Wed, 25 Feb 2026 15:22:06 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1vvOAc-0007Rg-I6; Wed, 25 Feb 2026 18:19:54 -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 1vvOAa-0007Qg-JA for qemu-devel@nongnu.org; Wed, 25 Feb 2026 18:19:52 -0500 Received: from mail-wm1-x331.google.com ([2a00:1450:4864:20::331]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1vvOAZ-0003UQ-0O for qemu-devel@nongnu.org; Wed, 25 Feb 2026 18:19:52 -0500 Received: by mail-wm1-x331.google.com with SMTP id 5b1f17b1804b1-483a233819aso2862595e9.3 for ; Wed, 25 Feb 2026 15:19:50 -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-483bfb77437sm21740475e9.3.2026.02.25.15.19.48 for (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Wed, 25 Feb 2026 15:19:48 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1772061589; x=1772666389; 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=3Tr/RjfOe6IjCItdEvRBAstz9dZRVJOfGHzOcEgiwtI=; b=H/Gd1rNQOjIS87vVCxK6MjdHbEsagacOw+18IuTaxLyO4GnY6aIs61k743wMmOXJm2 23YEXkTZVrZnJp3PGMP+35mGxkzYK7gDEfRvC+BnWZxDCwn+LwrK3sesgJV4JtYiqpuT X4NrabKZekDcnWbFdQLEo8lW625cCcqKzvO8bEaHM80FP2NVCqOX6kZFLLdyVhPuptpy 6QLWfOHqEK3+f0ts379kFaJr8t7p8EZirQvXHcc77a1WXGngRLbH9sSMpkE11F/Hj60v 0OnfNU7kjI/SrsQtr47Zd/6pdLoUkmfbIkm+ylWexI67hQr4AXPQabIWWWsIdte+1Ft4 IS2A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1772061589; x=1772666389; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-gg:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to; bh=3Tr/RjfOe6IjCItdEvRBAstz9dZRVJOfGHzOcEgiwtI=; b=KCPAU1HesDAzxejJO/BLl2pzZS5+V18xGOrzs/YFTfgCmjAWLHC7ApZQuQrBb747TA 8E7yxolcotGruU/zBB/n4lFq2Uk3mTKY0Bn+CS3JPgCsDyNq9K4N9fDcLckeeyTdx5PO WA9uGvdpgGI9fkLH8+nfehC+TRYVWOibcR82hzIKxe9Q0mEFn/lNVCFy3dggfhzzXiM8 CPxYijmMAOpSAdfumcTLYoQObZEBhQoMVmHPnxJ9v2eAvnJuJtqkvBtCcjXWEzugeM52 UmuO6vD1pH1RtzC59A84WyIdfaiOjYADWAHkwq9N5Vlp6nq13Z06+1TbpjxZJDHmjqkx /riQ== X-Gm-Message-State: AOJu0Yyv5VzVZMJldIFOJarpC1f1PaII062KKS/djNAErcAiDnEWlGg/ OYiBQV+b6PDpTMgP7GARtD0lnCsebKwe4uYeY/167jcJWZC+UgM44ZwbE6DJitSvqV1uLTiX7Ov Ol9u22Bc= X-Gm-Gg: ATEYQzxA1YgGSjHQwn3TNz3P2QUBMPKWcwVTqHgVIuDSXLv15IdtzIYBRCW26EEC29U DoqzNp6e4gKPVY1V11GPyDsTBS75lpJQbhipHdREdLSp4X6vI1FrVrBkBiwARrLwN4M1emg5rqQ 40D1YvWoq28W+R2VphKjul/j5E1RAvKkBCAv1vQWUKy1wP16rN4GEWyZT/dInNkA0VoP+hNqQAZ //DyKJaT8IN6ciWU7IEgSb6cv6I9VWs2yC1jRUgSGH+MzV2N+3TEuz6GRIB84zKDrp6e1k8pf6i SYFpRlz1yr+hMHJcXyx5t5Y7CwxSnBdOfNTKub7LRxZlbIO1q+bZlrGo+mwqoruclcYW6Ax+ZaF 8W3YB3bs00OuuR37eiZZ0l/5gGhsxfwQhBHZIlnlWT3pA3CkBipg6IcXZ/RNNJXKMOZ1n2B8L+4 364Ro73YWxv3teTsXTi4ZicehIBEPh5C3gtk4YB5yo9vVBB9GorXavRioWBGWBVz8yeuJ7/70l X-Received: by 2002:a05:600c:468b:b0:483:c35d:367f with SMTP id 5b1f17b1804b1-483c3dd6fd2mr1468025e9.21.1772061588932; Wed, 25 Feb 2026 15:19:48 -0800 (PST) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PULL 49/70] target/or1k: Rename 'openrisc' -> 'or1k' in meson.build Date: Thu, 26 Feb 2026 00:13:49 +0100 Message-ID: <20260225231411.96482-50-philmd@linaro.org> X-Mailer: git-send-email 2.52.0 In-Reply-To: <20260225231411.96482-1-philmd@linaro.org> References: <20260225231411.96482-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::331; envelope-from=philmd@linaro.org; helo=mail-wm1-x331.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: 1772061727849158500 Follow commit 62822fc7e0f ("target/or1k: Rename from openrisc"). Reviewed-by: Pierrick Bouvier Signed-off-by: Philippe Mathieu-Daud=C3=A9 Message-ID: <20260219191955.83815-42-philmd@linaro.org> --- target/or1k/meson.build | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/target/or1k/meson.build b/target/or1k/meson.build index cad8c1b1ae0..cc912ee6cf9 100644 --- a/target/or1k/meson.build +++ b/target/or1k/meson.build @@ -1,8 +1,8 @@ gen =3D decodetree.process('insns.decode') =20 -openrisc_ss =3D ss.source_set() -openrisc_ss.add(gen) -openrisc_ss.add(files( +or1k_ss =3D ss.source_set() +or1k_ss.add(gen) +or1k_ss.add(files( 'cpu.c', 'disas.c', 'exception.c', @@ -14,12 +14,12 @@ openrisc_ss.add(files( 'translate.c', )) =20 -openrisc_system_ss =3D ss.source_set() -openrisc_system_ss.add(files( +or1k_common_system_ss =3D ss.source_set() +or1k_common_system_ss.add(files( 'interrupt.c', 'machine.c', 'mmu.c', )) =20 -target_arch +=3D {'or1k': openrisc_ss} -target_common_system_arch +=3D {'or1k': openrisc_system_ss} +target_arch +=3D {'or1k': or1k_ss} +target_common_system_arch +=3D {'or1k': or1k_common_system_ss} --=20 2.52.0 From nobody Thu Apr 16 20:57:20 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=1772061820; cv=none; d=zohomail.com; s=zohoarc; b=IHHPtF9US4OQEaeAEL6fXU90i/ATFgHg+ku/DSs4MABeZ4fuD1MI3HYI4ilhhTT1QivCnGp0uBcMatjN+jPCCKr+RmC2moBCTjZtx6+bS5LpJl0bK3FjQgNUobLDA7xYwFpIzuaQWw0aWsC28HhQ6LCZ6SgKkf0+YT4Nn9nJSfs= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1772061820; h=Content-Type:Content-Transfer-Encoding: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:Cc; bh=LQBmUOv64AWIlZs+bsj35UWAYLjENFL1DoqIkVynjBA=; b=GYJtA9UgGZJcHGjPedCvqvNmKdYYxrYdKhWmZ/qg+L/hohKBF6EctA3kMXR5aIAx8qpPP2zwBQowW/ORJAuOoJU27+jioYn6izaGXnDsibpNHZTrvpcQVBg2Qs+DubsWdbyWqPE/9MM8MFUDeQSrIyQxzOnb5twurnjSJox1v2I= 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 1772061820881638.2574160821424; Wed, 25 Feb 2026 15:23:40 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1vvOAi-0007Sw-VS; Wed, 25 Feb 2026 18:20:01 -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 1vvOAg-0007Sf-Mt for qemu-devel@nongnu.org; Wed, 25 Feb 2026 18:19:58 -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 1vvOAf-0003W9-83 for qemu-devel@nongnu.org; Wed, 25 Feb 2026 18:19:58 -0500 Received: by mail-wm1-x335.google.com with SMTP id 5b1f17b1804b1-4836d4c26d3so1687185e9.2 for ; Wed, 25 Feb 2026 15:19:56 -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-483c3b3474dsm5380985e9.1.2026.02.25.15.19.54 for (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Wed, 25 Feb 2026 15:19:54 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1772061595; x=1772666395; 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=LQBmUOv64AWIlZs+bsj35UWAYLjENFL1DoqIkVynjBA=; b=JWGZsjzfeNws9Mr5fonpsPj34OyysKUr/Z6FaCwebrWHbLWM3pkLyRHnJnns/4XXPb it2UTZAD9DPBco/jOq25Va81a+XVT0AK0maeDiuxkxq03E5PskEqBzhVhrp9XOcAYKmz GHOKDoxn2ZJz3bZN8pVG5GIGTjSERlgA1U84wG6jXmt3rBiVJ6uxlIikFvxa2d5OGoYf QKjHfLfvKKmQweYjAditycNPg8BhisHZP7Qqo1W4MCZrvA1GV8Ds//jSDfRJisX5z15T Ruegfzn+bynT6N+tKbaWWlDEiiTZsmoY3d23nq8mr/Gsm6QfPnADsMfAHHdZ70xol0FP RPmA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1772061595; x=1772666395; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-gg:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to; bh=LQBmUOv64AWIlZs+bsj35UWAYLjENFL1DoqIkVynjBA=; b=m7J6tzY1x3/dj/aLVws4EpqTdye2hdBekX1q4yyz89ccfYpvg89Sm34ua2IDtdU4y+ p3/FkT9+BEr9Qq91YuYR/qU++1g+HzvqliZt/3ODTpm8hic8AgsNwEeJYO+IDNTQmQWn BLMeRw8Tf3FbQDXObS608nebZ9ldlViI2fOKWCryymBKWYm37RWYML0ZEVeTbaY5mnBC o2WuRi6f4yInPLey0tnTZJ8V9oeKt3RDxe9FQkvUHC48oGMG/GUPCmsoo6FHASTL5Weh anZhNXM6cPFTI9oWtY50HWAdl3TboKrNdHZmWmnXUDVYaZK+0T7ppYmFi/u/BDJYDDOn KPRg== X-Gm-Message-State: AOJu0Yy/SUeiblykVxerTH6fGnwWLX7yAHPdhl/HOwwR6Dh8HTqLqvCQ y57xWPgYDXhd77DqgBgVr9gUpkHdqsBgYU6AUHD20XRNy2YdTFBy4k9kMl3qTbRJjTzYNssg8Tx xvJMSSOE= X-Gm-Gg: ATEYQzzCzgfzJJnvTiyDiX/EYJrYkqFAi09lMgfL43fjkYSpb4yJj35mJm1sDuS0prn QJBLl0ZCJfPsL4Ebkxzm7vKsEyRYuRydtGJt9thahYeWmagNbfisbTrN2a0X5f9ZtlOXb4kVuOa gOsKy2Yc8YXWCxJsGFL5QEArVgsVeXjUw1Nqx6hEypoQgLANel9YSOM2dXb0+d1nDwOEyp3UkWp YUh2W7iIpQK7ru8GNsolOtfFhJ1Kkj+rl7wt387DpqMPyGl3HSCI0OOxmKG1Ur/unbE71+CJKXP L9w+3ibdvUq+W2lgiL9bWmrHzdj2OOo1knZmnGuyYhvw+Oca2xoldAm0qpHm3CCcxARCptlMJuJ 3bvUl42rQveJ6vHVXS55toOxQerCpq0KWawdZFGwDwSH47ZMqC/KjM3igKMsR504OTjeJza2PMc 3T1MJA3ZQcWCCS2uo+FQA7YC8lrtmRhEA/bPK1UHXcs5qryDK7+vf4Q74G8Y4V02PwZo0AqQUs X-Received: by 2002:a05:600c:8b02:b0:47d:5e02:14e5 with SMTP id 5b1f17b1804b1-483a95a86eamr309985995e9.5.1772061595421; Wed, 25 Feb 2026 15:19:55 -0800 (PST) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PULL 50/70] target/or1k: Build 'gdbstub.c' once for system single binary Date: Thu, 26 Feb 2026 00:13:50 +0100 Message-ID: <20260225231411.96482-51-philmd@linaro.org> X-Mailer: git-send-email 2.52.0 In-Reply-To: <20260225231411.96482-1-philmd@linaro.org> References: <20260225231411.96482-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: 1772061822151158500 There is a single qemu-system-or1k binary, but by moving 'gdbstub.c' in the target_common_system_arch[] source set the resulting object can be linked into a single qemu-sytem binary. Reviewed-by: Pierrick Bouvier Signed-off-by: Philippe Mathieu-Daud=C3=A9 Message-ID: <20260219191955.83815-43-philmd@linaro.org> --- target/or1k/meson.build | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/target/or1k/meson.build b/target/or1k/meson.build index cc912ee6cf9..7cea45287a2 100644 --- a/target/or1k/meson.build +++ b/target/or1k/meson.build @@ -8,18 +8,25 @@ or1k_ss.add(files( 'exception.c', 'exception_helper.c', 'fpu_helper.c', - 'gdbstub.c', 'interrupt_helper.c', 'sys_helper.c', 'translate.c', )) =20 +or1k_user_ss =3D ss.source_set() +or1k_user_ss.add(files('gdbstub.c')) + or1k_common_system_ss =3D ss.source_set() -or1k_common_system_ss.add(files( +or1k_common_system_ss.add(files('gdbstub.c')) + +or1k_system_ss =3D ss.source_set() +or1k_system_ss.add(files( 'interrupt.c', 'machine.c', 'mmu.c', )) =20 target_arch +=3D {'or1k': or1k_ss} +target_user_arch +=3D {'or1k': or1k_user_ss} +target_system_arch +=3D {'or1k': or1k_system_ss} target_common_system_arch +=3D {'or1k': or1k_common_system_ss} --=20 2.52.0 From nobody Thu Apr 16 20:57:20 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=1772061835; cv=none; d=zohomail.com; s=zohoarc; b=mHU9BD9RDD7j/zQSf34n6DJEOsT9OEEUUUQeWySBLeSdQkBDI7TQ8fVjDES5etEM3JBvZ4OsQ2XmO9++Jzii2eZ57xlxXA2txfFAp7+DTsWZNj6KyS1hg9dkhtnqBtFm2ibiiMsGEfUVg5NT7vl5C0cI+yIFMQSYda+8MyHfHNY= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1772061835; h=Content-Type:Content-Transfer-Encoding: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:Cc; bh=QVDyuzhc97t1LUNB97ThaQf4XWW/8DfX7b92ae1+c40=; b=Eg6/DJduxPmba35aRe1O/6cXDYYB+Iz1BcEWHqV9Www1dphpL0xONtB6KZGCK+jYekD5hanYyc8yC8ur+yIzRz96Eh4PH5HHiUkx/QNu//zkLU51Ff7ji11waOiuLuJZuG1skeHFuZEUBIK+887HZ00D6oaE+bNEIS7/WvtYeUs= 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 1772061835189495.18387291776; Wed, 25 Feb 2026 15:23:55 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1vvOAv-0007aj-Hu; Wed, 25 Feb 2026 18:20:13 -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 1vvOAn-0007Xt-G6 for qemu-devel@nongnu.org; Wed, 25 Feb 2026 18:20:07 -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 1vvOAl-0003iF-NT for qemu-devel@nongnu.org; Wed, 25 Feb 2026 18:20:05 -0500 Received: by mail-wm1-x336.google.com with SMTP id 5b1f17b1804b1-4836f363d0dso2342695e9.3 for ; Wed, 25 Feb 2026 15:20:03 -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-483bd7030b9sm83195515e9.4.2026.02.25.15.20.01 for (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Wed, 25 Feb 2026 15:20:01 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1772061602; x=1772666402; 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=QVDyuzhc97t1LUNB97ThaQf4XWW/8DfX7b92ae1+c40=; b=YTIg7oYCQTUYamFZ4cyd5NChjDzyty3coT7cghfT4SKZ5Q4OeqRw9PqS6NkToYer+T +Qb3x5GeqBaeap7I41LLot9uVQld/jAt07F08Gf4acA84CQXdlHPv/Pv2pIYMy97ga9+ +gOGhOXOESHO5idUbyU1KDQO/2XoRsq2gJqYSpc3a/suTvhHTSGd70S64HxbXNRG9ee8 Uopgrfz2t2D2mTFMJvBqY2EZcxBYYE4fUGgBPQTG8OMcPiN7oEs8vV/UcA4sF/p5BjLJ usWe9cOWsVVkXWH+8ejF9C9077JeTbXFUMRHCqRsrujZmX6O5Bdd8/ZVRoEVgX9xwJnx AJfw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1772061602; x=1772666402; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-gg:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to; bh=QVDyuzhc97t1LUNB97ThaQf4XWW/8DfX7b92ae1+c40=; b=hcA+V54rSLTSzUGo2YXzmBBuouZUoYbWtac78312xgDI7XzDx5qjHsVbjEB3t8oOMP PSxiBVuDIj9FGTQOBKMV/RyMB4Cmy3rwur3Px79JzhBM6iZZldqCrbmvLxRkXzK2IGxk tE3xQLKgDwkvUu+wCrZm3Qg45v9p4sOvfZRC8cQZPhsOB/ZDMgJ60SqpwUww6+7rR5Qv 0Xpdd4DFVfpqc9EBY/nGLkYNXupfQkHrJWLwJ0Bnm9Ln/acHajKUUwUz8B7J+91+GVUn YMaoghH6z7KEHYiJ4q37cEz8mw64OofTG9YFHohhiPxX2WSBHs5wzDHIKIliToEJE67D bBkA== X-Gm-Message-State: AOJu0YyO7rbgDpk5EyQ13GQ7vS5FDI6NdnZLJAnhkSmTAw5a33wEzyEt NfH8oIQF25Y9GUu6XZyCrSGhZmQ7TxDxBi9oA/uuyYQb4m2/BSZCAPO4pk2PpmI8VsaST/BrHwa fKapOEgQ= X-Gm-Gg: ATEYQzwPmA3tofip6AMy90S6aQ/yKUIHrxGz1iwdALRJ3p0XVC27R+qbXqxHLiGHMTQ qEV4hWVU4n7ozx6vPb3Xzw5/IsXRjorZW51hHINspetynq9W3z7LKFXrsCUlttgQuXG4w8Dx5js QifjmPfVNInM9IROvU/oIFVRMrcReHBha/tg6dEjQBEkc8WxfU38JRhvkO6ZIe/KR1bKJiZ40rv v5pBnQasf3v1SGrQPMnQmUaj7CyEK7muOxZLwKDWPBxLTSkG1uWBaQ+1dJ1XgwyHZ+QBZPoBJi0 D3fMD3EH/4uhEgcajJLQcQ82STRGUY6O1QfX0hMZjgDVFVNQBc5WDnPXBGQOFhzowUoIJqnIqlK tbG4ZGYiAzsyTR3tGg5WL2CocWf8R2wiTQtuCCqpmbI0XgtBHQsTIhdBUes869quVJzXsaI5J6b UT7NaTVziRODtPxcbvX0z5yagZErYKqss1+gI/Mku+2sTaJXgp3aNxkCn1yhEUk/feTYVyc1xq X-Received: by 2002:a05:600c:1f06:b0:480:4d38:7abc with SMTP id 5b1f17b1804b1-483c21764e8mr31451095e9.11.1772061601857; Wed, 25 Feb 2026 15:20:01 -0800 (PST) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PULL 51/70] target/alpha: Build 'gdbstub.c' once for system single binary Date: Thu, 26 Feb 2026 00:13:51 +0100 Message-ID: <20260225231411.96482-52-philmd@linaro.org> X-Mailer: git-send-email 2.52.0 In-Reply-To: <20260225231411.96482-1-philmd@linaro.org> References: <20260225231411.96482-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=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: 1772061836341158500 There is a single qemu-system-alpha binary, but by moving 'gdbstub.c' in the target_common_system_arch[] source set the resulting object can be linked into a single qemu-sytem binary. Reviewed-by: Pierrick Bouvier Signed-off-by: Philippe Mathieu-Daud=C3=A9 Message-ID: <20260219191955.83815-44-philmd@linaro.org> --- target/alpha/meson.build | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/target/alpha/meson.build b/target/alpha/meson.build index 9447f8020be..818256a1c31 100644 --- a/target/alpha/meson.build +++ b/target/alpha/meson.build @@ -2,7 +2,6 @@ alpha_ss =3D ss.source_set() alpha_ss.add(files( 'cpu.c', 'fpu_helper.c', - 'gdbstub.c', 'helper.c', 'clk_helper.c', 'int_helper.c', @@ -11,11 +10,18 @@ alpha_ss.add(files( 'vax_helper.c', )) =20 -alpha_system_ss =3D ss.source_set() -alpha_system_ss.add(files( +alpha_user_ss =3D ss.source_set() +alpha_user_ss.add(files( + 'gdbstub.c', +)) + +alpha_common_system_ss =3D ss.source_set() +alpha_common_system_ss.add(files( + 'gdbstub.c', 'machine.c', 'sys_helper.c', )) =20 target_arch +=3D {'alpha': alpha_ss} -target_common_system_arch +=3D {'alpha': alpha_system_ss} +target_user_arch +=3D {'alpha': alpha_user_ss} +target_common_system_arch +=3D {'alpha': alpha_common_system_ss} --=20 2.52.0 From nobody Thu Apr 16 20:57:20 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=1772061930; cv=none; d=zohomail.com; s=zohoarc; b=bjMhQbP7PRoIb1T8He06DN0p//w5hMWoM7RsOtaC7hcAaflhGVBVDrNbhOe/9Vky8KQeYgf0Rjgi4EQJwRG+8gty6d97yxgooGO9t86AJ/j1wGJk3jIl7KFfrxJXccB3gspVVcQcVT78V5D2FIB4mPMNgmqQERHC/6USOjJbwXg= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1772061930; h=Content-Type:Content-Transfer-Encoding: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:Cc; bh=PKDinyTcS05CToVvGZStWK1BmUi/DlgLbbY3qxMJPtM=; b=JeBDrimu69/lSSe7nz91uMo8l+yFbZKvMrQmkIgm/dLbdz9c3dU+EAW2KLShJ64EIy9T18h92eiO4YFexofrAXucBLxqgWt71ytlwDL1CPap16HPvF6y73FsPhbJ7vJ1fMQggeikF9pMHOAcTxZc6XhJufxYLgIm0yp8w02gvbA= 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 1772061930561767.4755714125624; Wed, 25 Feb 2026 15:25:30 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1vvOB3-0007cr-1C; Wed, 25 Feb 2026 18:20:21 -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 1vvOAv-0007bA-N1 for qemu-devel@nongnu.org; Wed, 25 Feb 2026 18:20:15 -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 1vvOAs-0003yo-Ac for qemu-devel@nongnu.org; Wed, 25 Feb 2026 18:20:12 -0500 Received: by mail-wm1-x335.google.com with SMTP id 5b1f17b1804b1-483bd7354efso3547265e9.2 for ; Wed, 25 Feb 2026 15:20:09 -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-483bfb77abdsm21449905e9.2.2026.02.25.15.20.07 for (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Wed, 25 Feb 2026 15:20:07 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1772061608; x=1772666408; 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=PKDinyTcS05CToVvGZStWK1BmUi/DlgLbbY3qxMJPtM=; b=qzka5pbG8p29Nn1YPFFbjqerAWKu02n4F2n5pLD6zl3D5FWOsdkVSdBc1f00//wfTC 3t89gYUdZqRBJwO4t4EmXptFi8xp6dY+QEQrYSbhNt9GR7BBk13AloqntApDRl3MW0vv jteRKvekTRwAz5TfT0uyOHl3+ceT/4b/Nc0mT5s5Z6dOdLwGyhXAUNKBvWSiYG/B93q+ XyU/XD/+CZygvixaaZD0G1VxMR7lk0domcB78qgyxgBm7mLw+XYiBtPNbx3QGxHlYA5Q sRjjte0EP8CnR9deu9Kd2QLNObVKuWHkYIRoIqcoKj6gZUNG2P9ut12IKqrj/3aGROpx sc7w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1772061608; x=1772666408; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-gg:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to; bh=PKDinyTcS05CToVvGZStWK1BmUi/DlgLbbY3qxMJPtM=; b=B8SS7HVt+unwu9+UMbZ1riVK4IXnOpdLQn49ILnDd4S2XUq7hiNBG/T5FFOzhlN81U 6YdDORRTXmrWsJq2bo11St1dz3zhUie6IJQcAj5cMqGALJ38NFU9WhhIJErQovO42tyT 8YMEER+VPs1nLuhNEgtAwmdrpC5TU4DaseNzKZqL3Z6yNQUfC45FuH1R1DBlQIC4SwJd FM0mUWctMRT7QtPOgchD0nuZlcXVmKgwoehjgrOzYBBdkGoH0utlYEal7ZwwIqZLPP5F PO/IPN1zij+aXl74RlNwCWUJi93Bfu2VkU2J+jql7Yovba9opXpfZLWqJsaXLw7+zdwf 0iCA== X-Gm-Message-State: AOJu0YzVdNI5XTDs0sOb5CZ8y8EfwCWEH0fFtphSdNYyAUDQ7TmyFMtP XMoqaqFCBhvFUGPXYkCrYkP2P1byrcKCZbioixAM7wz56GLR0itlBmoo8oqioUpvC5HNHLjDDjM 6/K8yiGY= X-Gm-Gg: ATEYQzxq7Flj9/rqFiCCx5aQ87vtiwkk/XC+EJG3yaVIHM//DR2XSh+uYbE7l367be4 yxekaVdJNGC8dFSWFz8eYjSk7045hioGph2lCa3lstDBYTQF+rlURwAiVo8c8K5mvKTvVd5J/Gq zu4oV6DZHj1NVRpFt4MwYd4vyiFABl0/3UzGjZ04xZ8p6Fw2LD6OcxzVAheuW0Kg3PcpKNV7lpI tlr1uGaRCVCWoa0TH+g0bKttn9V2OlcezZOkHKsWxyKhq+FJMUAuUgghUPxQ9bBWIGdypNSnyQJ xSH34MrScrie4PLrHpX3ezcScHKDKJ72eYvt/DU9rSR6UwxA3Yzg6PTVr7pvqLBZxXB/2l4vwpa /kAkdtqove5wKAy2gOyIJNk/xlNuH7VgcTQf3KMs1utbojo8dbU6D4mGB8qoHH0VBaxk6zQbnhv Q3Z/o95pnvei9SEpdm8rpujq35p8S1JcTwIZqdB4A5/cHSKZiPnKfRFK0EgBrccanDEx0hAW8R X-Received: by 2002:a05:600c:1f85:b0:477:a219:cdb7 with SMTP id 5b1f17b1804b1-483c2124d88mr44339585e9.0.1772061608448; Wed, 25 Feb 2026 15:20:08 -0800 (PST) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PULL 52/70] target/avr: Build 'gdbstub.c' once for system single binary Date: Thu, 26 Feb 2026 00:13:52 +0100 Message-ID: <20260225231411.96482-53-philmd@linaro.org> X-Mailer: git-send-email 2.52.0 In-Reply-To: <20260225231411.96482-1-philmd@linaro.org> References: <20260225231411.96482-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: 1772061932562158500 There is a single qemu-system-avr binary, but by moving 'gdbstub.c' in the target_common_system_arch[] source set the resulting object can be linked into a single qemu-sytem binary. Reviewed-by: Pierrick Bouvier Signed-off-by: Philippe Mathieu-Daud=C3=A9 Message-ID: <20260219191955.83815-45-philmd@linaro.org> --- target/avr/meson.build | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/target/avr/meson.build b/target/avr/meson.build index 3e172bde1ce..af5e7d63741 100644 --- a/target/avr/meson.build +++ b/target/avr/meson.build @@ -11,10 +11,13 @@ avr_ss.add(files( 'translate.c', 'helper.c', 'cpu.c', - 'gdbstub.c', 'disas.c')) =20 +avr_common_system_ss =3D ss.source_set() +avr_common_system_ss.add(files('gdbstub.c')) + avr_system_ss.add(files('machine.c')) =20 target_arch +=3D {'avr': avr_ss} target_system_arch +=3D {'avr': avr_system_ss} +target_common_system_arch +=3D {'avr': avr_common_system_ss} --=20 2.52.0 From nobody Thu Apr 16 20:57:20 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=1772061779; cv=none; d=zohomail.com; s=zohoarc; b=QbH0nISFZ0BIYa7oQ0j3EGklTMuS4U5GB3MrCyiO2gyY3BDmLTH8fCtpPBCvHdMAKXQ4B6QFry1g5BW5p73Uz/VpWEBm285Cakql+jL86bTfj3rRVK5f2Rn4hy8IaNSDt8Ft3xJ7mZZICnYiVAWVPQWwXVt6t/yYBmq7snynzMQ= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1772061779; h=Content-Type:Content-Transfer-Encoding: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:Cc; bh=zycF9EWrfcu+cbAB2g8zGMKO0uTO4sCVZYCcJJrhwNo=; b=HtRZuKQDF25l34U1DqM5U9LneaQ97kA1lfEnhJ87pieTtsz+PeJBh6M5fEzM/vQIEUyIKw56OFlAPZVL0NXE2y/w9sSK8HNaId06ME62BfTH7713PGTCBUBeCP1cHf2A468u/s7CEWzjScyPfKqetbEzJ0Xj4UxUHnk6lyEpaGo= 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 1772061779500545.8714300021859; Wed, 25 Feb 2026 15:22:59 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1vvOBB-0007fD-6E; Wed, 25 Feb 2026 18:20:29 -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 1vvOB3-0007dA-K6 for qemu-devel@nongnu.org; Wed, 25 Feb 2026 18:20:23 -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 1vvOAy-000471-Tl for qemu-devel@nongnu.org; Wed, 25 Feb 2026 18:20:21 -0500 Received: by mail-wr1-x42d.google.com with SMTP id ffacd0b85a97d-4398f8e2837so214661f8f.1 for ; Wed, 25 Feb 2026 15:20:16 -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-4399037aecesm7334605f8f.15.2026.02.25.15.20.14 for (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Wed, 25 Feb 2026 15:20:14 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1772061615; x=1772666415; 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=zycF9EWrfcu+cbAB2g8zGMKO0uTO4sCVZYCcJJrhwNo=; b=T8KVSzOWgmf/KmQAlcaUl7D1Fna3IZPc0LmmjxQRE0HL8K5Qj8UbhZCKOSnkKIi1ju fdktDteaOsrxRhc/M10HEQhmFfaeh6QDx7Vd5GgMiOQmUsVoeoKdQ6yEHFRt8t7A0TmP agUHg7Bebm5+xi5nczCvQf7HQb/Tab6/q4So/w7maFLjukyPtGrVlCnJuYrYjiEj9B4Z RyATm0L6E/TuFX3IH8OE4WBLxGRj72PjaQ09if2HwPZ+uMYp2eCH/RI9NeUSmgYmJgz5 zsnzCEpfLEIJiURUF1gpGFnsjJWgQElIej5x+b6evL1wpskvfj/iJ46rYioYBsi5NpWp pdqQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1772061615; x=1772666415; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-gg:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to; bh=zycF9EWrfcu+cbAB2g8zGMKO0uTO4sCVZYCcJJrhwNo=; b=tP5CYVP8rnv2DIzGnKsL5PVTqPJgb7fOBPocNfzZzAx2GxAntPb4UDnCzaLXU9wJ9T QGUw/iPzYuHJUze02mz22e2Je0xHf/AyrboGfD8STY7LXYyInl4Lq5HEXbgY4C/wO2yU vqogw39aGv1vqDY+n8sB0eemi2+ANU2O+PwD81PW1oQ1Fanw/VxCQeZxuiwfQn+OHqnk oJZtRSQCrM9ONyoS8/QkBuYCq/TRHUejYtI5GMN1Xx6T8pHZ1hLVYvqGxS6vFyRx1T4o 2mUO6844/PbCmQaLRpeJdrxIaANmRH3Qk4DCIQO+oGiRWtPK8XYrGBJSqOGEL/QVWV6j jW6w== X-Gm-Message-State: AOJu0Yw4e0e1oqYuGm1EZskVb0NzencRP02u8T1IP3g1CF5zvO+OlSXf h2lyeSiPXHXOOgFYhhE9l1v7IN6OJ72yqurczKilBq4Z4lDOT2dhgx7nz76rVVg05xcYLZA58QN 59GU2nY4= X-Gm-Gg: ATEYQzw7G82X7A14jBjsqzHg+/ltxUUUpZ1wuZ/Pnf6Nvn2Ze3/6wowM+oO0uqgy8db 7wjAy9xSMFM4HoflFFSg9mZ7cerfaXNWDBH+pQy1WCfev2CuQ2ZsfRjdCLFlvCPY3byzo/Y7ZUJ g/fm9H5yTrWCSE+wcS1pMnL7Nd/iwbEYcLeUZXEd9muwlZ4RHUo06fMXYzNqMKlGcbm6Otjr+y5 u7IDpzBCuOtztVYsBy1ecuvBXZAMDv2TIVUWTgfc9OjCJNkaSpjEgo4R3hm45XMRVOuoFeBHD0l BXLJ1LG+sYyy6TQk3z0JUXYZQoLpzCYrdz+ZtapLTg8eA7a36jTTiZPb1XMvXP+yrzbY/xxb2oD 8OntmuBftvdweecuDLERs6nVfutSghGt2msly4S+1aFUomQ/lHNYB5L/UxQOu1IXYamKLMj0pPU X22i3B840tFY+Rqq21Ws7lLie6UIOE90xfu2QLqQfyO3nWl5J+rAImq7nyL57yqMoKL/iGKv+D X-Received: by 2002:a05:6000:601:b0:432:5d73:79a1 with SMTP id ffacd0b85a97d-4396f188996mr34539045f8f.55.1772061614979; Wed, 25 Feb 2026 15:20:14 -0800 (PST) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PULL 53/70] target/loongarch: Build 'gdbstub.c' once for system single binary Date: Thu, 26 Feb 2026 00:13:53 +0100 Message-ID: <20260225231411.96482-54-philmd@linaro.org> X-Mailer: git-send-email 2.52.0 In-Reply-To: <20260225231411.96482-1-philmd@linaro.org> References: <20260225231411.96482-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=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: 1772061779981158500 There is a single qemu-system-loongarch64 binary, but by moving 'gdbstub.c' in the target_common_system_arch[] source set the resulting object can be linked into a single qemu-sytem binary. Reviewed-by: Pierrick Bouvier Signed-off-by: Philippe Mathieu-Daud=C3=A9 Message-ID: <20260219191955.83815-46-philmd@linaro.org> --- target/loongarch/meson.build | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/target/loongarch/meson.build b/target/loongarch/meson.build index 20bd3e2f0a3..2ae96d68695 100644 --- a/target/loongarch/meson.build +++ b/target/loongarch/meson.build @@ -3,9 +3,14 @@ gen =3D decodetree.process('insns.decode') loongarch_ss =3D ss.source_set() loongarch_ss.add(files( 'cpu.c', - 'gdbstub.c', )) =20 +loongarch_user_ss =3D ss.source_set() +loongarch_user_ss.add(files('gdbstub.c')) + +loongarch_common_system_ss =3D ss.source_set() +loongarch_common_system_ss.add(files('gdbstub.c')) + loongarch_system_ss =3D ss.source_set() loongarch_system_ss.add(files( 'arch_dump.c', @@ -20,5 +25,7 @@ common_ss.add(when: 'CONFIG_LOONGARCH_DIS', if_true: [fil= es('disas.c'), gen]) subdir('tcg') =20 target_arch +=3D {'loongarch': loongarch_ss} +target_user_arch +=3D {'loongarch': loongarch_user_ss} target_system_arch +=3D {'loongarch': loongarch_system_ss} +target_common_system_arch +=3D {'loongarch': loongarch_common_system_ss} subdir('kvm') --=20 2.52.0 From nobody Thu Apr 16 20:57:20 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=1772061755; cv=none; d=zohomail.com; s=zohoarc; b=hMELi54sb1kymjKdzl2ja8NS1wOmo2TCEi8zLB98PXtU804jlRAM5dghH9p5BwoKCm49aAp6tiXBVFzBJNn3Sg0jPctLWOVc8qmpXHhjeX26ajL49bmkoy7kJM2NVMVKIAqo8/Hd8okqOHKF+Gd82+9qiYWZ6iVRQxhdXjNLZ3s= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1772061755; h=Content-Type:Content-Transfer-Encoding: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:Cc; bh=qaAvp9O61RMQK1Z/bnAQSwlz2Q5ZRUD5Jl/BPlPtMsg=; b=niSgOHZ1RBLmOb4lSi8Vm88f69uL7ZtVPaKjkMV4yPCWFFVQTreKxBzGT3oLRyMH8paNDMHi8f3bPPXydX7596XwMLGS4wdemoI1d5S5s7JgWrq6KNaCGG0chfNCe4lS3DlFHMCcK+VIPY6Nw558bUEaq+aTWliOr+GiZRKwoFg= 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 177206175512842.994078775606226; Wed, 25 Feb 2026 15:22:35 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1vvOBE-0007g4-GF; Wed, 25 Feb 2026 18:20: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 1vvOB8-0007f2-PX for qemu-devel@nongnu.org; Wed, 25 Feb 2026 18:20:26 -0500 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 1vvOB6-0004AC-63 for qemu-devel@nongnu.org; Wed, 25 Feb 2026 18:20:26 -0500 Received: by mail-wm1-x334.google.com with SMTP id 5b1f17b1804b1-483a233819aso2865685e9.3 for ; Wed, 25 Feb 2026 15:20:23 -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-483bfcbf5fbsm20478205e9.18.2026.02.25.15.20.20 for (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Wed, 25 Feb 2026 15:20:21 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1772061622; x=1772666422; 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=qaAvp9O61RMQK1Z/bnAQSwlz2Q5ZRUD5Jl/BPlPtMsg=; b=Ib2s+XRxWNGOwURoydZxe5Kqgmj6OVn9EmaelnHzo8BZeb30L0Pzgz2PEalYIfE0hH kU/STMlzC1L7MfJnINBSIv9TXXfHksTokZ6QIq/Rkn29W3vEyXFj/Yb9pIPOE3rjgZe6 cisAL00PSsGt8HZ8nxdPKK3niWPvUasJFz3ocTPVe3c+ba0v3UiSx3qXZN9SiE9zRJTi sQ1CkZQz54/1nPs5Or/vmt0YWb2HA7hYq6DvKf9Re8BD8dul7GHO0dX0/wXRrjBPNR4C vU1aoGKy1P3av9yr9KoSmkuhtkU6ydwnk3EMZay5mujYyUID61aSTMerr/YY9oeaWVYp OpnQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1772061622; x=1772666422; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-gg:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to; bh=qaAvp9O61RMQK1Z/bnAQSwlz2Q5ZRUD5Jl/BPlPtMsg=; b=kgAav1Mmac1NxJHfUBxBueH/IVl4mJ+yZLNUNQWqLYpVPZywOSDMXWaXwmpHE1bmyc 946UsnbRSfIw2pizcdhLu31L2lShWpS7dqILz38vTo3LpwwMS65G26uAVgCuW5ZvTH1L iGCfPryfDWycPpITm7NGhwgojxAHMxP4/CU0HGFnYQecdX/wZesvRBGTPYM8wlzgh8vh ZLHyDwSgZw9es/yMisivxgLV3awQxlfwywUGB2CkLKqjtRgLwkUfOZIjU3om6WxbIUHi c9mvy5nym6AlErUDeLThaYrSBgt/fR/Xrhuif4a6iK6myYAbKcrmwrMjbvTFPl2sJf8e krfQ== X-Gm-Message-State: AOJu0Yw7VNOljefK0/Ezo1iBrl9bnaVrHmaKXAipCopOMxmVbN/pXBUG 8k4lieePgHEDQGu0BdotWyWL9LkX2inJBIKIJnkdYcUCMRJIK9EhoqZBYbbdA+Pe+SWlqwptprk pM6spPVc= X-Gm-Gg: ATEYQzxHbJNf4fJQY9diZnsI0jfcxYDKlyvFRCjHiEzphY0pDVHlEZuzjcJ0KNVjj6k JKdOcPYboysHqjoIIV992hBfdRKOBHHfIxQsRrIHj1a5lOpQ3O7Qm1M3L8tvMNwlEDiMC2gVXDZ wYGZhyW6tWyTVptMybbG8wik1tkeg/TVw515AljaDvwQqK6s/oosxEPwoaVzGaAxOj4E7k7lEnt frGKBJZSTjMTihX6+vcfmaVBnzS968uixAmNmcz6Jtuc2bFn1+YiU+bfUyHSyIDiXvlekQbteNV p0I56+a3MBADA6yZLzH6yer/TN8B78omlQN4sJDWljW8TLn6szheFahZ7COyKEN0GBrLPzLzkhY irMv8wThZv1ChKDLeuRZcH3dFgUgLS1bnv15LrWl8IcOcgb1cuszj+5ZYxnPKpCSBW71umgxWYm RAPQs1nyeUWujOYu+06pmMVDVN70SBGfAaxIhgUnh8b3ziYJ2nuB7H9mQGCmiQKjl0kKt4U/DP1 82a/2M4pTg= X-Received: by 2002:a05:600c:1396:b0:483:a8e9:201b with SMTP id 5b1f17b1804b1-483c3c5a655mr2338695e9.0.1772061621625; Wed, 25 Feb 2026 15:20:21 -0800 (PST) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PULL 54/70] target/m68k: Build 'gdbstub.c' once for system single binary Date: Thu, 26 Feb 2026 00:13:54 +0100 Message-ID: <20260225231411.96482-55-philmd@linaro.org> X-Mailer: git-send-email 2.52.0 In-Reply-To: <20260225231411.96482-1-philmd@linaro.org> References: <20260225231411.96482-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::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: 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: 1772061755949158500 There is a single qemu-system-m68k binary, but by moving 'gdbstub.c' in the target_common_system_arch[] source set the resulting object can be linked into a single qemu-sytem binary. Reviewed-by: Pierrick Bouvier Signed-off-by: Philippe Mathieu-Daud=C3=A9 Message-ID: <20260219191955.83815-47-philmd@linaro.org> --- target/m68k/meson.build | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/target/m68k/meson.build b/target/m68k/meson.build index 4d213daaf67..c36d817134b 100644 --- a/target/m68k/meson.build +++ b/target/m68k/meson.build @@ -2,13 +2,18 @@ m68k_ss =3D ss.source_set() m68k_ss.add(files( 'cpu.c', 'fpu_helper.c', - 'gdbstub.c', 'helper.c', 'op_helper.c', 'softfloat.c', 'translate.c', )) =20 +m68k_user_ss =3D ss.source_set() +m68k_user_ss.add(files('gdbstub.c')) + +m68k_common_system_ss =3D ss.source_set() +m68k_common_system_ss.add(files('gdbstub.c')) + m68k_system_ss =3D ss.source_set() m68k_system_ss.add(files( 'monitor.c' @@ -19,4 +24,6 @@ m68k_system_ss.add(when: ['CONFIG_SEMIHOSTING'], ) =20 target_arch +=3D {'m68k': m68k_ss} +target_user_arch +=3D {'m68k': m68k_user_ss} target_system_arch +=3D {'m68k': m68k_system_ss} +target_common_system_arch +=3D {'m68k': m68k_common_system_ss} --=20 2.52.0 From nobody Thu Apr 16 20:57:20 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=1772061896; cv=none; d=zohomail.com; s=zohoarc; b=ZQa1FN/2skhXNU0hEu2nAQGqn/TtHpkRdjKTCVeWifYZeUrS4mm85QLQza5MoGARPJpudX9uoigYKRYyQwGBqX3+0elw5T+vsOmcW67OR0WDnbrYD9QFYNE0ZoZu/UjDtb84qm2bK1SZnX4S5DMYw3x+Flhqsexk2M91LFXB6S8= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1772061896; h=Content-Type:Content-Transfer-Encoding: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:Cc; bh=wObpQvjJPZ+6lXm//YEoiVHwjB+uhySEVUFPC6AyumA=; b=NBo9IXy0sLFHKFH+3bbvFqa+AAUZQxvGCC+C8O8R0x1XiyYWPnr29uuUmqr4Vyclj+B4lpQU2wcrFhl6eDKsvMwy/GCg3WWa+pgJA4lKsmPJbP9mgPjbVeCVNhjgzDMa2xo1B0XmLuyHfpUgVgwwNFaLddFWLe3J7/dv2Uc1XKs= 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 1772061896055603.4006578047185; Wed, 25 Feb 2026 15:24:56 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1vvOBJ-0007hZ-Bi; Wed, 25 Feb 2026 18:20:37 -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 1vvOBG-0007gd-Db for qemu-devel@nongnu.org; Wed, 25 Feb 2026 18:20:35 -0500 Received: from mail-wr1-x434.google.com ([2a00:1450:4864:20::434]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1vvOBE-0004Aj-HD for qemu-devel@nongnu.org; Wed, 25 Feb 2026 18:20:34 -0500 Received: by mail-wr1-x434.google.com with SMTP id ffacd0b85a97d-43988056dc3so218698f8f.3 for ; Wed, 25 Feb 2026 15:20:30 -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-4398a292babsm13320021f8f.37.2026.02.25.15.20.27 for (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Wed, 25 Feb 2026 15:20:27 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1772061629; x=1772666429; 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=wObpQvjJPZ+6lXm//YEoiVHwjB+uhySEVUFPC6AyumA=; b=cogkrhsWRuw/s18WgPIF9V0Y6kzeLHPyYgII7GosXzHrcoHodR2Xv2DiV1+zQ/aNxk 1GR6697y33bbH366zyXl9pBMWq3bBVT5b2Ur/RkusbhvRRFQpc69nWdcSruifKmXDwJt 92p9DDVsNjdA4BOAqf+aRF0jQd6UX6KC8GN1WqRBosnh9lkJsjksD89bBR0UfPhZ5Vcj n5+C/f2Wt9E5CzhNXIdPhAxSz3kV7iaguKm02qYSRLbmzU0OycX3fWQ0KJQbPJgXhG2N wAFk2MJNNHjEzNdB/dM/PeeDUHvV5pg+K5vY039uifopMKCM00VExvm/cqQRgQ6aC5Tt MfWw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1772061629; x=1772666429; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-gg:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to; bh=wObpQvjJPZ+6lXm//YEoiVHwjB+uhySEVUFPC6AyumA=; b=pBGrR9c1BJ310b9Q42T50tjWvojL/Kq1o30+2HV9oyrw9fRxQlurgM3UA/1LvxvQRx 3jbN2OwV7kYe3fhKSpq1WtY2XzDqBrcxRaBgo+H5+XysjzPcuB02hPQxg63v+dID2KcL 9AvezK+TADLkgfrIz+EP1r8UPTnap2wBOidFYhii4kWAXzmprqT25QzpcScgsrm6BFIb NAsAGbIgeSuxc5Y4sHmC2cXVZh722Tl+MMQRCTRHRlKR+MZv9VKF4SHPcYrxKzJ/+OkY zm2EkOVcpoiS+shAkvGj5jqT4tNlbdld48Zp/E29GerMPgQhQOhJWGixJ9Em+EjFswwF /JEw== X-Gm-Message-State: AOJu0YyS37Cj7TcPy140MK2XwW7D1ZEJilw+HCrKow02qQIRQ/UukTTa O2HCglELoe4Psl33NF8bDp8xSIuy/DRfb+da5OS5qAakDsDt5tYY0pCzzcVNfJTOZF05PDmIG3u O+WWxhDM= X-Gm-Gg: ATEYQzw7HgHdZWq374MHNDDE7jISe73mpMrPBAX+5ybzEH2jQFPIX9AK9jyNTvmvS/A JUFFGv4rcKTAQVd7DgZPURc4tL7af/KRSZPQo02IRU63LGirwR4AuaW6MO73YEejB8usi+1gAZB lLeMvVdt5rLF1VIlwS11jk6n9CB0eTkNmqamUIKgcJcXwOz6oPrYzTIvKZ/ob755gJ/+FHWBudU pRl56WmZHvphmdviHBNuTdD5T4RKWBZo/Jaw4LSTB1B44QHhj9M3RgcEVbjHNWKlnsbQ4peVxkA xT04nT8adqQq68dOqrAOqyqNS+ytmpo+NK2ADgYxnm/q6BIW6b8BJAglPs9PB1ZZhYJaL7FYzfi iqb4qjV/7iKnYCjg2R2HJweHQ7GqJ8lhA58+DH0bZRFp4y6OGrqcnUYDxDc/4GpGFb1kePPJECj J0d1ybhENM6bndouMja1dZxx63OdhdXytya/wB++KaR9WEJF0jIqplAVQRbGFfGEGp7dC8jt0W X-Received: by 2002:a5d:5f50:0:b0:436:216:98d8 with SMTP id ffacd0b85a97d-43997ed6f02mr586825f8f.12.1772061628929; Wed, 25 Feb 2026 15:20:28 -0800 (PST) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PULL 55/70] target/rx: Build 'gdbstub.c' once for system single binary Date: Thu, 26 Feb 2026 00:13:55 +0100 Message-ID: <20260225231411.96482-56-philmd@linaro.org> X-Mailer: git-send-email 2.52.0 In-Reply-To: <20260225231411.96482-1-philmd@linaro.org> References: <20260225231411.96482-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::434; envelope-from=philmd@linaro.org; helo=mail-wr1-x434.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: 1772061896547158500 There is a single qemu-system-rx binary, but by moving 'gdbstub.c' in the target_common_system_arch[] source set the resulting object can be linked into a single qemu-sytem binary. Reviewed-by: Pierrick Bouvier Signed-off-by: Philippe Mathieu-Daud=C3=A9 Message-ID: <20260219191955.83815-48-philmd@linaro.org> --- target/rx/meson.build | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/target/rx/meson.build b/target/rx/meson.build index 86dc231eb0a..d80ced11e2f 100644 --- a/target/rx/meson.build +++ b/target/rx/meson.build @@ -9,8 +9,10 @@ rx_ss.add(files( 'op_helper.c', 'helper.c', 'cpu.c', - 'gdbstub.c', 'disas.c')) =20 +rx_common_system_ss =3D ss.source_set() +rx_common_system_ss.add(files('gdbstub.c')) + target_arch +=3D {'rx': rx_ss} -target_common_system_arch +=3D {'rx': ss.source_set()} +target_common_system_arch +=3D {'rx': rx_common_system_ss} --=20 2.52.0 From nobody Thu Apr 16 20:57:20 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=1772061841; cv=none; d=zohomail.com; s=zohoarc; b=bBnHUo1YM+p/U3r8vCtR2UNeuXxP1LEdLlSY63SqUBZdE8iTZUyZIfcifhrEKX1Ol8FvYL2D+yFZKtiFcmVH0ht+tvBK/qnH5xxKS2XpqJKjf/ov7kVUdo5GVNV2YHTS+RNcL8WdooShLUD6UwfVj3LhohFK6xCUidGc3y15JWo= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1772061841; h=Content-Type:Content-Transfer-Encoding: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:Cc; bh=ff9I3GrkxCkld69uvBI9OtuF0RjJQ635EGlKJt6w3dc=; b=jtL8QYVHRGFCSAmUOS6aOy+EmQtu9bHr4LaffmxfnA7yMgACdo23l8bFjmch6V8Su0HKkSIv4sSbBLoXgTjFVn21Tf8YzhUzNO0xlrQF17mDwZUn1KJcS3ma7u5zTM/lvrCy7KAnFelaV5T/I+/yXXjbudGmVGObPwQ5ufzA9Jo= 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 1772061841281342.00999884541636; Wed, 25 Feb 2026 15:24:01 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1vvOBL-0007i2-UQ; Wed, 25 Feb 2026 18:20:39 -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 1vvOBL-0007hi-0W for qemu-devel@nongnu.org; Wed, 25 Feb 2026 18:20:39 -0500 Received: from mail-wm1-x330.google.com ([2a00:1450:4864:20::330]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1vvOBJ-0004B4-Ed for qemu-devel@nongnu.org; Wed, 25 Feb 2026 18:20:38 -0500 Received: by mail-wm1-x330.google.com with SMTP id 5b1f17b1804b1-483a233819aso2867875e9.3 for ; Wed, 25 Feb 2026 15:20:37 -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-483bd6f3124sm100631855e9.1.2026.02.25.15.20.34 for (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Wed, 25 Feb 2026 15:20:34 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1772061635; x=1772666435; 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=ff9I3GrkxCkld69uvBI9OtuF0RjJQ635EGlKJt6w3dc=; b=aymUelaLwZkWtk1RBKz+XWdEHXR1EJ7hvV9trnoVYpIvJxBZEePrMftjGAUAQ4Ou8c CKUtOg7LZ0RLFKiOygF8BBbqtOtmwEk5lSS0O/LE06wKc1mF2s5Fz1p1BjyfdNAmIAXD eOvwjMyXJhcME7Gv/EweKmzKFY/zNlKybrdLOjjV9WL6bLDkqXXJyGgBEepwfdsc364x zHbSjn/kP2Gr7Wexn0kT78N/e45+Kpmufg8uC72/4AL2lZzWpdzJskgi+NOOY7Uxamps 3X+VGSWfxMLBRraUU5UDBgRUZ3wqSErWUihRMPYTkmmsampy5TRrgVuJD/kxfakkUtHZ RHdw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1772061635; x=1772666435; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-gg:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to; bh=ff9I3GrkxCkld69uvBI9OtuF0RjJQ635EGlKJt6w3dc=; b=FiyJssnrCvwqJO4bHWyiTW1m40J+krwgJDH9dv/qltfTwE8Lu1PEL+pjXPkh4cJUqH sxYd7jL0Vn7I2ki6DD1vj9Fi3g/DBjHDg7ZZ9sdMrp+D0CQCbRz8IiFhSbnM6QxU2A/Q 87RE0/5i3LDYPLRE/hexLVmkd5B4VEUsXw4kHljzrzxeNI1vA9VAJjM6FaNKbPYiBDBj dqdebf+D/AfwFZO2aOtETgXCgIAXHrUY80xJAjZhn6Js0rDyKv7asmOLLtaOUsKAXKHT SxVvzRpmilxzteS5R/m5Gseur6ykCWZ5Bcohr0x5H30Cq62J99d9JKABmW2+yhCJoeVT QB0Q== X-Gm-Message-State: AOJu0Yz4u/Otoe4/0pX5sJwNzDZz5d6ccRTNz7HOke3kD+luLFiYbqU7 L8ys4uYCa6VbFwNbVMBdCXceD7GJ5oWVsW/tH+r0cLheTS04xE2rLjjEfKQUzQqEBh36mwCKChe HkZ5c3HI= X-Gm-Gg: ATEYQzwaMl2Is+K+CsSd9IiJVLJQZ3t8AcTUcSLPXPPTlUGBlY4PRCxQ5FrwoeRvpAN zs2LmWU9L0TQC+eqDnBDPU1EhpEArKO4SeDJ8i/v2/mFon4//uyOEkLwd5twpkCKbj7X1+xZGQw WwYkNOqQyjNIYQF9KqzTRfxzeYEDfR1M21Tl/coFZr3b28Rdzi26IAe6JSq6HrJntYQ09830gyQ 71O9LzbseUyRlJXQzgjNVtHkpWPWaMfJK2hlEYAWJTEWkxzKbBY+G3T3cTMc7kdhID5jK1+1ZMq aJ0iDZ+QGJL5BqNp9rvl4YbMWPjdZfYSqadyI/P15jgPU7Um74V/52ibY5ozOOM0Sm3Hk1SDr/l cCcYsvE1zMbglnPVW60uTvNlInyeR1rbTSEYbQrCOiFPibohDh0lXuKXhozMV91QRBLbIHH9ioq Xho4CWvVyhf1JzfCJpofibVHel0bOdlBRoQmMyG8ih8Af6hLhC85C0+0WwFC281wP4PJ7ZuScn X-Received: by 2002:a05:600c:3b14:b0:483:c35d:3662 with SMTP id 5b1f17b1804b1-483c3dd6fc6mr1499055e9.18.1772061635422; Wed, 25 Feb 2026 15:20:35 -0800 (PST) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PULL 56/70] target/s390x: Build 'gdbstub.c' once for system single binary Date: Thu, 26 Feb 2026 00:13:56 +0100 Message-ID: <20260225231411.96482-57-philmd@linaro.org> X-Mailer: git-send-email 2.52.0 In-Reply-To: <20260225231411.96482-1-philmd@linaro.org> References: <20260225231411.96482-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::330; envelope-from=philmd@linaro.org; helo=mail-wm1-x330.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: 1772061842264158500 There is a single qemu-system-s390x binary, but by moving 'gdbstub.c' in the target_common_system_arch[] source set the resulting object can be linked into a single qemu-sytem binary. Reviewed-by: Pierrick Bouvier Signed-off-by: Philippe Mathieu-Daud=C3=A9 Message-ID: <20260219191955.83815-49-philmd@linaro.org> --- target/s390x/meson.build | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/target/s390x/meson.build b/target/s390x/meson.build index 096b7dcc42e..6f98ce34d73 100644 --- a/target/s390x/meson.build +++ b/target/s390x/meson.build @@ -3,7 +3,6 @@ s390x_ss.add(files( 'cpu.c', 'cpu_features.c', 'cpu_models.c', - 'gdbstub.c', 'interrupt.c', 'cpu-dump.c', )) @@ -34,11 +33,13 @@ s390x_common_system_ss.add(files( 'sigp.c', 'cpu-system.c', 'cpu_models_system.c', + 'gdbstub.c', )) =20 s390x_user_ss =3D ss.source_set() s390x_user_ss.add(files( 'cpu_models_user.c', + 'gdbstub.c', )) =20 subdir('tcg') --=20 2.52.0 From nobody Thu Apr 16 20:57:20 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=1772061895; cv=none; d=zohomail.com; s=zohoarc; b=MMzr42OrGbI9rBeqUAljDyeeGktIPQSEEl9lSC3/wAS8civ0lUiOaTx9SnFGFIDuPjPFwghov1HhumbAnHG93niI/HxMelOkPqgJq5nSoXijpRsKoxZhoebpIfp3Od4xnMtNNc1aaiRVg+DdFOzW75yYzxTde00HitK3VTFQoLY= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1772061895; h=Content-Type:Content-Transfer-Encoding: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:Cc; bh=4QlfSlu4aXwljxewfykwNNatg6DZH2GiRF35bvXtANE=; b=X5nxhx6qSuzXQeySha81qe3P63c+dlxCxxAOLH9zz/tyosVIRyZsvAzkVQYINDLVN0CqUSxt8zZNO9c3NoJzd5F1we+bbmfcco2Ak5srVgVziS8KNXi14KaEmTSnLIJiskNKiTcYDnXNBFFN7M4cFnJa2EbLN+sHFVelLU6tgLI= 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 1772061895639135.9481845173351; Wed, 25 Feb 2026 15:24:55 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1vvOBT-0007m4-0R; Wed, 25 Feb 2026 18:20: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 1vvOBR-0007kT-Ev for qemu-devel@nongnu.org; Wed, 25 Feb 2026 18:20:45 -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 1vvOBP-0004Bp-PF for qemu-devel@nongnu.org; Wed, 25 Feb 2026 18:20:45 -0500 Received: by mail-wm1-x336.google.com with SMTP id 5b1f17b1804b1-48375f10628so1988775e9.1 for ; Wed, 25 Feb 2026 15:20: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-43970d4c95dsm41134746f8f.33.2026.02.25.15.20.41 for (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Wed, 25 Feb 2026 15:20:41 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1772061642; x=1772666442; 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=4QlfSlu4aXwljxewfykwNNatg6DZH2GiRF35bvXtANE=; b=B0re+4OUP13AXqCWkVdBtcJqrGUXh3zhaArZYjkZWt+/xjk81SknBt5vvhz2l5iRKp Vyit32vmLrxLgOofJo7trUNErutsUYnnVscL2x0lbjUhvgtCV1WJ1VkDurTVMHibkUX/ 87Vu1hdU1b/qMFHf7g4zCDW6rqrnQxNeEndqNe9aKaMYVZ6ztEVQbe9zbxZ4PnjgvrEq ikYrY/rVzggwl5d9BHebfi4e009+5wUVRHnKSrZKBFAA9nlclPjputi1x1NQu3uX6+U5 NTPwgPR0aDDmJAojK+tzOjmj6hyaJTc+VA8s6Qn20ccsEmlnsZcAP65y11rCmgeCAczA zbIw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1772061642; x=1772666442; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-gg:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to; bh=4QlfSlu4aXwljxewfykwNNatg6DZH2GiRF35bvXtANE=; b=vtTAlMu4oKyXyNM5lQKZt1dSQ8JplXPP/bMIFn4HUVVtUj0odfoC0kFPG7Tb9ofSL7 mMWUMtl0pIxyDVvxsHzbT0K2d6CKHljJG9OdqhwDAi190HuxnnGcnU9SIkuDk6b8CRq7 hT3+cHb0A+RE3TvnCvNNwQacSQRUyxv+xIvXLQaG4HKTyx9i+S97VbZlUCsiYo0bmOov JPs0761qXVJvOlyK0YSaehhJSH4SwCO9o6cIVm1+mIHmoMGh+iZVszCyT+JF3ZB+qXGK ou8F6XWfJzbOsnwRoMIz7mwI3xFHnVLLAz/mzdcPjDvpIGXEDX8Xin3IAmYd7E7AgtCF FvdQ== X-Gm-Message-State: AOJu0YzqAqRqc5VIMiwVd7FfV/KhuZm0+Dc77xaninjnTgkrq/fjGC4R Tg/P2eDfn5DA+KildqmN7cuBo8Z8vpJ61e7hsaD5lTK0oFH8htE/L4OOXOXjWwxPF4Nnf1IUDKV q0yI2KoI= X-Gm-Gg: ATEYQzyTy8pBzToGkka+8uU0sXjYkLaXgQnAk6R875x5FgF+2Hx5n9FXcq2EETaNbw6 31ZhZ0nDijRgWVh9YKTZgP5V2d3jN6oaeL7r+9IJM2c713R43F+cfTFbS9TcLO8bToKPCiA3yC8 Dj6cj954yOROSgOUSGCikqd0xGshBT+A6uwM5Y/RYSWsktWo8ERLbXTy4QGe+5FqYDVmtboBzJa vVdjanur/r8XwlM3K4eAL8LcKIwxG7iPsnnLVBx1t3FApptHf2AeZAe72H/ZiAfgxGFX1I5k9M8 KLXtSE6Co9kFx4ww5cP0EkZD3JY9MHvmfX3swjHMPDP0atHvIp9QKeVClDZH/Vkc/rI9bJRr6JJ o3ffgWiQrFcfbDJiuXqDEf2X1+UaQunTnFCIhGaPSgcSuL9cRkcIOlkRp+o/2oHjnMCDWehnFkW +LVxvZBuyEKY5U2gLRVwN7I272cK/qxOiGPacSufAkedzwaj8ocohqoPdc2ZJvwUg7eTK5K7qM X-Received: by 2002:a05:600c:8107:b0:479:2f95:5179 with SMTP id 5b1f17b1804b1-483a95c5313mr318587215e9.15.1772061642012; Wed, 25 Feb 2026 15:20:42 -0800 (PST) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PULL 57/70] target/tricore: Build 'gdbstub.c' once for system single binary Date: Thu, 26 Feb 2026 00:13:57 +0100 Message-ID: <20260225231411.96482-58-philmd@linaro.org> X-Mailer: git-send-email 2.52.0 In-Reply-To: <20260225231411.96482-1-philmd@linaro.org> References: <20260225231411.96482-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=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: 1772061896619158500 There is a single qemu-system-tricore binary, but by moving 'gdbstub.c' in the target_common_system_arch[] source set the resulting object can be linked into a single qemu-sytem binary. Reviewed-by: Pierrick Bouvier Signed-off-by: Philippe Mathieu-Daud=C3=A9 Message-ID: <20260219191955.83815-50-philmd@linaro.org> --- target/tricore/meson.build | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/target/tricore/meson.build b/target/tricore/meson.build index f40daee61ed..76cd78e990e 100644 --- a/target/tricore/meson.build +++ b/target/tricore/meson.build @@ -5,11 +5,15 @@ tricore_ss.add(files( 'helper.c', 'op_helper.c', 'translate.c', - 'gdbstub.c', )) tricore_ss.add(zlib) =20 -tricore_system_ss =3D ss.source_set() +tricore_user_ss =3D ss.source_set() +tricore_user_ss.add(files('gdbstub.c')) + +tricore_common_system_ss =3D ss.source_set() +tricore_common_system_ss.add(files('gdbstub.c')) =20 target_arch +=3D {'tricore': tricore_ss} -target_common_system_arch +=3D {'tricore': tricore_system_ss} +target_user_arch +=3D {'tricore': tricore_user_ss} +target_common_system_arch +=3D {'tricore': tricore_common_system_ss} --=20 2.52.0 From nobody Thu Apr 16 20:57:20 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=1772061899; cv=none; d=zohomail.com; s=zohoarc; b=lsPc9kOrQI8g3JHNZCTIHWLL4QxiYZqRAxcaCGoBivfHuMgDY36oPQouIE94AyMQmIh78LIKUTyhE97+iPJucJQObRPF2Pg6Vb8xx37QGy5h2uHecgbKivumRPirGErQx6NSZ2hxLRUzZYi/8uoM18RmbLMTIQHtY+bdPxLAYOI= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1772061899; h=Content-Type:Content-Transfer-Encoding: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:Cc; bh=tMA4cs9evprWNErV/UApWIVyy7rlCFYo2HAw8z1Xw3M=; b=MSlwc/FQLB88H9vMiPJ44PbFQBVZUhJn7NopeYH7QducOnyW5Y8ylkPce40jE4gMu9klUN3+BV/H+fWjUXPdkcUqiHlhG62y7XcabwUXDQIkqUto8QhKgF1wkxQE2em78C6TTbESqC9PoV+jmN9K5jLfGGhdhoCilaT6JUAM17I= 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 1772061899401242.99651174776386; Wed, 25 Feb 2026 15:24:59 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1vvOBZ-0007nE-Ev; Wed, 25 Feb 2026 18:20: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 1vvOBX-0007mj-Rk for qemu-devel@nongnu.org; Wed, 25 Feb 2026 18:20:51 -0500 Received: from mail-wr1-x433.google.com ([2a00:1450:4864:20::433]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1vvOBW-0004Cg-Bx for qemu-devel@nongnu.org; Wed, 25 Feb 2026 18:20:51 -0500 Received: by mail-wr1-x433.google.com with SMTP id ffacd0b85a97d-4398f8403edso181806f8f.1 for ; Wed, 25 Feb 2026 15:20: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-4398bb96b90sm12900141f8f.9.2026.02.25.15.20.47 for (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Wed, 25 Feb 2026 15:20:48 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1772061649; x=1772666449; 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=tMA4cs9evprWNErV/UApWIVyy7rlCFYo2HAw8z1Xw3M=; b=ML7l7pHp+S4t93wF86XfHtPWdxGzS1jp9/xim6iq8eeXUB1Qb3v8eq9kulQSLmPAYR VWKrtuEBswIXfEYmRHvBWbEmTTTqdX0QZQSUD0PJdhr1Hva88fEt0iWUzYNBGHoHXgPu WKiizdEnHfKywxZPHZpafay3aq1osORrwEC45mBRydWh+ph8W1zE87WKSD8bDawEEgvZ MTXf2BMVxi0Z2FzhDDYOChA1Ri7ezt7s4BWYQXjQw8UcFCl2F5b9HZfR1pLhJxb6ZzSW aq9vWz9CH3wJ9uV4jgqLNpJiquSNlMv32aeOmNIvJJ3bAFh/cdg9RP8lza4O1SNjJYaI frFA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1772061649; x=1772666449; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-gg:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to; bh=tMA4cs9evprWNErV/UApWIVyy7rlCFYo2HAw8z1Xw3M=; b=O/f4hX4TqFhsz6m019hXJ7AHaSlZckLJ9fdJRHdPqhy/pSGfSwlIJLSt5LwDS4qLn1 T9oUUE7frcOqPhho9GZUuprsOe0DPFa7HGTYdZTGggV4Uq1vbomUDYpD/TBNGWQXOcbC bf+4XCzZZP0kmvtI/1nkHcW8/jvQ+JKU/fEfUGZb+0Vcu02/A4vtLs8G8ItlA9Nv/5Pm CYU4NkNY6YG7IBrF1+PrGX54isYkJUyc3wdlQ/isdtu4r8zyiQpOqzEJHEpSZjF2K0SW sczXaeoeTJ2WAHJFKN8qfXMLXHQjmxYX90aCyM4wcWssu8MTb4c1WIVSXz8dfoYqPfRL xQrg== X-Gm-Message-State: AOJu0Yzi8ec7C790dUGFygGWC1Q9myIyN5Fgs9QBxXEqbltftwqWad47 DJOmKMLOtJQdi5LhMzfqpPOzlu7GI8iWuNho42TqFXR1aWfCDJ5qM0mny1HpmEM09FLFololjsz pBz/4CDU= X-Gm-Gg: ATEYQzzqR0MF7NI0ZKCwMmPYlGV1RZDPfcW3tmbjdwXmdMrOBKcn6QYV9dxlBi1JZ7c km8nSoot3dlbo3BjASEzGsjKAObIMco81XkY/SNQ5acygEQr48z7nGjWVccnNvqonWkS53rhT0P l29UEVUXe/i2485XufEXeFHFYFNakngxvac3oO1YCOYoSyJZpQcfmn9kqOLdV1lbNa/JkkW1U5X kUaJrqWP4QXHx5Gz0fjOpYWcZBkJc3NqyphdS50c7ftqwuCxof1xwPG2Wet4MV1Ce4ZKshU4xC0 NKQ6+BQfxs4BBJ0uYjIb1BrLih63Dw/kjhIqNUyBH16rdZKU+mzimrj1ykqs0IPoz00vVb4HQht MR0yf7I1qrwYCURZWz8oHtiSwO3zJHz0DP/3IkhEynEHP5zzbSgyOCzuYC1c+PGbRzb4dOp7KD+ VOH6mR5ifaVDKZAUytUoyIyu0h/NBE5v6ythoeWJsb/FOisGjNs81Rrth7N9s75SBiLjyvbkRM X-Received: by 2002:a05:6000:2c11:b0:435:ab90:6f34 with SMTP id ffacd0b85a97d-439942a83b8mr3948060f8f.16.1772061648524; Wed, 25 Feb 2026 15:20:48 -0800 (PST) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PULL 58/70] target/m68k: clean-up includes in cpu.c Date: Thu, 26 Feb 2026 00:13:58 +0100 Message-ID: <20260225231411.96482-59-philmd@linaro.org> X-Mailer: git-send-email 2.52.0 In-Reply-To: <20260225231411.96482-1-philmd@linaro.org> References: <20260225231411.96482-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::433; envelope-from=philmd@linaro.org; helo=mail-wr1-x433.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: 1772061900484158500 From: Alex Benn=C3=A9e We don't need translation-block.h as the TB flags are local and the only bits needed come from cpu-ops.h. The vmstate is a system only concerns so we can guard against including it for linux-user. Finally tidy up the order to keep things together with the local cpu.h kept at the end. Signed-off-by: Alex Benn=C3=A9e Reviewed-by: Thomas Huth Reviewed-by: Pierrick Bouvier Message-ID: <20260219171810.602667-2-alex.bennee@linaro.org> Signed-off-by: Philippe Mathieu-Daud=C3=A9 --- target/m68k/cpu.c | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/target/m68k/cpu.c b/target/m68k/cpu.c index c721a23b966..d849a4a90fc 100644 --- a/target/m68k/cpu.c +++ b/target/m68k/cpu.c @@ -19,12 +19,15 @@ */ =20 #include "qemu/osdep.h" -#include "qapi/error.h" -#include "cpu.h" -#include "migration/vmstate.h" -#include "fpu/softfloat.h" -#include "exec/translation-block.h" #include "accel/tcg/cpu-ops.h" +#include "fpu/softfloat.h" +#include "qapi/error.h" + +#ifndef CONFIG_USER_ONLY +#include "migration/vmstate.h" +#endif + +#include "cpu.h" =20 static void m68k_cpu_set_pc(CPUState *cs, vaddr value) { --=20 2.52.0 From nobody Thu Apr 16 20:57:20 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=1772061830; cv=none; d=zohomail.com; s=zohoarc; b=DQcZ32NTqUEuQRbTcJlXd0S9XP7Y6KvAul2Mqcxe6BG7b7JlvpbRvaLo0TfXvxXwypJAuefmsNfVEHE+M3yEMRhFCnC6A1lg0bHuQGoT2exBVVVh98L/2lNZgu/AI9610TLtpe7OLdtYsI7/3sNUmoaYqHwUwebxLGGxD5I7X9Y= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1772061830; h=Content-Type:Content-Transfer-Encoding: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:Cc; bh=KmA6moOts/y8W6VH8TAC8fzK0830HPzqB/hEf14q/kQ=; b=cfGVtU+pdCL27WcbaKVJfuebEg9ZWv8HagijnhNakkuW890pUjtYVZ0msaIFBmvFGjO5YNqG7Oh/MIdF9+vK3E+bTm2jLYg1BFgA9fdH5tiFb3KzRU5xtLeOX66kT5ThdA6Dx5DQmdZJki910w6fWlXwlA+unTXDi6bJQnTuSN4= 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 1772061830312419.56800043098383; Wed, 25 Feb 2026 15:23:50 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1vvOBh-0007oZ-1o; Wed, 25 Feb 2026 18:21:01 -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 1vvOBf-0007oJ-M2 for qemu-devel@nongnu.org; Wed, 25 Feb 2026 18:20:59 -0500 Received: from mail-wr1-x444.google.com ([2a00:1450:4864:20::444]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1vvOBd-0004D6-RN for qemu-devel@nongnu.org; Wed, 25 Feb 2026 18:20:59 -0500 Received: by mail-wr1-x444.google.com with SMTP id ffacd0b85a97d-4398913af88so195188f8f.2 for ; Wed, 25 Feb 2026 15:20: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 ffacd0b85a97d-43970d4cc81sm36373905f8f.26.2026.02.25.15.20.54 for (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Wed, 25 Feb 2026 15:20:54 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1772061656; x=1772666456; 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=KmA6moOts/y8W6VH8TAC8fzK0830HPzqB/hEf14q/kQ=; b=ZTnPxRvGTK/QeXd32WZqdWJ8rPo/E1H9zebRmufEKi8tQ/CaR1CujZrACO/0U0SQWc x1Byqz9twn9Gcpm/30MSvoYxypsOGPlCNnmfpJpQtL1VjVlzRdmq7NGui1OJ8tFihX9E BWWnuQ1VZWFKfg17CBjhwxpXNFUy+ApLu6X6/n+4spnyaA/77bmO/BYxJI8FFZXnDXsM M9z8mOtf1fHsj+BUm1V+30OcAWEua5YO9s8UtE8gB9xvEqq3P871878+gWPCXsbIKTOt zXoW8p0dKL5GAQaK6O0ruBKl6n48xzkZWByhwoLSI2t2ZgTH4al1ZdfdiZoZCdxbSnWQ 2VaA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1772061656; x=1772666456; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-gg:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to; bh=KmA6moOts/y8W6VH8TAC8fzK0830HPzqB/hEf14q/kQ=; b=V5+JDBLIkzWxfJi8cwLGV5er+7VwLlOQrBz2Z61vzUSIpPiJBfwQijbUarjv5I3a+r NhEUT1XKA75d8HLOr2tAXI2krmwNmP4fJ62Mp8J6cBXVl7CFzHri2CwoeSHLGclQhPhA ouQkTvFrFGs1AYvxtHqaD3d688nfTuCpqoIEpyhm6paFHYj7vVUXWsI0mWhjak6qycnY viNb74Gcdt+KoiZPNWhN/u2lq+sXlVTv223oMjMSf+glImbU+and35cFHkdskcRWOIEH Ky5ixbdm8yWBm5TKXSnWNCB87PvsqtHY3NnDUl3ZdJ7hcxpyB+DZ9bAwWEvR3b3Vxj06 TNOQ== X-Gm-Message-State: AOJu0YyyIbJOR/wirqe56j516UVDV/e5K2kxE7s0Rgrd/WYS0BOaaKKD LEXZAzdrD+5kBklr0ZgUjdswGxp3TRQiTYoTouIlltHVO4g+xkYPt8YExm4aXfygywmH8S+hOrd yNZiDcXh3Jw== X-Gm-Gg: ATEYQzwfMAlGfgMWQNMNgf1l8UnxLLAhyXqaMlGdX3pl1riey+Pf4RNz+X0zF1oCXWg vCAOzUArXJ1UpozISpbAXDW+Nc4h6eqnK6poTZ8saByRvoJ+7j7mIJ1uLLAoZolgV+xGwbNJm6p RKas5A59bpDOzfW99P3aKffSclQiF3IpA6qdxm7MvNXX5PA0DFyWysnBldqbPtHvkEr8I/o2oV2 2rCuagykhtwscKNMO78+ieedt5e0Z0FM3IwHPrSI+oWQPhMKi+RN5R2IF9KJP9jr9yJmrTjhuxk RuXbkti+eajpdH1dt0g9Ef0Z2zEJv4gpX/VTCoSLSd9MMckzlEjpSAy/FacnD2DKkWWo2x1YA8w cND7uvNCrBGv4GtHnH1M195SHvM7YqkHwXxp2oxZBBjp76bubX+/i2bchB4GABRbcFtHHN2jxmw cROg7NEc0cseaYsqT4i0wb22e+EatAhTH0i+33anf7I2qDzgAFXSuMlq9onDEolbWgGlx6UOoYq FhOkA20Osc= X-Received: by 2002:a05:6000:2510:b0:439:8e9c:35b4 with SMTP id ffacd0b85a97d-4399430574fmr4144144f8f.53.1772061655805; Wed, 25 Feb 2026 15:20:55 -0800 (PST) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PULL 59/70] qemu: Document qemu_arch_available() method Date: Thu, 26 Feb 2026 00:13:59 +0100 Message-ID: <20260225231411.96482-60-philmd@linaro.org> X-Mailer: git-send-email 2.52.0 In-Reply-To: <20260225231411.96482-1-philmd@linaro.org> References: <20260225231411.96482-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::444; envelope-from=philmd@linaro.org; helo=mail-wr1-x444.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: 1772061832214158500 qemu_arch_available() is used to check if a broadly available feature should be exposed to a particular set of target architectures. Since its argument is a mask of bits, rename it as @arch_bitmask. We have less than 32 target architectures so far, so restrict it to the uint32_t type. Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Pierrick Bouvier Reviewed-by: Thomas Huth Message-Id: <20260213175032.32121-2-philmd@linaro.org> --- include/system/arch_init.h | 8 +++++++- system/arch_init.c | 4 ++-- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/include/system/arch_init.h b/include/system/arch_init.h index f2f909d5406..92d50ba8d63 100644 --- a/include/system/arch_init.h +++ b/include/system/arch_init.h @@ -25,6 +25,12 @@ enum { QEMU_ARCH_LOONGARCH =3D (1 << 23), }; =20 -bool qemu_arch_available(unsigned qemu_arch_mask); +/** + * qemu_arch_available: + * @arch_bitmask: bitmask of QEMU_ARCH_* constants + * + * Return whether the current target architecture is contained in @arch_bi= tmask + */ +bool qemu_arch_available(uint32_t arch_bitmask); =20 #endif diff --git a/system/arch_init.c b/system/arch_init.c index e85736884c9..ec9e45a1a80 100644 --- a/system/arch_init.c +++ b/system/arch_init.c @@ -24,7 +24,7 @@ #include "qemu/osdep.h" #include "system/arch_init.h" =20 -bool qemu_arch_available(unsigned qemu_arch_mask) +bool qemu_arch_available(uint32_t arch_bitmask) { - return qemu_arch_mask & QEMU_ARCH; + return arch_bitmask & QEMU_ARCH; } --=20 2.52.0 From nobody Thu Apr 16 20:57:20 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=1772061929; cv=none; d=zohomail.com; s=zohoarc; b=VdS36rZ54wwdhEYjwbzaTnmbpQ6Js9orPvdsdSGJ6zLBxHG6Xq1U4Z+pAX3HVRsMqVmOfYmT/7gJ0JuXvGcUdhBrly0aIjUUU5OlY7wUVk8UgXluh3IUwUGV9ruKtpxv2mg1+E4RzAGcRTC7GgFrTXDKdZFMjb+65IPpMzMxHaI= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1772061929; h=Content-Type:Content-Transfer-Encoding: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:Cc; bh=q2aM84oDDmGMmCgRLZTwoFAMGKPzDi3I8qnQoIiNA7E=; b=UF/Hg5JZNm9m9M3DyMeuH0yII1bxhX2Nw8VPh/wvG3grHGrI2K2un2v0QzQUVIY2YBgus8rjLS37S3K0+AsCDr8mfUhRtgxIs7gayq/NxgvjQq1GHqCM4M1duEWTRkRH+9YQY6DgFL9pEf4k6J17Lf3AFpxp6KIjOategfeq+eg= 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 1772061929810662.086604152954; Wed, 25 Feb 2026 15:25:29 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1vvOBn-0007pu-Hg; Wed, 25 Feb 2026 18:21:07 -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 1vvOBl-0007pA-M0 for qemu-devel@nongnu.org; Wed, 25 Feb 2026 18:21:05 -0500 Received: from mail-wm1-x32c.google.com ([2a00:1450:4864:20::32c]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1vvOBk-0004Du-6G for qemu-devel@nongnu.org; Wed, 25 Feb 2026 18:21:05 -0500 Received: by mail-wm1-x32c.google.com with SMTP id 5b1f17b1804b1-4806bf39419so10333355e9.1 for ; Wed, 25 Feb 2026 15:21:03 -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-483c3b841absm4453305e9.13.2026.02.25.15.21.01 for (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Wed, 25 Feb 2026 15:21:01 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1772061662; x=1772666462; 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=q2aM84oDDmGMmCgRLZTwoFAMGKPzDi3I8qnQoIiNA7E=; b=i+qdOwvf+TvyWALZKse4rUHq/Xe+sfuV+NQ5fGksHpTH8POO+U95b4WK0wEGruqCxd 6UpnNLiYXybdffaBDazAXCMlJ+pkymbwbF80pdJzcwQhyYwQYIaxfBy27eqlzLMMnBqQ bZeXKlAbpDe7GkckqNGVFZp2XR5xjkPHkh7qSEmmVGW6uvlpO8HoyIK+Ld0iwVlfXIzs KD3c68x/HhODtlEYj7ut0/b6yFaR3LI7s3ar1Oz3gGnzP1QtOBpkrqZz2cbIHnYJ8iLU NqHc6rBfknQZ+uvFnAophjPICnPnioLgeB2vpX77E4OO3SfSyiCPnx5buvP68VlP7VZl VtNg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1772061662; x=1772666462; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-gg:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to; bh=q2aM84oDDmGMmCgRLZTwoFAMGKPzDi3I8qnQoIiNA7E=; b=h4oDqT2y3i/zrb12/9LBU2jQQUe7AUAfiYtdw8J6V7klKJq5i52VUK+GHyxzf25Z9s KuWoQYnAp0wtol5CSjq8lq1+TJrfpoiOr+ZtCb0yZnY67kcXvCQPygiHVWahPm2PUa79 r0nXz+AFXJhoRQy+TFWmKgzFZsEqBM+83TWVORSqqCC4dUk5GCZKIlFSekbTrrZEobsc IHpyUhPdAk5xpEM+IHFjGO2MveHu6r+WLJj7+ziAAHDxtuA0iUKZZk4pywrzDQXv1zAU pk7dWwRFeNm0EDwdOry3eu3QzJqq9meIQBr9blL1qi86plg5JNk+DoixeSDONZz0kMN9 7h8Q== X-Gm-Message-State: AOJu0YydE7mtE9m9m27y71Gsv6O/OlUKn2fOuTCwQmI5cdsGW1fjTcGv qv3sCp+03SPOLjkZ1w1ZbnAU038EksYT9BUx7rrF8v6NhD/RW5QtEN6xAKpyymf4YQqGSEtc3OZ eivgZ5T0= X-Gm-Gg: ATEYQzzbcxgkqsXoiLk07KULjuhwHwUItQQNC0/EBADaqBMMX9qv418ldKqg6jme3oi EFAut0HSLjLK+Hm9EZRpBWCIjv3QD4T+vvx3q5Bcjg3ub79xMgoOLcX6WaSNKl8oFhb+cuY4JAk IY4il4xaOXr6RoinnxeLIVpI7T47LjzMISumALA8xZ+oU4uIUMitCRHbdSYZQIQiCL1Zqno+m3A Xjnlqi+ftXX2UCmpTJdbC/JkUTmdkv6KYYEl73Avg/quvY2yE60ce2CezTCZRFtaB4kFiJ1Mgdk Rg6XftqMYOTb13FWAZG7c9uUJ7TiCQJrOiWyHuiXdVNdJYn/KRQQei5Uv7T131Nl/ag71qkfeoT Y1Q32UjE4iGDo81mJ9jXcNt5CtzYsvzJJnQ+Yg8izpPWUwhR9cBnK6u0CzgCPzw/IWw6VZvAYoX bgzbbiNnNPQiPyRe7EEBx/OZB7FEQNao1gTr+Ow+7myduecXMLJNF+EF5NR2e5AR6+HnKqgg0ZU CupARS5BXQ= X-Received: by 2002:a05:600c:5583:b0:47d:52ef:c572 with SMTP id 5b1f17b1804b1-483c33c1d04mr10965705e9.1.1772061662343; Wed, 25 Feb 2026 15:21:02 -0800 (PST) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PULL 60/70] qemu/target_info: Add target_s390x() helper Date: Thu, 26 Feb 2026 00:14:00 +0100 Message-ID: <20260225231411.96482-61-philmd@linaro.org> X-Mailer: git-send-email 2.52.0 In-Reply-To: <20260225231411.96482-1-philmd@linaro.org> References: <20260225231411.96482-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::32c; envelope-from=philmd@linaro.org; helo=mail-wm1-x32c.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: 1772061930553158500 Add a helper to distinct whether the binary is targetting S390x or not. Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Pierrick Bouvier Reviewed-by: Thomas Huth Message-Id: <20260213175032.32121-3-philmd@linaro.org> --- include/qemu/target-info.h | 7 +++++++ target-info.c | 5 +++++ 2 files changed, 12 insertions(+) diff --git a/include/qemu/target-info.h b/include/qemu/target-info.h index e3287334304..23c997de541 100644 --- a/include/qemu/target-info.h +++ b/include/qemu/target-info.h @@ -92,4 +92,11 @@ bool target_ppc(void); */ bool target_ppc64(void); =20 +/** + * target_s390x: + * + * Returns whether the target architecture is S390x. + */ +bool target_s390x(void); + #endif diff --git a/target-info.c b/target-info.c index a26532f660f..28c458fc7a7 100644 --- a/target-info.c +++ b/target-info.c @@ -88,3 +88,8 @@ bool target_ppc64(void) { return target_arch() =3D=3D SYS_EMU_TARGET_PPC64; } + +bool target_s390x(void) +{ + return target_arch() =3D=3D SYS_EMU_TARGET_S390X; +} --=20 2.52.0 From nobody Thu Apr 16 20:57:20 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=1772061773; cv=none; d=zohomail.com; s=zohoarc; b=VFaydEPK2k7CnUoZkO3BZOY9mXBeAEJCtj5lyz9rf8NiAYXTr2bHI1wqp5tFYGCTOuZKdRmo8KLaGdunxhuaj6EMEeJzVLUrrJwMHkm/U0rMfCAjQK7l511yH66xBdWZogssO1mZ2WLpX7N7RyakbcTm90Ari66VP4+LJAO21tc= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1772061773; h=Content-Type:Content-Transfer-Encoding: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:Cc; bh=FUy747eLUsQzKmOZLXCMVSBXog85AzJ+ezaKKEhkr98=; b=fF74T3nhvpuW+hF7/8nH3UBDbI1bVv4idGSuYPXQTtTlpCXhBnS7ApXI8BPdyB5HxKzl0MIk4ZoUgoi824so1o478fXBL2quUR34oYbzPcMVsp1ev8jaBqFDuqD4iL2fpjtnjxBXqc8erKL+QQG+u1syUlhc5+RW1oed0qvCz5I= 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 1772061773279665.6259058723028; Wed, 25 Feb 2026 15:22:53 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1vvOBv-0007ss-2F; Wed, 25 Feb 2026 18:21:15 -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 1vvOBt-0007sJ-Hd for qemu-devel@nongnu.org; Wed, 25 Feb 2026 18:21:13 -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 1vvOBr-0004HP-3V for qemu-devel@nongnu.org; Wed, 25 Feb 2026 18:21:13 -0500 Received: by mail-wm1-x335.google.com with SMTP id 5b1f17b1804b1-4837f27cf2dso2467675e9.2 for ; Wed, 25 Feb 2026 15:21:10 -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-483c3b346ccsm4329665e9.2.2026.02.25.15.21.08 for (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Wed, 25 Feb 2026 15:21:08 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1772061669; x=1772666469; 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=FUy747eLUsQzKmOZLXCMVSBXog85AzJ+ezaKKEhkr98=; b=IHRRz9grziJozDNN7Ya07cF2ujDl1199QW8yD9gQUon++OUB4QtwKP10VuiT0sLBqk Z27hF6aa51pC9Y7REMskZ4f2i+QXMusZeJ+2I2ZyJFYAAvOzFvZhqkmaDnJ8H5HFRE7d QXqhEHDpg0PV9p1gIkwMRFokCuE4W97r3YWpT5QZ4rmcwoe0xrBkthf1hOuK5bqWwmS5 2P0Bo5WU7WHceLqby/8N/9QEtJUDhKnPa5stwwNrBhewEdjhAxPBkgWwTMCRgu5i7WKv GhlGdzHROUJQmUdnoujCr88rixHXe6vcuDpnRyb7bIsDjvdBUZkf9UiqSkP+6LLdGuAd JAFA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1772061669; x=1772666469; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-gg:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to; bh=FUy747eLUsQzKmOZLXCMVSBXog85AzJ+ezaKKEhkr98=; b=lRJuix+/qbFRXbQ2W0NDDcFV01S6cU5gr+9cGhZQKfHA31JMJ4g0mUJRyZqWxvKFto zxZxiKKcL4YhRmnG5O8EiEmyNgrkyHFV4SJLQne0p5TKEHQJueREMikLFioATa3b722L nSVJXY3T0+OGFZqVP/424sHtnI48rLl1ZQR2vdscKlHvMEuDVMygBPq40tSJDtfyr/qu E8WOIGNlXd99XIuMJLGZ363IJw6VtnSKgl4sT6PKHFWFYkSlhVfDeYcq9YDpotHhtVxw ReIkZSnDMjdIPXzpkJlSP6Hm2girqPQvNsp7YMX/J4U5fkm6AeMbqeo9TgWhLALQ9aJi SSDg== X-Gm-Message-State: AOJu0YxzSsv69VDGzXOl71CiM2iBk61/WJBDfyMxNPi351vkOeTSePHM TnrJ/7p16ochSf2tSFxK26Uzmn6N4fKTfKUKfjLBaxhEjv6os3s0AT4D8aJ5bS/Ao6RUAZCQs9l qJ0QOzFU= X-Gm-Gg: ATEYQzy5o+euqmmlqIpJATFQslFqA9SRihRUoEIlaIgWAvndcSTTYQr0WNRdezqsQzy 09Q9uUiRyRwNctD+fpM/GE4+2qEc+Q4UGTzkIMYEqCuP+jsJv4iT2Goh0dbexjdodarplH31D// XgYsyyCFsG0KCB34NqM66WNPo4ZCMcs7UCT5KTvyMA3n8NTVbVgihlJnHZowhvyQAkDXBR1N7CS rlThPXZZvU/pqFtx/xKl4lBHVv6J9Z8n8MgfWMCyNKJ6qNVYOqP7RYfhZ8LYtd/ho20L/omzY/N ZbKWhwqn5j4rB0CNeO7XhlxOBM4bcvjCD2o70mYmzAnlX/4OsCtbEeEL4QJ4O0C/Vre/IQAmSft HHeSOi1zGx4em+hNm/5lSrMPYhX/BxpBfinOwngTLOe9phjgttTNtUW+TsD6eprAwowNYwCmXXE AbABIo+iWUU19xdUOTbrFkhT/KARxZZPMmhGBK/xCUFKDLHVqj70ouxg3/84o9N7X09/CSUyRdC L/mARTTUvs= X-Received: by 2002:a05:600c:6094:b0:47e:e8de:7420 with SMTP id 5b1f17b1804b1-483a962f0c5mr282797695e9.22.1772061668856; Wed, 25 Feb 2026 15:21:08 -0800 (PST) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PULL 61/70] hw/scsi/disk: Prefer target_s390x() over qemu_arch_available() Date: Thu, 26 Feb 2026 00:14:01 +0100 Message-ID: <20260225231411.96482-62-philmd@linaro.org> X-Mailer: git-send-email 2.52.0 In-Reply-To: <20260225231411.96482-1-philmd@linaro.org> References: <20260225231411.96482-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: 1772061774004158500 qemu_arch_available() is used to check if a broadly available feature should be exposed to a particular set of target architectures. Here we only want to check something that is specific to s390x: the target_s390x() helper is more adapted. Besides, it will allow to reduce qemu_arch_available() scope. Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Pierrick Bouvier Reviewed-by: Thomas Huth Message-Id: <20260213175032.32121-4-philmd@linaro.org> --- hw/scsi/scsi-disk.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hw/scsi/scsi-disk.c b/hw/scsi/scsi-disk.c index 2f400f5b778..a5201855352 100644 --- a/hw/scsi/scsi-disk.c +++ b/hw/scsi/scsi-disk.c @@ -27,13 +27,13 @@ #include "qemu/module.h" #include "qemu/hw-version.h" #include "qemu/memalign.h" +#include "qemu/target-info.h" #include "hw/scsi/scsi.h" #include "migration/misc.h" #include "migration/qemu-file-types.h" #include "migration/vmstate.h" #include "hw/scsi/emulation.h" #include "scsi/constants.h" -#include "system/arch_init.h" #include "system/block-backend.h" #include "system/blockdev.h" #include "hw/block/block.h" @@ -3180,7 +3180,7 @@ static void scsi_property_add_specifics(DeviceClass *= dc) ObjectClass *oc =3D OBJECT_CLASS(dc); =20 /* The loadparm property is only supported on s390x */ - if (qemu_arch_available(QEMU_ARCH_S390X)) { + if (target_s390x()) { object_class_property_add_str(oc, "loadparm", scsi_property_get_loadparm, scsi_property_set_loadparm); --=20 2.52.0 From nobody Thu Apr 16 20:57:20 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=1772061826; cv=none; d=zohomail.com; s=zohoarc; b=AF3JdS3jTsUR9CQAe5wBO4KA7rKo9NhsdbfS/QTH5ECGSiiEiAgxmKPnw7o2jVhHerAQtYwpW7VGhTizCE9JqhEHYwwtDYJYJztNi/OEWe6PKiQCgVhpmFJ6PnZuW+di1O8ANOziODhhsBiiby+UTlwuemZ/9RcD8UYfBeYjwdg= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1772061826; h=Content-Type:Content-Transfer-Encoding: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:Cc; bh=RbWumpFxFwgmdfg77On7KTxRgoKNarNr0zHuzKc4adQ=; b=hGPNnisGv4rlqBokXJkMVLteV6GYxlHiN2/yrzq261kbO80saKaXc0TSUeYc/Lkm8KKrPO0ITTc9TbHcCcYZKtOvXGiE3aeFQDevBI3GX75KIv5ijID3zMdtm1BMEglwCQcIwlWU38AFNhKW888hC4C7UEsraFGEQ6lNZjOZkbo= 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 1772061826383952.5930756004374; Wed, 25 Feb 2026 15:23:46 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1vvOC0-00082s-EY; Wed, 25 Feb 2026 18:21:20 -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 1vvOBz-000821-Dn for qemu-devel@nongnu.org; Wed, 25 Feb 2026 18:21:19 -0500 Received: from mail-wr1-x42b.google.com ([2a00:1450:4864:20::42b]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1vvOBx-0004Ky-IW for qemu-devel@nongnu.org; Wed, 25 Feb 2026 18:21:19 -0500 Received: by mail-wr1-x42b.google.com with SMTP id ffacd0b85a97d-4398f8e2837so215282f8f.1 for ; Wed, 25 Feb 2026 15:21:16 -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-43970d401aasm35842235f8f.23.2026.02.25.15.21.14 for (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Wed, 25 Feb 2026 15:21:14 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1772061675; x=1772666475; 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=RbWumpFxFwgmdfg77On7KTxRgoKNarNr0zHuzKc4adQ=; b=JHtf2Gi8RyINaWQeBFgRcMs4vOsLhndoc39KNS6GC70bD97g2yelXI1bdx0oy8AqJt pC8ipXMNcq9KC6UKQPWuYeZHZBs4MVHPzj0904bqzRsW5SJVRF1xbQaEZa9QpR0EvmDJ ps1SPzj2dhAxGrgQvbasGt04jLWHAzuvw+3it93i5UiM1bdIU5hW60JbhGINV260xLBF 8tuEOS+7p/O/EC4Pp1YU7zO46PKBDK9sx8uUTNw8z87c8rOw6+D9zr+hvAI1ARGP1QOt mcjRyKqs68YYUAhhXa7GqYpQz/oTK35E1uqbPIz2tpAWunqTJ4su7b8gD9KE/3uwmZqr gySg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1772061675; x=1772666475; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-gg:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to; bh=RbWumpFxFwgmdfg77On7KTxRgoKNarNr0zHuzKc4adQ=; b=d+38gTOiynWRXkJCUQ/zAHjFj6kZ2DF/R0Qgg15wEITUkDOHTvLxnNMN461L5rQWV8 ZiKlIRxhHLPMdIHL2eRGg7zxEtbU4PYXKfWaS2sNSOkjDq1NqoUUgswlgIpIHkOdsFM5 higtdyn3T1eIJKLa0MGEEbYhYBFxXh4LStnbXUYGrTPmI5fxAxxnr9SnGghOmE1j+MQh dAfqpjVZNGv1DzgRNjZ77U1tDFjxCqeGYR6rIK+tLU3oGtJhh+zIQbx4gvvNIThSEapO jf0zoBwJm9Q9h/WFexm1LXYnsXSMqpIA4AtqMrEbndN54v8VbzzW6y8tOwn5pBW1FC9p c89g== X-Gm-Message-State: AOJu0Yw7CbGSMp/abQRJsf8qHJYZXCbndEz3OAggZdvNWfPMXP/N0exL vVoezgLR7SwvJpLwuJv8AH7nfSoaeiFCyLfhV04lIid8onYEel76TtJGAbuxsRQ86O1N1/4V2Am WK7IL6/k= X-Gm-Gg: ATEYQzyOffRBIcbSC74scy+kYwMBeufVHhkOh3JgRf1DBP/BORsZyk4yf+CJMQp/FHg MVCWJVt9EB5QgB7UWY+lYdBcDo0GM5QB1YysprsBr+P102ofizy239FZq07c9Ryiwv6N5w2h9S9 3EtGhrbz+Q2s0ZLnFEmz0+I6+GmbiclQVPtKh9GxiAn4GvYD/w34u2eK4Al7uY+AQkFtLxsgVLM 4Zl9Hf8GEx/+7DKbWQcEp6muPc/WOYW7rrkqnBL1LEUhjIqj9XbSRP1YbJfBoyjODIhHQzMzRCv 8VDVhGQbG8XLkHVeSXCpsFKsZfiLk41FYC01Y5j2MDk3ioHDsuWpyN+TRh6PppkqcLMQHG0+Us9 LxMrCoX1jKv0JytYUjYpCL8Py7JWXzrPhXWNEx3ue0QwoR54qmX+rzJswimYicmQgowTX6zLX/w F9uKVx/VDo5Ufp81AkdEW7t3rbZ4whaBqy9UfIt0ly+spIFaYDG84bJT21o+Hs5RHLaCnvs+K9 X-Received: by 2002:a05:6000:1861:b0:431:62:d946 with SMTP id ffacd0b85a97d-4396f15c4c8mr32379980f8f.23.1772061675300; Wed, 25 Feb 2026 15:21:15 -0800 (PST) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PULL 62/70] system: Make qemu_arch_available() common code Date: Thu, 26 Feb 2026 00:14:02 +0100 Message-ID: <20260225231411.96482-63-philmd@linaro.org> X-Mailer: git-send-email 2.52.0 In-Reply-To: <20260225231411.96482-1-philmd@linaro.org> References: <20260225231411.96482-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::42b; envelope-from=philmd@linaro.org; helo=mail-wr1-x42b.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: 1772061828278158501 Remove the need of per-target QEMU_ARCH. Define the QEMU_ARCH_* constants based on SYS_EMU_TARGET_* ones, themselves already exposed via target_arch(), allowing to check the current target is included in @arch_bitmask. Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Pierrick Bouvier Reviewed-by: Thomas Huth Message-Id: <20260213175032.32121-5-philmd@linaro.org> --- meson.build | 2 -- include/system/arch_init.h | 54 ++++++++++++++++++++++++-------------- system/arch_init.c | 4 ++- system/meson.build | 5 +--- 4 files changed, 38 insertions(+), 27 deletions(-) diff --git a/meson.build b/meson.build index 59c8204d881..4eeef552748 100644 --- a/meson.build +++ b/meson.build @@ -3375,8 +3375,6 @@ foreach target : target_dirs config_target_data.set(k, v) endif endforeach - config_target_data.set('QEMU_ARCH', - 'QEMU_ARCH_' + config_target['TARGET_BASE_ARCH'].= to_upper()) config_target_h +=3D {target: configure_file(output: target + '-config-t= arget.h', configuration: config_targe= t_data)} =20 diff --git a/include/system/arch_init.h b/include/system/arch_init.h index 92d50ba8d63..bb17d18a2b5 100644 --- a/include/system/arch_init.h +++ b/include/system/arch_init.h @@ -1,30 +1,44 @@ #ifndef QEMU_ARCH_INIT_H #define QEMU_ARCH_INIT_H =20 +#include "qapi/qapi-types-machine.h" =20 enum { - QEMU_ARCH_ALL =3D -1, - QEMU_ARCH_ALPHA =3D (1 << 0), - QEMU_ARCH_ARM =3D (1 << 1), - QEMU_ARCH_I386 =3D (1 << 3), - QEMU_ARCH_M68K =3D (1 << 4), - QEMU_ARCH_MICROBLAZE =3D (1 << 6), - QEMU_ARCH_MIPS =3D (1 << 7), - QEMU_ARCH_PPC =3D (1 << 8), - QEMU_ARCH_S390X =3D (1 << 9), - QEMU_ARCH_SH4 =3D (1 << 10), - QEMU_ARCH_SPARC =3D (1 << 11), - QEMU_ARCH_XTENSA =3D (1 << 12), - QEMU_ARCH_OR1K =3D (1 << 13), - QEMU_ARCH_TRICORE =3D (1 << 16), - QEMU_ARCH_HPPA =3D (1 << 18), - QEMU_ARCH_RISCV =3D (1 << 19), - QEMU_ARCH_RX =3D (1 << 20), - QEMU_ARCH_AVR =3D (1 << 21), - QEMU_ARCH_HEXAGON =3D (1 << 22), - QEMU_ARCH_LOONGARCH =3D (1 << 23), + QEMU_ARCH_ALPHA =3D (1UL << SYS_EMU_TARGET_ALPHA), + QEMU_ARCH_ARM =3D (1UL << SYS_EMU_TARGET_ARM) | + (1UL << SYS_EMU_TARGET_AARCH64), + QEMU_ARCH_I386 =3D (1UL << SYS_EMU_TARGET_I386) | + (1UL << SYS_EMU_TARGET_X86_64), + QEMU_ARCH_M68K =3D (1UL << SYS_EMU_TARGET_M68K), + QEMU_ARCH_MICROBLAZE =3D (1UL << SYS_EMU_TARGET_MICROBLAZE) | + (1UL << SYS_EMU_TARGET_MICROBLAZEEL), + QEMU_ARCH_MIPS =3D (1UL << SYS_EMU_TARGET_MIPS) | + (1UL << SYS_EMU_TARGET_MIPSEL) | + (1UL << SYS_EMU_TARGET_MIPS64) | + (1UL << SYS_EMU_TARGET_MIPS64EL), + QEMU_ARCH_PPC =3D (1UL << SYS_EMU_TARGET_PPC) | + (1UL << SYS_EMU_TARGET_PPC64), + QEMU_ARCH_S390X =3D (1UL << SYS_EMU_TARGET_S390X), + QEMU_ARCH_SH4 =3D (1UL << SYS_EMU_TARGET_SH4) | + (1UL << SYS_EMU_TARGET_SH4EB), + QEMU_ARCH_SPARC =3D (1UL << SYS_EMU_TARGET_SPARC) | + (1UL << SYS_EMU_TARGET_SPARC64), + QEMU_ARCH_XTENSA =3D (1UL << SYS_EMU_TARGET_XTENSA) | + (1UL << SYS_EMU_TARGET_XTENSAEB), + QEMU_ARCH_OR1K =3D (1UL << SYS_EMU_TARGET_OR1K), + QEMU_ARCH_TRICORE =3D (1UL << SYS_EMU_TARGET_TRICORE), + QEMU_ARCH_HPPA =3D (1UL << SYS_EMU_TARGET_HPPA), + QEMU_ARCH_RISCV =3D (1UL << SYS_EMU_TARGET_RISCV32) | + (1UL << SYS_EMU_TARGET_RISCV64), + QEMU_ARCH_RX =3D (1UL << SYS_EMU_TARGET_RX), + QEMU_ARCH_AVR =3D (1UL << SYS_EMU_TARGET_AVR), + QEMU_ARCH_HEXAGON =3D (1UL << SYS_EMU_TARGET_HEXAGON), + QEMU_ARCH_LOONGARCH =3D (1UL << SYS_EMU_TARGET_LOONGARCH64), + QEMU_ARCH_ALL =3D UINT32_MAX, }; =20 +QEMU_BUILD_BUG_ON(SYS_EMU_TARGET__MAX > 32); + /** * qemu_arch_available: * @arch_bitmask: bitmask of QEMU_ARCH_* constants diff --git a/system/arch_init.c b/system/arch_init.c index ec9e45a1a80..604d5909ed0 100644 --- a/system/arch_init.c +++ b/system/arch_init.c @@ -23,8 +23,10 @@ */ #include "qemu/osdep.h" #include "system/arch_init.h" +#include "qemu/bitops.h" +#include "qemu/target-info-qapi.h" =20 bool qemu_arch_available(uint32_t arch_bitmask) { - return arch_bitmask & QEMU_ARCH; + return extract32(arch_bitmask, target_arch(), 1); } diff --git a/system/meson.build b/system/meson.build index 035f0ae7de4..579e8353d53 100644 --- a/system/meson.build +++ b/system/meson.build @@ -1,12 +1,9 @@ -specific_ss.add(when: 'CONFIG_SYSTEM_ONLY', if_true: [files( - 'arch_init.c', -)]) - system_ss.add(files( 'vl.c', ), sdl, libpmem, libdaxctl) =20 system_ss.add(files( + 'arch_init.c', 'balloon.c', 'bootdevice.c', 'cpus.c', --=20 2.52.0 From nobody Thu Apr 16 20:57:20 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=1772061776; cv=none; d=zohomail.com; s=zohoarc; b=hEpedFT9I/laqpLV+abhrDUYWbZlZitdciQ+GoyzndmAsMj+Z/QAtGj9D5IOnziT8wRfNQzIemhOBvvetMbX1J90qglHeMLwvcA1ynS4ObL2dh+m4sLjo7xCkRGbFh/yjd9pBf6UHLAeG1UKoSR/DREP0+t8wVSNhBRxGM5iUeI= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1772061776; h=Content-Type:Content-Transfer-Encoding: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:Cc; bh=Zq49UqUamgmlzp204m0FNL5ioC8LH/gIGw7R+uH3vZU=; b=bWX1SSSwRki02cW5KDTIYJ7gpvCMXQNpWXBupxcXh8HqvlTXGE/YAlwru0Kcl2j6wOrgzzVLv5Us84fLnfEHFm++AkB68sTqGgrizEle3vC8WGn/EXDTFTAOl31Ya1sAKMU7O5SffVmHcocJoAgULtftmDUM+zWcgyalo7eWfjs= 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 1772061776662110.56519429063792; Wed, 25 Feb 2026 15:22:56 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1vvOC8-00084J-W4; Wed, 25 Feb 2026 18:21:29 -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 1vvOC6-00083w-EG for qemu-devel@nongnu.org; Wed, 25 Feb 2026 18:21:26 -0500 Received: from mail-wm1-x32e.google.com ([2a00:1450:4864:20::32e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1vvOC4-0004LS-Aj for qemu-devel@nongnu.org; Wed, 25 Feb 2026 18:21:26 -0500 Received: by mail-wm1-x32e.google.com with SMTP id 5b1f17b1804b1-48374014a77so2778325e9.3 for ; Wed, 25 Feb 2026 15:21:23 -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-43987f3ed03sm16958080f8f.16.2026.02.25.15.21.21 for (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Wed, 25 Feb 2026 15:21:21 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1772061682; x=1772666482; 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=Zq49UqUamgmlzp204m0FNL5ioC8LH/gIGw7R+uH3vZU=; b=DwLRNR3cHQAJ+JJxtBvT8CBy9XjwAQygjUfjQl+1IfI12u/QArp9EceLD0FdzS+ftp WeHj1Z/GNAbDfKhy7xdpiJYlCVxjhSlIlm2qz8dYxyVWYEiex2wpntHtw0vIULaPBvdc RE5+x9apZWCPQ1iEkEW8Uy8vOkSPREbe0TULDG4UBaal1qti0GgpkRMxyvdffSG8vanW oVjC51jDLVRFsufLH8Dz9HTt9USi1KpdsYay3eTyvbfBZ+WCYvC9u4fEyf7xtxHuv6O3 HF+DFFJlMuomBRzc4IOOu8DQdoQVrZJaD1H9rjRlOpn7pTf5JyZwT2xmyaDn5p7pliC/ +mOA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1772061682; x=1772666482; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-gg:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to; bh=Zq49UqUamgmlzp204m0FNL5ioC8LH/gIGw7R+uH3vZU=; b=oXdoCp1Q77TfMN6heXCp9SrzEqgX6ZiXvqJKkucJP3Tzm2X7fNfpn05dVzXj9vibdc QK674kG6F0Zjeq7uutgavCmQkT7JePNReiVTDppSt9tCwS1x4pvDAiBDaK4MV2GneFma sGWYBzngbX2sR60YA/vWw5mcOVjVt0T+iJMNPaiTLYYySVpbUjWNY/lbKvvNa39jTLl2 /1Qpv26PXjv2Ml7UQbM4HMcCz2zI/+l2UE0mJmUB4FFxoIa8ar7KV6s9wrnk7PP25bqv HmH6Cwxhc3nESjn6wq4O2x+9pTRi5g6P696k9AB9LserMYV++2XCJgVoFX6EOftyOSdz asCA== X-Gm-Message-State: AOJu0YxhXBvysfn0nH7eSSdEyHSMsbSn32NVS0dM55piGaCuCz9yEPeS BcI0ga3GaxuXr3YGbk5I2CWJOcHRBG3c4JQdgOyezGEzApwsqqeS4VOQJ9JnE4UKDXyA+E4HD3F zWG9P4ts= X-Gm-Gg: ATEYQzw8YnDndsg2tZgZtWPQpbRpkyUzgiSbHCG/07KK/sPwKoILSHNmRUUykGldW0c aZSjLgr4bVbVS/QXMUk/2jf60Mh1A8BAiPTnfEh+ciGd/TgOLOHc6TdCbBQtFGPY9NcZ44nseoe BMFHOd9aaWXh4uNU4DmFfQRwbxUldAwowVT1Q4o4cju+yHRi+i3/0oY5Kl2BwrEeZoqXPcbdWaO x8TBwx+DxahwVxyFxYJS9gyY2o1B5pCy1OR0E0tClxmBClUaOh0+goMRc801JLpKbcXXgi7BVCP vPIvS5K7vwx+AI5MUslIKyvibtkwQJwHXqc3Zn20TtsxfMaJ5WfTsBNMhAAa9tF14v936y0tBmM cuYdTn4jRu6pkIOKjrMvwCpd1huEJETnzhllYiT31aq71trQ1RVq+bAqgbS3LHLdBhq2lSh4Hm9 q67OwX73l97Zh3G0GMZ3t7d44EI8xwRgUtsPyM9sltScHNkAOfSFLTrdX5GASVFB+95BIi64wx X-Received: by 2002:a05:600c:37cc:b0:47e:e20e:bbbe with SMTP id 5b1f17b1804b1-483a95e9b65mr291185645e9.25.1772061681711; Wed, 25 Feb 2026 15:21:21 -0800 (PST) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PULL 63/70] system: Reduce 'arch_init.h' scope Date: Thu, 26 Feb 2026 00:14:03 +0100 Message-ID: <20260225231411.96482-64-philmd@linaro.org> X-Mailer: git-send-email 2.52.0 In-Reply-To: <20260225231411.96482-1-philmd@linaro.org> References: <20260225231411.96482-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::32e; envelope-from=philmd@linaro.org; helo=mail-wm1-x32e.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: 1772061777977158500 Better to restrict qemu_arch_available() scope so it is only used by generic system/ code to parse command line options. Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Pierrick Bouvier Reviewed-by: Thomas Huth Message-Id: <20260213175032.32121-6-philmd@linaro.org> --- {include/system =3D> system}/arch_init.h | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename {include/system =3D> system}/arch_init.h (100%) diff --git a/include/system/arch_init.h b/system/arch_init.h similarity index 100% rename from include/system/arch_init.h rename to system/arch_init.h --=20 2.52.0 From nobody Thu Apr 16 20:57:20 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=1772061806; cv=none; d=zohomail.com; s=zohoarc; b=PyZ48imxFgpei66rh5HW7ejSW5AvbU025MOSuj6FrkReQjDiHXywibtnMsGmG8fdUAleQjLXfobqW45rCfaregB1X7PdW8ixKoCF3p90gGuxtCM7I3BwiPMkfbvEnDIua103mVRRvdslsaDJbe/RMiWjAc64nhiA8k0DDCdRBYE= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1772061806; h=Content-Type:Content-Transfer-Encoding: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:Cc; bh=dM94jWZifp9IDQaSplzseZaqejpVI8KTowyEc2hsd/c=; b=F5yj1ZxlS5B5/irtzWlZMoqShym7D0fVb8XHT/DbX9cStZ/UHoGD0zpvh+i9cz76s1tVpRF9PH0wj0Gn8pdUPMaA12S6BYPK+B0977Gi1EqECeI6zDtt3eIj1+nX8JI8h6nbx0d9MtUHZaKqfu8AS+aseScOEcspXgIzRIE4KyI= 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 1772061806653457.80017040193013; Wed, 25 Feb 2026 15:23:26 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1vvOCD-000855-GF; Wed, 25 Feb 2026 18:21: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 1vvOCB-00084n-U4 for qemu-devel@nongnu.org; Wed, 25 Feb 2026 18:21:31 -0500 Received: from mail-wr1-x433.google.com ([2a00:1450:4864:20::433]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1vvOCA-0004Lq-4u for qemu-devel@nongnu.org; Wed, 25 Feb 2026 18:21:31 -0500 Received: by mail-wr1-x433.google.com with SMTP id ffacd0b85a97d-436309f1ad7so167182f8f.3 for ; Wed, 25 Feb 2026 15:21: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 ffacd0b85a97d-43970d4c95dsm41138838f8f.33.2026.02.25.15.21.27 for (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Wed, 25 Feb 2026 15:21:27 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1772061688; x=1772666488; 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=dM94jWZifp9IDQaSplzseZaqejpVI8KTowyEc2hsd/c=; b=RG8dTG99BBVLgLplTSmrnWxsBT6XN2PMQOjMYfI+SHow4RtB2ALloqmI5XIcJaLmaU Psxj6yePt/t989hp7k4UheOwdBrA8pAChTyihpSxl4EfFPIjUjG1PY6Fv3dBpTYFEDz6 j2rfds54em6rKCxdN3ENZGUL71oU3I9wqh4MN9zWhcBsJP0tuE0FL3ehrLJxuAQpR8xB pZHQ9GAHgZa8n0FhGivkAFz/LcTdlh6obW+Sd/H6Tu8/Tsj50uZGGGoX6UVUqJWnaag6 k38fHAXPAiiodE4OD5PJfxnWFNVMdZpB9n+BW0xjEUSgquA4hzK2FfT1+HJz2inTz1g0 +DPQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1772061688; x=1772666488; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-gg:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to; bh=dM94jWZifp9IDQaSplzseZaqejpVI8KTowyEc2hsd/c=; b=nqHx9zAKYzW24wZisP8lVJ4p1l5r9osYxeEf6KeogAOTYyp3UJ1bONOc6RNEfnSgmX e+i9lHTFWhdN8Eny9vJxQlpAEb0a+u6Q7K2OM7MqtzHCDgr5KzB2bf/4DcwUIJX3ald6 txucRmxbuwV3Xq3BeNd/jkW1jIkMjRxVd9nLGDaQr4K5ydKlhFVuR0PgpP3/G0eAsPbh RBqv/EfuLcPjmyQGT2HeSb9rSFYBM0LYtm7GZ7u5UB7qty3RtAZsUhJa73T9zVshzAuF tRDjpCvhS2V0cIcM7HnBRl9TInlVbYRpmOo/iZEQDmnU1Mw7fjoujKA8YlaC8AgHKe6i WHLA== X-Gm-Message-State: AOJu0YyugRljgurREH8QSd0sCPCAfGq70posZuWfxJXngEsc/e4t3X1N WvY8AiuXqDaXVAkntoKpueiCZOi0OBWFQjXopue2rCuICOQifNHKC8QcfyfvhHtLVwjfSFFIwHw yk4Vj+OE= X-Gm-Gg: ATEYQzy92Mkl+obCQTvAYJdvJkWg6fEVBPznnY6HG0+MwaYpEgUpzpmLhOpcBtN5cml ObvzYI9M5zP/u9rbbyzjt62ZhH7ROUrQOw6u7pOa3wmSBNRJ9tWR0y76xHP/5W3XIMHUhG/tT99 c9aEll3BtM6mNjLaqAE156woGSGJRuUtrmuzwvUCeVUieYZ6xinfOnd1pn/yCzBde7W0s9wwGFf ecmSsA4Ar8F0yAFKJSZ5N0kk6QQ1xZ/9Mon3UysU+BSFSus1mXQrC87m6FPpqz2IP/vsGrdxqI3 gq+rOGqQae+bkSzFiqqSy0n8t/vI7yT9tor+r+7FCE6Sb81u+jfEmSuZu44yDCq7BqLrg76hn86 e5IZaroHOGrEX4unfncsM5PBDncEYvtGyWFgB2rNzhoal8MHMBIkjYs69XIsMHEZRFgCwUF+o5Z yG7M3Lh02RgffbyFlskgMkR41uYsjTe9Q4TdgGfYPhirTwmzNlFqvGHFcA0Ai1jx4jIH37df9M X-Received: by 2002:a5d:64c6:0:b0:435:b755:c67e with SMTP id ffacd0b85a97d-439942fbd3cmr4320378f8f.49.1772061688069; Wed, 25 Feb 2026 15:21:28 -0800 (PST) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PULL 64/70] meson: don't access 'cxx' object without checking cpp lang Date: Thu, 26 Feb 2026 00:14:04 +0100 Message-ID: <20260225231411.96482-65-philmd@linaro.org> X-Mailer: git-send-email 2.52.0 In-Reply-To: <20260225231411.96482-1-philmd@linaro.org> References: <20260225231411.96482-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::433; envelope-from=philmd@linaro.org; helo=mail-wr1-x433.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: 1772061808109158500 From: Daniel P. Berrang=C3=A9 Signed-off-by: Daniel P. Berrang=C3=A9 Reviewed-by: Pierrick Bouvier Acked-by: Paolo Bonzini Message-ID: <20260210173355.776365-1-berrange@redhat.com> Signed-off-by: Philippe Mathieu-Daud=C3=A9 --- meson.build | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meson.build b/meson.build index 4eeef552748..d9a17eeefd3 100644 --- a/meson.build +++ b/meson.build @@ -3200,7 +3200,7 @@ if host_os =3D=3D 'windows' endif =20 # Detect if ConvertStringToBSTR has been defined in _com_util namespace -if host_os =3D=3D 'windows' +if host_os =3D=3D 'windows' and 'cpp' in all_languages has_convert_string_to_bstr =3D cxx.links(''' #include int main() { --=20 2.52.0 From nobody Thu Apr 16 20:57:20 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=1772061933; cv=none; d=zohomail.com; s=zohoarc; b=X6Z/4bRCcWZl4caq6lZ8cHn++7f8pTyFVDsCrVHSVZXJYEIs6Ljhm2pNeJhcJzwGhQY/mVShrWEWmeFOx/WxtR2MsHJ+Q8dPi2v+Wc7j+r10QopvoikfHdHsgiBuLBzEeLyGG3ZRQJvm20LCINo9MYFwcHUI5XLKz5F8gcAKZ7w= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1772061933; h=Content-Type:Content-Transfer-Encoding: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:Cc; bh=+ARdIpARQ3lv1qJ8PgJ5wSqMR0eYFxZ0UZbHfUFLSJ4=; b=l5lgFyperWvdcjpl6bgrfGElutwos2eML2Nr0GJRTKsbJQZUJGoXQyEByDf+32NPJUYVpfQzQYOsF6HSWFPbJ/B7KGFAmE9g5EniAdeB/N8ciVCEqbeLZYT9ixR3OWuA1Tf7Rc6gfAM1vZDAdUXEO7nfCcPiy/jhw/dw1Z/wA3g= 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 1772061933454644.3160100330156; Wed, 25 Feb 2026 15:25:33 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1vvOCJ-00087w-Jg; Wed, 25 Feb 2026 18:21:39 -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 1vvOCH-00085k-V1 for qemu-devel@nongnu.org; Wed, 25 Feb 2026 18:21:37 -0500 Received: from mail-wm1-x332.google.com ([2a00:1450:4864:20::332]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1vvOCG-0004MS-Ds for qemu-devel@nongnu.org; Wed, 25 Feb 2026 18:21:37 -0500 Received: by mail-wm1-x332.google.com with SMTP id 5b1f17b1804b1-48334ee0aeaso2360305e9.1 for ; Wed, 25 Feb 2026 15:21: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 5b1f17b1804b1-483c3b770e7sm4535055e9.9.2026.02.25.15.21.33 for (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Wed, 25 Feb 2026 15:21:34 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1772061695; x=1772666495; 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=+ARdIpARQ3lv1qJ8PgJ5wSqMR0eYFxZ0UZbHfUFLSJ4=; b=gLkpfFDxNZOzqmKc/iMEr/jhVB4fSqG53HuYFWLeMGDDsaUDIL72BHVc/PU6DFxwVn FaGG5VVw9zl61RuLA3pLhBjn8srJOIHe1lSQ0o7sB2NU54O2e2hhcrQpCTR9KJorygHe xmfBxlIOXhQvEZ4VSR/pUm15otJYhN1YwasYTAKeGWf8JHbccUpaTUH1WXFMEk9HSrAQ qZ1cYtLgkSJEAPbftUYwVOWwAWWr1rWpe+syLm02XoT4IVUgbjClbvBX1CdPJak5QIXo guj05aaEmmrDKkmqLpWNLorIMrdnXamI5IDMkPkFCzr7yYn3j/WVBaKSAgg7i/RDxvTE J04g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1772061695; x=1772666495; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-gg:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to; bh=+ARdIpARQ3lv1qJ8PgJ5wSqMR0eYFxZ0UZbHfUFLSJ4=; b=wbJSWnw9M2RfX+SEbaMNFVHHBQlQrED7rqi6Ql/LuJzFvh9tDFB5TocdqqOSL4tP5u npQy1FtWRMffI8X6LavrPC8iKZPs9udxSFJ+cZnpYARCySE+1ttwnT8ZmuSZgUyKt/JL 8Z0LWvYRbSe7BL1/k53LybyNF43ogrsfCwmJagc8HZTMEnYYyJD5IQRcIX50f+jVQfRa 0qqIU0A1x4RIQLU3fY39wZuegGrQ1xt/lB0lJxjFgv+Nnv3M//qpPYUP4t/0V6UcMpdi AGIo/35BI0G7k/TZMWkHufTyjPPYkNQtWkxJWluRs4ueVJUMHgKXEmMrwaTy4YCW0dRR mMbg== X-Gm-Message-State: AOJu0YztyBlKHXvS7zpPUJWe+z4MMwTWy2OzqeoMC2WpmGmYtVml5v7q 2qEGs84nYgyUrzps4yNYHFPRtWrynD/G0Fjd5v1REGHhfMXhJQ1dtz+DzJAb766CVx3Bt0il5Zy 1wIiK1bM= X-Gm-Gg: ATEYQzxOPJUyasQPu7oqsjpNpIMAAQ4ti6ofKMhVqVRMPv2z4JiTBxdKIBN+IftKp+h RdmLZzJDf7Ru6NEIH/EGY7jTP3qQ4C47sOi8fJG59MyhsUOVg+O8dxRW+ru9M1rFHMMJ//f/f4b Ygis67LB8AuL9p/VV0iqYNyKyZFveOXtnQuLrUdwbyvfW6xRbRSmp116hvAkLHAwU6zoEEA5rD/ 9jSciTh+hb6OBGSA+LiUS2wa7X7ch59jMsI9BZeyXYOLRbAy2Nn9RfEKAg6oF5fwT+ScvFntsRC d+SHQnPt8WbuBn19XbDhxVoY65QaloZJIpFT+O/26MTTWPK+sB2xr/LptketvSGtwtpN193/RGT vFtjwML5YnDwvtDOgpU0swmT9BIw59FAMh9Dso1eW1TXqNt5vq7wmU+uUAKfvJ3wzYl01G4fxjv HTiWW1YYB+1q4weFi2QMp+WRH34fJf5e4itSkoP11RXugLSMBwUWuXVZPEH6H+poK74Tq7gB1eX uYScrZFxMY= X-Received: by 2002:a05:600c:4e0f:b0:477:abea:9028 with SMTP id 5b1f17b1804b1-483c3db50abmr1442405e9.6.1772061694558; Wed, 25 Feb 2026 15:21:34 -0800 (PST) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PULL 65/70] page-vary: Expose TARGET_PAGE_BITS_MIN definition Date: Thu, 26 Feb 2026 00:14:05 +0100 Message-ID: <20260225231411.96482-66-philmd@linaro.org> X-Mailer: git-send-email 2.52.0 In-Reply-To: <20260225231411.96482-1-philmd@linaro.org> References: <20260225231411.96482-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::332; envelope-from=philmd@linaro.org; helo=mail-wm1-x332.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: 1772061934601158500 We'll use TARGET_PAGE_BITS_MIN in page-vary-common.c, so expose it via "exec/page-vary.h". Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Pierrick Bouvier Signed-off-by: Richard Henderson Message-ID: <20260213182713.44924-3-philmd@linaro.org> --- include/exec/page-vary.h | 14 ++++++++++++++ page-vary-target.c | 15 --------------- 2 files changed, 14 insertions(+), 15 deletions(-) diff --git a/include/exec/page-vary.h b/include/exec/page-vary.h index 101c25911c1..3c77689ca52 100644 --- a/include/exec/page-vary.h +++ b/include/exec/page-vary.h @@ -20,6 +20,20 @@ #ifndef EXEC_PAGE_VARY_H #define EXEC_PAGE_VARY_H =20 +/* + * For system mode, the minimum comes from the number of bits + * required for maximum alignment (6) and the number of bits + * required for TLB_FLAGS_MASK (3). + * + * For user mode, TARGET_PAGE_BITS_VARY is a hack to allow the target + * page size to match the host page size. Mostly, this reduces the + * ordinary target page size to run on a host with 4KiB pages (i.e. x86). + * There is no true minimum required by the implementation, but keep the + * same minimum as for system mode for sanity. + * See linux-user/mmap.c, mmap_h_lt_g and mmap_h_gt_g. + */ +#define TARGET_PAGE_BITS_MIN 9 + typedef struct { bool decided; int bits; diff --git a/page-vary-target.c b/page-vary-target.c index 49a32b4fe51..ab92da4539d 100644 --- a/page-vary-target.c +++ b/page-vary-target.c @@ -23,21 +23,6 @@ #include "exec/page-vary.h" #include "exec/target_page.h" =20 - -/* - * For system mode, the minimum comes from the number of bits - * required for maximum alignment (6) and the number of bits - * required for TLB_FLAGS_MASK (3). - * - * For user mode, TARGET_PAGE_BITS_VARY is a hack to allow the target - * page size to match the host page size. Mostly, this reduces the - * ordinary target page size to run on a host with 4KiB pages (i.e. x86). - * There is no true minimum required by the implementation, but keep the - * same minimum as for system mode for sanity. - * See linux-user/mmap.c, mmap_h_lt_g and mmap_h_gt_g. - */ -#define TARGET_PAGE_BITS_MIN 9 - #ifndef TARGET_PAGE_BITS_VARY QEMU_BUILD_BUG_ON(TARGET_PAGE_BITS < TARGET_PAGE_BITS_MIN); #endif --=20 2.52.0 From nobody Thu Apr 16 20:57:20 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=1772061840; cv=none; d=zohomail.com; s=zohoarc; b=f2B7jwBa/DYwXz2KUg6tQBCY3zw05dqlFMSUWCtWkazla0gre4+JOEHC+Y4xeCtIrM2oEa/FLVSiyV2koeNhDiwSTSGhPeLNzp1XS8STDHinO7+Xbcex3ftQPKb2wZmto1gcRIfodO6HzseYkJnIaD8wJ3MksYqZweGTbqHb8uI= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1772061840; h=Content-Type:Content-Transfer-Encoding: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:Cc; bh=3DLoTKLygsNC2czWhDSGu2a29ae0ql/RSaplYlZuvHA=; b=YrkLmHNsagsdF/dh64j32gHGAXSqOAo4Oww8QPGlgf2cDXQpCFJc3yHovo48YONfLUO16rofFPaIXaq4h6mA7kiT84dRUYBURr+rPOj2UoVF2rsFDgKgOVviz4gD5xlW6RufSQq+WgT+ILhcKTwFx4n3lvBtFHAd89ATSA4znF0= 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 1772061840334230.62019578969125; Wed, 25 Feb 2026 15:24:00 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1vvOCY-0008AU-B0; Wed, 25 Feb 2026 18:21:54 -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 1vvOCO-00089s-Um for qemu-devel@nongnu.org; Wed, 25 Feb 2026 18:21:44 -0500 Received: from mail-wr1-x42a.google.com ([2a00:1450:4864:20::42a]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1vvOCN-0004NF-1j for qemu-devel@nongnu.org; Wed, 25 Feb 2026 18:21:44 -0500 Received: by mail-wr1-x42a.google.com with SMTP id ffacd0b85a97d-43770c94dfaso201437f8f.2 for ; Wed, 25 Feb 2026 15:21:42 -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-43970d54a68sm40708097f8f.39.2026.02.25.15.21.40 for (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Wed, 25 Feb 2026 15:21:40 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1772061701; x=1772666501; 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=3DLoTKLygsNC2czWhDSGu2a29ae0ql/RSaplYlZuvHA=; b=UnLNldV+OtFrGK6UnjtD6EL3Bn99l8lQQbaEh8AWh3tXnVgoCmCWIeq/onrV+efxbp 58/dUh+g4wHZuFWipv3Zyo2v8INEMUH3i0bgCdJLJ5l3VKbcIocRl3o98bfnqKkZMe6L TQkZt61TM8k0MPb7NjJYD3f3HscJBAls6EfGSC7oBgJNsyOZjfzRTYrF1cLgo12ckNnT BZh4A5J6eA7tt/qu4w52WmbjtI1wY+WFLBuOZlQHyBNxNUkHuoBKQmCSvKR+2myaHZhJ u9gbe6AkWzk1vr7KjFml1zj6eLROeE12RVQeltkRMQXGwvrt5dwys0F3kjdgY6LF9JNC CkGQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1772061701; x=1772666501; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-gg:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to; bh=3DLoTKLygsNC2czWhDSGu2a29ae0ql/RSaplYlZuvHA=; b=CqYHhYMdgnN/3KOa1Qm5dT5paXX4AKBkQHFdh08EguPeGk469FvcziA/w5BtYZjNWS P47lHA4cMe/UAHEeLUn7sYqqEgzDv8otWNlWIDQ0B7z/pdx3eGzOZbUNHH5w9Rz6mmEs jkF+qhOz+aX5Fy5kZSYBycKwY4ajqxgy1Zef6uI4yZyKIqfphv8U/fm8Z1q4qirZUdAn gqxNi7hH2imcitkkk9fsikHV/fXrMdZqXVynEGNDEq0zeVqphQr8KuX7kvJIFyYJOSD+ G+d2NRYhjDe4lXqGs1RNmvp+8awXww+UHafXBFWHBoDDmY1h4DTDFHfEWW8klZQnYv13 uqKQ== X-Gm-Message-State: AOJu0Yx451ypExe4lwcRzBfJSdPu87Xb2iJTVItdxEk+QOnD7OnYKUfp g8VPiMuPNmS9r/7P8phBFloqkSuwAmisAtiuAC4MzNC9Ir5wWlEn0P/poUFw0FFMt3UzT1hMF41 tO3cs17U= X-Gm-Gg: ATEYQzx2VCssKz8bpseyRZF8urIihHiDrsWXHboozJkG2GjQfxRX+1/MtUuf72mv7FQ V3UfLl2GcIrR7z8gI+s7riwS5/0KYQDijraTYQ/7TqQZkC0hKYuE3pIYeluOQ4ZiSdhLMWB6285 Cjm2tMgVGWcnDK/4sWvV1OIHIpJPR75/fET1mociKXFVBc63w2P14YsAOL7yV7uouz+ZXgd+nRw CvbepqVP8IstWXJD6vSxJ6NdvmqHYXBtzVIc2keDn1c8vI6MNzEr+WvJgYQFIh7QEjuMraaX/a7 tFo9if2Qj3+/eAlH/k6bFuSTn4B710uDum8T/rrzXwC2JzOrd/fReIp2AJEotrWfiufCJc2NAUj 5CPH8bAwiF9GpBbgOmu7MFnKqxA6PbcEvTiKBzKpyhMmKfSH1HwaxOuqqosR13sELBdsalgWYNV qNC0gQh5UveK8uJKpl2nJkjbWRznbU5Y42E6+A/PHwH+GeT2cOvrcBn7PkXGdzwAKvp59uDntz X-Received: by 2002:a05:6000:290f:b0:439:5e4d:baa3 with SMTP id ffacd0b85a97d-43997ed6d8emr500527f8f.11.1772061701068; Wed, 25 Feb 2026 15:21:41 -0800 (PST) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PULL 66/70] target-info: Add page_bits_{init,vary} Date: Thu, 26 Feb 2026 00:14:06 +0100 Message-ID: <20260225231411.96482-67-philmd@linaro.org> X-Mailer: git-send-email 2.52.0 In-Reply-To: <20260225231411.96482-1-philmd@linaro.org> References: <20260225231411.96482-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::42a; envelope-from=philmd@linaro.org; helo=mail-wr1-x42a.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: 1772061842344158500 From: Richard Henderson Add two fields that will hold TARGET_PAGE_BITS, TARGET_PAGE_BITS_VARY, TARGET_PAGE_BITS_LEGACY. Signed-off-by: Richard Henderson Reviewed-by: Philippe Mathieu-Daud=C3=A9 Message-ID: <20260217095106.598486-3-richard.henderson@linaro.org> Signed-off-by: Philippe Mathieu-Daud=C3=A9 --- include/qemu/target-info-impl.h | 7 +++++++ configs/targets/aarch64-softmmu.c | 3 +++ configs/targets/arm-softmmu.c | 3 +++ target-info-stub.c | 9 +++++++++ 4 files changed, 22 insertions(+) diff --git a/include/qemu/target-info-impl.h b/include/qemu/target-info-imp= l.h index e446585bf53..c917d546eab 100644 --- a/include/qemu/target-info-impl.h +++ b/include/qemu/target-info-impl.h @@ -25,6 +25,13 @@ typedef struct TargetInfo { const char *machine_typename; /* related to TARGET_BIG_ENDIAN definition */ EndianMode endianness; + /* + * runtime equivalent of + * TARGET_PAGE_BITS_VARY ? TARGET_PAGE_BITS_LEGACY : TARGET_PAGE_BITS + */ + unsigned page_bits_init; + /* runtime equivalent of TARGET_PAGE_BITS_VARY definition */ + bool page_bits_vary; } TargetInfo; =20 /** diff --git a/configs/targets/aarch64-softmmu.c b/configs/targets/aarch64-so= ftmmu.c index 4e1e2f64da1..82ccb575759 100644 --- a/configs/targets/aarch64-softmmu.c +++ b/configs/targets/aarch64-softmmu.c @@ -10,6 +10,7 @@ #include "qemu/target-info-impl.h" #include "hw/arm/machines-qom.h" #include "target/arm/cpu-qom.h" +#include "target/arm/cpu-param.h" =20 static const TargetInfo target_info_aarch64_system =3D { .target_name =3D "aarch64", @@ -18,6 +19,8 @@ static const TargetInfo target_info_aarch64_system =3D { .cpu_type =3D TYPE_ARM_CPU, .machine_typename =3D TYPE_TARGET_AARCH64_MACHINE, .endianness =3D ENDIAN_MODE_LITTLE, + .page_bits_vary =3D true, + .page_bits_init =3D TARGET_PAGE_BITS_LEGACY, }; =20 const TargetInfo *target_info(void) diff --git a/configs/targets/arm-softmmu.c b/configs/targets/arm-softmmu.c index 9b3fdd2854a..18940e51e55 100644 --- a/configs/targets/arm-softmmu.c +++ b/configs/targets/arm-softmmu.c @@ -10,6 +10,7 @@ #include "qemu/target-info-impl.h" #include "hw/arm/machines-qom.h" #include "target/arm/cpu-qom.h" +#include "target/arm/cpu-param.h" =20 static const TargetInfo target_info_arm_system =3D { .target_name =3D "arm", @@ -18,6 +19,8 @@ static const TargetInfo target_info_arm_system =3D { .cpu_type =3D TYPE_ARM_CPU, .machine_typename =3D TYPE_TARGET_ARM_MACHINE, .endianness =3D ENDIAN_MODE_LITTLE, + .page_bits_vary =3D true, + .page_bits_init =3D TARGET_PAGE_BITS_LEGACY, }; =20 const TargetInfo *target_info(void) diff --git a/target-info-stub.c b/target-info-stub.c index 65220cc7820..896f16e582b 100644 --- a/target-info-stub.c +++ b/target-info-stub.c @@ -23,6 +23,15 @@ static const TargetInfo target_info_stub =3D { .cpu_type =3D CPU_RESOLVING_TYPE, .machine_typename =3D TYPE_MACHINE, .endianness =3D TARGET_BIG_ENDIAN ? ENDIAN_MODE_BIG : ENDIAN_MODE_LITT= LE, +#ifdef TARGET_PAGE_BITS_VARY + .page_bits_vary =3D true, +# ifdef TARGET_PAGE_BITS_LEGACY + .page_bits_init =3D TARGET_PAGE_BITS_LEGACY, +# endif +#else + .page_bits_vary =3D false, + .page_bits_init =3D TARGET_PAGE_BITS, +#endif }; =20 const TargetInfo *target_info(void) --=20 2.52.0 From nobody Thu Apr 16 20:57:20 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=1772061807; cv=none; d=zohomail.com; s=zohoarc; b=FVFu4p2eJFiOJGRv9dP0kc8OOuynJRwQf5KU+7t18YwFhjbQ6xTvf4e21rJWKbfIIk4t87R4q/0oYX82FQ2dkETGJnKkja7YKLSxCXM1IUkDisf/dkhgs+y2OOZF0jYWqILpsOTYweqQN7VZ4uRzl4KCwPIX6oyIy5Ahu7cjEo4= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1772061807; h=Content-Type:Content-Transfer-Encoding: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:Cc; bh=y3Jc9cBiP93i40JuMbC0QlECSRh9zM7TqGGi/psNBgc=; b=iTsEEYZW+z5SZ9W7/bysc4U0t43MhrNbbXFLNJu4DUfV1hKUhOSpCsCcy92OBd1gh3j5Sf5GOdCvPNAhF3a5797H4upiSs2N3zTxBnepq151bN8zeSEfYyqRpBVU4/2YUy6R4f2w9fZRQrMP4vL8tCNE2AuiA/0OyW0GV8SsA/Q= 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 1772061807806764.6294961665336; Wed, 25 Feb 2026 15:23:27 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1vvOCa-0008Bh-Ir; Wed, 25 Feb 2026 18:21:56 -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 1vvOCV-0008Ap-3M for qemu-devel@nongnu.org; Wed, 25 Feb 2026 18:21:52 -0500 Received: from mail-wr1-x433.google.com ([2a00:1450:4864:20::433]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1vvOCT-0004O9-AM for qemu-devel@nongnu.org; Wed, 25 Feb 2026 18:21:50 -0500 Received: by mail-wr1-x433.google.com with SMTP id ffacd0b85a97d-43991064db8so234796f8f.2 for ; Wed, 25 Feb 2026 15:21:48 -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-483bd70e692sm98680445e9.7.2026.02.25.15.21.46 for (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Wed, 25 Feb 2026 15:21:47 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1772061707; x=1772666507; 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=y3Jc9cBiP93i40JuMbC0QlECSRh9zM7TqGGi/psNBgc=; b=VkIIo4TdkjDgPjNqATWHBxBTfwefb9xj4jeauYGyqAZrIhgRITtwHYJPxCv9OONhSH FuE+Cql7NALj6ezvfkDQiRYJzQWRPMprSSc02lxCV9gliR2cR7tQcml999hsX9yilsJt FPEStUBs6RPSKNUrY3Io07l3Dpq8dGJEzBEbkXSbwzml43Rj7nAiWg35dhJpWzfThqFC UoH6A34DmGT90IfB0GBYw694xl302xQrAe0ApwmBiSCDc0rz5979QBNA6+4TMQGRGoJo Cwrf7Q9UsyuAU5nbbmrBXFai0W4/LGMf0y0bWlhgaM3XE2XKsPEHNodS2WA9ICn8Vd82 qCIQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1772061707; x=1772666507; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-gg:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to; bh=y3Jc9cBiP93i40JuMbC0QlECSRh9zM7TqGGi/psNBgc=; b=wfILAobBEJgfT0xbMi2C6ZDocF7vZl78WDUAhZqMnVzQQbBTLMEGY95FTwKjM0gML/ fu3uYv+dOAS6u4yqFkQpNfdoiJLhPCAtd1TSs0DZu2ZtDRqcpI325C/zFX/1Z1fciqVU WIHwPu1iCedXApzCTk0rTaZNbneZkDP3C7DSI48S59OYEnNO/QXOgVb1vQu2XNP4opJI eQyCwOcta8yEU2UEIrR5OSo97xsWhPjv7CyJH5T4H4cyJ8+GDYAu0GwYac7E0XW2BzCg VqVrEV6h0rumCGFuMXLv0HP/PdCqduRMgN1W9psyRLon6ocxDwcuuAQXg6YyXILWSknG dFZg== X-Gm-Message-State: AOJu0YxLy2z32C4AyEDh6AN5uvFDSRKoNQIfL8iMxYcz8Ol6yaaN47Hk 2UI4Nc6RpFKWqBBAXBKzpcooe6WoAq+5uu5X0QQw6Z+D5LLQcd2onEpBLWniXu/gySafAOxzziR mbO8JXqE= X-Gm-Gg: ATEYQzyPpTc0B43T4UIxiD6PrTuPdTgyg7+sjVlJxn3LMQYzq9d+aNIn+GvH99qPmES 8xwA09ETOulzDdzXSNfMd46SUS2UCFugvxW1TysRSwCJOU6o6AijLkxU4K+pDPoud7oF7afBr4c /xa9X0GPJE10FxCjcRE/WGxo4yKsuCKiodknssYqFBLHbjsv/iqIig8lSeXkKRfV8LUAwp1YBiu fZN9A/80Fu0Slt6puO4x7tJ5cEe9Ukku634s4zFm8JThKr1v7zvoPV4Ho4mMbImVkp7v05HXGMV 7xAzfvLKEcvHXSbCFj0WUM4UX0DcAL624ftaqIWyUGXi9k+NGcq+XuqIg8DNp7rtfXYzzOIjdl5 jzlY5fO+iCzhNwqya96VkQ2aL3FxwSj7zOptImz69PHTUblmNWYcusHtThhi0n1bQdBcW6WqLCN 8l882p0+b8Tee7C4tFCThN+WnS/SqVNOtSyO0k100z/6ARhTykwMoP8u0Q5uZEMJo923ZVmiMy X-Received: by 2002:a05:600c:8b02:b0:47d:5e02:14e5 with SMTP id 5b1f17b1804b1-483a95a86eamr310064855e9.5.1772061707528; Wed, 25 Feb 2026 15:21:47 -0800 (PST) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PULL 67/70] target-info: Move TARGET_PAGE_BITS sanity check Date: Thu, 26 Feb 2026 00:14:07 +0100 Message-ID: <20260225231411.96482-68-philmd@linaro.org> X-Mailer: git-send-email 2.52.0 In-Reply-To: <20260225231411.96482-1-philmd@linaro.org> References: <20260225231411.96482-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::433; envelope-from=philmd@linaro.org; helo=mail-wr1-x433.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: 1772061808148158500 From: Richard Henderson Move the check from page-vary-target.c to target-info-stub.c, in the process of removing page-vary-target.c entirely. Signed-off-by: Richard Henderson Reviewed-by: Philippe Mathieu-Daud=C3=A9 Message-ID: <20260217095106.598486-4-richard.henderson@linaro.org> Signed-off-by: Philippe Mathieu-Daud=C3=A9 --- page-vary-target.c | 4 ---- target-info-stub.c | 6 ++++++ 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/page-vary-target.c b/page-vary-target.c index ab92da4539d..7c0565dd8dc 100644 --- a/page-vary-target.c +++ b/page-vary-target.c @@ -23,10 +23,6 @@ #include "exec/page-vary.h" #include "exec/target_page.h" =20 -#ifndef TARGET_PAGE_BITS_VARY -QEMU_BUILD_BUG_ON(TARGET_PAGE_BITS < TARGET_PAGE_BITS_MIN); -#endif - #ifndef CONFIG_USER_ONLY #include "exec/tlb-flags.h" =20 diff --git a/target-info-stub.c b/target-info-stub.c index 896f16e582b..f5896a72621 100644 --- a/target-info-stub.c +++ b/target-info-stub.c @@ -11,11 +11,17 @@ #include "qemu/target-info-impl.h" #include "hw/core/boards.h" #include "cpu.h" +#include "exec/page-vary.h" =20 /* Validate correct placement of CPUArchState. */ QEMU_BUILD_BUG_ON(offsetof(ArchCPU, parent_obj) !=3D 0); QEMU_BUILD_BUG_ON(offsetof(ArchCPU, env) !=3D sizeof(CPUState)); =20 +/* Validate target page size, if invariant. */ +#ifndef TARGET_PAGE_BITS_VARY +QEMU_BUILD_BUG_ON(TARGET_PAGE_BITS < TARGET_PAGE_BITS_MIN); +#endif + static const TargetInfo target_info_stub =3D { .target_name =3D TARGET_NAME, .target_arch =3D glue(SYS_EMU_TARGET_, TARGET_ARCH), --=20 2.52.0 From nobody Thu Apr 16 20:57:20 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=1772061782; cv=none; d=zohomail.com; s=zohoarc; b=Rpx5PLStXvaAtZHNqigJNSeK5L3klRjzh10+OhqydycTCG3AanQt4BqUl232P4VemDqdezEeKwnuwUHIY5Qm7q+YUIKf3/ZrF+puCXpSS7Q1QmwNSd7MWTFYIPi1/Dh8hwPY0vfvm5ruyghFtv5odUb7xHVfx3oIZBocsUZa4DI= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1772061782; h=Content-Type:Content-Transfer-Encoding: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:Cc; bh=kEjkvI21KJhfxoPnZ142F140lecsb92SIRQcE5bRkmg=; b=PNtPE/i5DOSOwTy2vS9sBy8yAUrbT5EOAFeOxlDzeWBhFPz+8bMOZl0hZzMgGmkPjnjasTTuoZe6TabCwifhmcrvekMtFeh0k7Chqk62JNVvA18Adza4rJZCppSXFcJ0lxxhcQ4ltk+PrZPZV+ALPYymfCJQ94e0fHlgaXNpmyk= 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 1772061782892577.0300359430677; Wed, 25 Feb 2026 15:23:02 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1vvOCi-0008DH-5u; Wed, 25 Feb 2026 18:22:05 -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 1vvOCb-0008C6-E7 for qemu-devel@nongnu.org; Wed, 25 Feb 2026 18:21:58 -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 1vvOCZ-0004PB-Ol for qemu-devel@nongnu.org; Wed, 25 Feb 2026 18:21:57 -0500 Received: by mail-wm1-x32d.google.com with SMTP id 5b1f17b1804b1-483770e0b25so2535355e9.0 for ; Wed, 25 Feb 2026 15:21:55 -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-483bfb29715sm56953255e9.0.2026.02.25.15.21.53 for (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Wed, 25 Feb 2026 15:21:53 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1772061714; x=1772666514; 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=kEjkvI21KJhfxoPnZ142F140lecsb92SIRQcE5bRkmg=; b=bYPPF/TqhiP7ihwfLXYYYeGvmeC3jF/hG5m5snDDa0VhpNaLOhd5UsgdP1pvb7205a BYTfTHaMv8BM/ATc0jcDfegJiNlvYFqiFkLRzQF042eyWEHSuxJa+XDrYtrNbe4luusq 8eBUFHjkR0f5gXUTQ++LKeFMqZZyQUz43PgbH5WkpAJanspQPiQqsqEjehllxUq783kk lJeMKJMv3a6Ob+g7HlnatMBvYE0cFffTjXK0QdId0ETR71OZnmwjd2JbIK07KnNu9/3Y KQxfCi862ENgqq1KDGTQvbhC+ezTlKpOwoEKDOkv7vOtEO43Wd+jI9/prfOnygq6jJey 1G/g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1772061714; x=1772666514; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-gg:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to; bh=kEjkvI21KJhfxoPnZ142F140lecsb92SIRQcE5bRkmg=; b=fOt+qSgOUq2Vp/41M7Wlpo7AHTpuk76K6leqU9SrYK5rxlTcXwPonFN6GgWw5EMgZD Uvti+aW+NJzV3ncv6GixI4xXOAMu0kAWkXSx9szIP8pMJt/fF2hx007OZi+Mse4hnRhj rDspMVE0StwXv32lN/b/pYk6U/j9eYbzw+oUfJ7Wb/uDHwnQrP1f9tLdvCWKardV5KQc 1rjIIea10tVcEIg6GVAUYOjXq+jh7A8ZCREutCBdATx0UqorZdMLO8I72C2jAkKDJA9z GQzFjTTR5xMaxqwOsiudd1j16bOEqY+RifTHDZYVYExpdvsyuRwnUQCqvHSaNzgTm8Ns iO3A== X-Gm-Message-State: AOJu0YwTk6JE0sLaeCjKOpT8/egrMEi6KsPQQC2n5lQzxLw8x9tw+AuU x24UKSwEl4EvfNc9jywnXTWvqnNYv7hFAQsMYSAA2jzfp4E2AL8Q4sSJIp76F8NPsXmWGas9KKc kc7FiXOE= X-Gm-Gg: ATEYQzz98pUZPlCzn1v8TXcPomODcu/qhGN/YxxBMUwFGHuJlq0mbQ/GYnxNalMzApJ 7HbsOZJbp+hAVdvvMuflNB0kJWegaHCL/JIpxim92pkuA+skuAKW+74ovVm9NU1wgioJGl0Y8ws gPFeRe1WwIFIdhjkeo+kCNOl9cxBiIxutlOGX5FRHL36ZbInyLSKUxQ9p3rNpEZqo/2rf4lL7pT YHkGkiA6JjcwXIUGxjz9vwATsUFJ20VUFYZPSZQ5YwjxrjPXvo8NJUz4mF2Cc07xeQprH6l2xSZ fS+KYKom8PMfiHiIrT/XZBiIfrCU79AKsEIJa/8hi4X8RjGXNbDIODXTfit/X9ShaK863iOp3EN DzcSoBcWRSmEnAmaQxZUmESl0PbbXnZb9E3SPuBdPO1wod8JRsvO5Bq+b++H0ZnObQA6T5Uynr3 uXeDn8bt4Cd9kS9gT9rQAINy+ibvW6GO8xTOOtg7Wm/B9fcINqm1QElWcA01y+On5zD4KLDkkf X-Received: by 2002:a05:600c:c166:b0:47a:935f:618e with SMTP id 5b1f17b1804b1-483a960a0e8mr323729185e9.15.1772061713963; Wed, 25 Feb 2026 15:21:53 -0800 (PST) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PULL 68/70] page-vary: Build set_preferred_target_page_bits as common code Date: Thu, 26 Feb 2026 00:14:08 +0100 Message-ID: <20260225231411.96482-69-philmd@linaro.org> X-Mailer: git-send-email 2.52.0 In-Reply-To: <20260225231411.96482-1-philmd@linaro.org> References: <20260225231411.96482-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=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: 1772061813071158500 From: Richard Henderson Use target_info->page_bits_vary to merge set_preferred_target_page_bits_common into set_preferred_target_page_bits in page-vary-common.c. Signed-off-by: Richard Henderson Reviewed-by: Philippe Mathieu-Daud=C3=A9 Message-ID: <20260217095106.598486-5-richard.henderson@linaro.org> Signed-off-by: Philippe Mathieu-Daud=C3=A9 --- include/exec/page-vary.h | 1 - page-vary-common.c | 29 ++++++++++++++++++----------- page-vary-target.c | 10 ---------- 3 files changed, 18 insertions(+), 22 deletions(-) diff --git a/include/exec/page-vary.h b/include/exec/page-vary.h index 3c77689ca52..c4dc56634bc 100644 --- a/include/exec/page-vary.h +++ b/include/exec/page-vary.h @@ -41,7 +41,6 @@ typedef struct { } TargetPageBits; =20 #ifdef IN_PAGE_VARY -bool set_preferred_target_page_bits_common(int bits); void finalize_target_page_bits_common(int min); #endif =20 diff --git a/page-vary-common.c b/page-vary-common.c index ab77672dd41..b41137c644d 100644 --- a/page-vary-common.c +++ b/page-vary-common.c @@ -20,25 +20,32 @@ #define IN_PAGE_VARY 1 =20 #include "qemu/osdep.h" +#include "qemu/target-info-impl.h" #include "exec/page-vary.h" =20 /* WARNING: This file must *not* be complied with -flto. */ =20 TargetPageBits target_page; =20 -bool set_preferred_target_page_bits_common(int bits) +bool set_preferred_target_page_bits(int bits) { - /* - * The target page size is the lowest common denominator for all - * the CPUs in the system, so we can only make it smaller, never - * larger. And we can't make it smaller once we've committed to - * a particular size. - */ - if (target_page.bits =3D=3D 0 || target_page.bits > bits) { - if (target_page.decided) { - return false; + const TargetInfo *ti =3D target_info(); + + assert(bits >=3D TARGET_PAGE_BITS_MIN); + if (ti->page_bits_vary) { + + /* + * The target page size is the lowest common denominator for all + * the CPUs in the system, so we can only make it smaller, never + * larger. And we can't make it smaller once we've committed to + * a particular size. + */ + if (target_page.bits =3D=3D 0 || target_page.bits > bits) { + if (target_page.decided) { + return false; + } + target_page.bits =3D bits; } - target_page.bits =3D bits; } return true; } diff --git a/page-vary-target.c b/page-vary-target.c index 7c0565dd8dc..d388c5c3d64 100644 --- a/page-vary-target.c +++ b/page-vary-target.c @@ -39,16 +39,6 @@ int migration_legacy_page_bits(void) } #endif =20 -bool set_preferred_target_page_bits(int bits) -{ - assert(bits >=3D TARGET_PAGE_BITS_MIN); -#ifdef TARGET_PAGE_BITS_VARY - return set_preferred_target_page_bits_common(bits); -#else - return true; -#endif -} - void finalize_target_page_bits(void) { #ifndef TARGET_PAGE_BITS_VARY --=20 2.52.0 From nobody Thu Apr 16 20:57:20 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=1772061841; cv=none; d=zohomail.com; s=zohoarc; b=l/+j/Rb4NAzKRt7fiX1YySajVHzQ7Ju0YCTuOyf6zEOKxjyB74c6pqc89JSuV2LYQICNI1QLla7MUfMuhkP6LRb/53aBVDZRswdRO81JmXGkefPciTOCHMt/R9Lwn212uR0wCCHV/QTEt595MJ5IronP+xBq9pHzRCLrbUInKAE= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1772061841; h=Content-Type:Content-Transfer-Encoding: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:Cc; bh=yUHHzNLW9fNVWSnAmzyP6tdjio2zMgW5rP98YdRZAU8=; b=ARWwPhExVeTgDubFD4is39BHTHEzQysK4YeRXqjGlWbuxGIvLAyJqEpzY8I400dzymV46zIdk9dNtJzlhcvdGhW7T1T08pnskCjtOLPgjavupJDKkTgEmwU8uFtBBtbxrd4vOEV1SRJHtWiJFXKfY+M2WCcguafbrzd0u2I4ehc= 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 1772061841521230.30507821950732; Wed, 25 Feb 2026 15:24:01 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1vvOCo-0008Ll-1H; Wed, 25 Feb 2026 18:22:11 -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 1vvOCh-0008DQ-SK for qemu-devel@nongnu.org; Wed, 25 Feb 2026 18:22:04 -0500 Received: from mail-wr1-x42f.google.com ([2a00:1450:4864:20::42f]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1vvOCg-0004Po-AL for qemu-devel@nongnu.org; Wed, 25 Feb 2026 18:22:03 -0500 Received: by mail-wr1-x42f.google.com with SMTP id ffacd0b85a97d-43994aa265eso123688f8f.3 for ; Wed, 25 Feb 2026 15:22:01 -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-43970d3ff27sm38839465f8f.22.2026.02.25.15.21.59 for (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Wed, 25 Feb 2026 15:21:59 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1772061720; x=1772666520; 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=yUHHzNLW9fNVWSnAmzyP6tdjio2zMgW5rP98YdRZAU8=; b=F4/nZRTh5tPSMFFY8ucLqr0+PUAZ0ujGVkFplLNbCsT3d7UVZD1TWaNA/ebBH6N+2T /HjRtVPbo7BTCf+XW2aSuJq1W2WCEdEnX2mr0cmxFv3DKcq9jlobrg613yvIuLM0wg95 hLRgmZHhfFF/Y/2ScdfzFiwxVmy4SX1E9trKOu2KpOm8Rp32GWMbw/IOu18AQEgxJNmY ostgdix0vZgvD31PN7U1l1ePVePRu4QdvY85na99B0FaEKApVTSUeP+UkIYXusZ5YxSQ elT157vsbhJK4BOhu8Gsycs/+7Jcijnyj1DDBVa9kimXvbFlea8rG2g0ELDPSoT2Vqes m4fA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1772061720; x=1772666520; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-gg:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to; bh=yUHHzNLW9fNVWSnAmzyP6tdjio2zMgW5rP98YdRZAU8=; b=gAonXFXMSEkcYSfwYSRrYExVPIczx4mXHHMl9hE2puqzSJOMEgocZzhHsNg/DUoFMf jtaWIZZ6Nv9OsSItYLTDjIvlKreQ9rNXTANtjuI+EMpmdknXOd0tZV10vvyLjziF5Zhd N9ayf4XrTYxFe8CHPpQ73zNg4+ZCe28Qpg2kKKN8jCq6M2QtrPXFqUGycyN00NGyLY6m j8YCvLLBO4UIH1vk9rboGogUVB2JPnRahHNqbZHuYHh4lj44M5aODQVB2eziGojXHbWH qLu1YulUlnMEdW3b2m+NBY7KtvU8O0j0zn2eNghNZZZNm7iLf44vfdaMXMEI/kARmmo7 iWBw== X-Gm-Message-State: AOJu0YyFhc7ZSScxhAWbkb9OumKPo3jKr225Ep0xY2695VdNhdr0wZWg nQolGkn8u78HAhJkpT4xGzLXMrmddrZIyEcPXVJTCXNi1ZNBsTRGYa+K7ruE8n11A3440Ep3VnK 5MUCl7kk= X-Gm-Gg: ATEYQzxN0sBVwF1ejiYvlVVXcgArNS/on2ixbNQP7goq1W7ewaQzWcaCfwM/Zsmk6cR 8bMG4U7LmEw91DS4NOzJuM52T/Ols02P6zqWx9AC/Miuh++bPjcbQys6gCReMxgagdCGknOq/3f +oyMJiMNurOLtAxdT0i5iyrervZ+HaOYmsXTuQI84OYPIs8SXhy6HKhH/BGrDe+N31RBg61cmVL Z9R5arrA9pSPpozzFO4vbwn0k/IgWQFc3LSePVtziFKuIfza+YtBVSSPU0JTm7d9+JaBjWot9Eg q8T0OoznJb1NYPs3GMZe/y2zqblJSSGRaycM92WX9T/zjDVGtEB791bAtlsAX2wewMEHnLK744j axlCRLzDjh0d4EW1D6uYa0uVx8LcMmx6KdIHDsuIXzz6EDddhYBysQDO/35PKWyVCLcyqwH7OY2 gAulJQqBNTqKACAPgENwuRun5hj2oPpMBh/2piXoF/QMsz9lyaare1S7U5KZaLkwj3z3jV5HJG X-Received: by 2002:a05:6000:290f:b0:437:6efe:94d2 with SMTP id ffacd0b85a97d-43997eda581mr539069f8f.4.1772061720376; Wed, 25 Feb 2026 15:22:00 -0800 (PST) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PULL 69/70] page-vary: Build finalize_target_page_bits as common code Date: Thu, 26 Feb 2026 00:14:09 +0100 Message-ID: <20260225231411.96482-70-philmd@linaro.org> X-Mailer: git-send-email 2.52.0 In-Reply-To: <20260225231411.96482-1-philmd@linaro.org> References: <20260225231411.96482-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::42f; envelope-from=philmd@linaro.org; helo=mail-wr1-x42f.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: 1772061842259158500 From: Richard Henderson Use target_info->page_bits_init to merge finalize_target_page_bits_common into finalize_target_page_bits in page-vary-common.c. Signed-off-by: Richard Henderson Reviewed-by: Pierrick Bouvier Message-ID: <20260217095106.598486-6-richard.henderson@linaro.org> Signed-off-by: Philippe Mathieu-Daud=C3=A9 --- include/exec/page-vary.h | 4 ---- page-vary-common.c | 15 +++++++++++---- page-vary-target.c | 12 ------------ 3 files changed, 11 insertions(+), 20 deletions(-) diff --git a/include/exec/page-vary.h b/include/exec/page-vary.h index c4dc56634bc..f2d735bec2f 100644 --- a/include/exec/page-vary.h +++ b/include/exec/page-vary.h @@ -40,10 +40,6 @@ typedef struct { uint64_t mask; } TargetPageBits; =20 -#ifdef IN_PAGE_VARY -void finalize_target_page_bits_common(int min); -#endif - /** * set_preferred_target_page_bits: * @bits: number of bits needed to represent an address within the page diff --git a/page-vary-common.c b/page-vary-common.c index b41137c644d..ddd08633788 100644 --- a/page-vary-common.c +++ b/page-vary-common.c @@ -50,11 +50,18 @@ bool set_preferred_target_page_bits(int bits) return true; } =20 -void finalize_target_page_bits_common(int min) +void finalize_target_page_bits(void) { - if (target_page.bits =3D=3D 0) { - target_page.bits =3D min; + int bits =3D target_page.bits; + + if (bits =3D=3D 0) { + const TargetInfo *ti =3D target_info(); + + bits =3D ti->page_bits_init; + assert(bits !=3D 0); + target_page.bits =3D bits; } - target_page.mask =3D -1ull << target_page.bits; + + target_page.mask =3D -1ull << bits; target_page.decided =3D true; } diff --git a/page-vary-target.c b/page-vary-target.c index d388c5c3d64..bc4d8931b68 100644 --- a/page-vary-target.c +++ b/page-vary-target.c @@ -38,15 +38,3 @@ int migration_legacy_page_bits(void) #endif } #endif - -void finalize_target_page_bits(void) -{ -#ifndef TARGET_PAGE_BITS_VARY - finalize_target_page_bits_common(TARGET_PAGE_BITS); -#elif defined(CONFIG_USER_ONLY) - assert(target_page.bits !=3D 0); - finalize_target_page_bits_common(target_page.bits); -#else - finalize_target_page_bits_common(TARGET_PAGE_BITS_LEGACY); -#endif -} --=20 2.52.0 From nobody Thu Apr 16 20:57:20 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=1772061883; cv=none; d=zohomail.com; s=zohoarc; b=KRp8fAFMEXauOIbXnVTHdeHBNES3yfRTm35noTX+1iEbBvFU/O0eBBpRli15qFYe/06Jl3D19EzPMnE5taaDWoXhdnufv95VXZuWrpkdkSDpnhe0+6zqXhKeFN02fvavamq4N+f7dZhiFsJqnsQShEzGr9qkm6zGhPAzuw6bvxA= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1772061883; h=Content-Type:Content-Transfer-Encoding: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:Cc; bh=rJR3a7jse2k+zOTTCK+12aHFKULfyak6qBcfUAT3KG4=; b=a9h2GqRzavxitFEk5Zr/j7UlisFCBFUFA1GWVwHZp1oEp26/mwA3/Kht7X+VaDlDV6m90NugPyFjFy9JBbsDj7/7HTdRlWnotEIAEbZiiK5mJXwIvw67XbODCe6flcimTfFKrbsPF2ekbWR7cu8AllBWGCi4f2Y6B7mbKmAoTcY= 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 1772061882938104.60484736833655; Wed, 25 Feb 2026 15:24:42 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1vvOD0-0000Py-UM; Wed, 25 Feb 2026 18:22:22 -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 1vvOCp-0008SE-FD for qemu-devel@nongnu.org; Wed, 25 Feb 2026 18:22:12 -0500 Received: from mail-wm1-x341.google.com ([2a00:1450:4864:20::341]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1vvOCn-0004QN-DJ for qemu-devel@nongnu.org; Wed, 25 Feb 2026 18:22:11 -0500 Received: by mail-wm1-x341.google.com with SMTP id 5b1f17b1804b1-483bd7354efso3566795e9.2 for ; Wed, 25 Feb 2026 15:22:08 -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-483bd6f26d7sm111074775e9.3.2026.02.25.15.22.06 for (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Wed, 25 Feb 2026 15:22:06 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1772061727; x=1772666527; 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=rJR3a7jse2k+zOTTCK+12aHFKULfyak6qBcfUAT3KG4=; b=Xj6mMcusY/4GPqWxQYMWru2oUso2pLc9ysbPZNUZG4AuJ5I3JM6kF39z7udgpztZEf MJrGhJaIIm/YiEe9monfwHajo2ljdRpZwZbbmbBvGAnBO3I28Tn4d9qmtjepbGXtBlz6 sVGHCboF30CEKdCjFTUHd53IGv+7MM9ljU+stlRXEQSVkq7z7IUBWhSP5y/eWRz7neWE prC784rkqIwsjc8bzZjS6VmmSe2N3jFviZP7HYyAXxCii+f2N768IKdQw0b+TrDOFBwU 6o5l3d2jD8Qs5DkxExz2oQrTAijakqO2ZqYIPKbp2h+HnpJ2rLTcj3o4fGFlvISEalKF kMVQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1772061727; x=1772666527; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-gg:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to; bh=rJR3a7jse2k+zOTTCK+12aHFKULfyak6qBcfUAT3KG4=; b=fOCQglL8dmbm4V2DGldWDQJwZfszMw8gxin1EzSMbGN6w0JPwnYAdMwv4O/eIxRcLv XMkTP7/zd9lvE9FE0DTyGu07QV5nVcSDFnJPaKuOBA9qGFCRTNy6eF8WQR3eyfWzU7dE r+gPQCEC4RA3pcH1MEMi0ZA//e1XdoZ/jlU+KRGP4pb+lFaTG2u3t/+VUR4qTeyTKqi0 UQnsyYp7b65kGKGDR3CAWFpPMJVJ/mgC8AuZieX0vsORCEDfS6M5UEyXNMD/A5E0C7Hw G/5M3J9vqzbZuGyy2drdk/gDkwWI7755XoLIC8JVtzJm0zNr7yOmfmhlMOotm+tZAqgH x6MA== X-Gm-Message-State: AOJu0YyWUlRjUNC5gGQZO25vIEPA4INeGimuL/W7F0FM55DnNKa8NOVV QdyNvPfwY6zYcMm9GWj5nF0oqI/8si6v+pbzmsFd2iwg7/pkAbmUGA/FdrVBt5qcjTBdDqHOswp ltCoD4ks= X-Gm-Gg: ATEYQzz3Iom7chh/aT9Cmcd4V5BeeApm0dMuFkBtjRNdJJj+B6Ln3AbSdcxDgkynNgq Q7Sjz7bDiksWlrADUiyipqpyFrhs0tQJ3c643FK0zQWVwX3Qw25k3wPTkxkv4QlBlA2QQdZjMzl mQq9u2TcCCOYwLkcxWWD+H6wxF/pCT8zq0wnnSxz3EU/aWWVCo5vlsfphn+XFi29MAC8Dg3J99y HVTpy1UQk+/vkmBI3U3yw55sSw2iD3aaYBIkip0aqi7jmEnIjh3glaMp1mC9AMBLyjBq5RvpqEB firGTdUmcoNdXJoWO7vnuq7s42X0/Rpky0G2tj/8M4JxEFX8vAG3344K1HBCBgEWpqr5fLOOwdE ve1TLpMa9g48kiobz7BZhKrm4js8ajuq3Ni/VyMvc44/PzGibSV88yLeayvlmOanH1HLKkXQYNi BCwWjuMFc7BZSnf+kyb5APTRCLaHUoYBYrh4+5gUH9NqVOuubObUEJzwaXWHk7RyZh2giTewkp X-Received: by 2002:a05:600c:3b8c:b0:483:43da:6c87 with SMTP id 5b1f17b1804b1-483c21aa451mr36064515e9.33.1772061726799; Wed, 25 Feb 2026 15:22:06 -0800 (PST) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PULL 70/70] page-vary: Build migration_legacy_page_bits as common code Date: Thu, 26 Feb 2026 00:14:10 +0100 Message-ID: <20260225231411.96482-71-philmd@linaro.org> X-Mailer: git-send-email 2.52.0 In-Reply-To: <20260225231411.96482-1-philmd@linaro.org> References: <20260225231411.96482-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::341; envelope-from=philmd@linaro.org; helo=mail-wm1-x341.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: 1772061884399158500 From: Richard Henderson Use target_info->page_bits_init to implement migration_legacy_page_bits. Because this is the last function within the file, rename page-vary-target.c to page-vary-system.c and build once for system mode. Signed-off-by: Richard Henderson Reviewed-by: Philippe Mathieu-Daud=C3=A9 Message-ID: <20260217095106.598486-7-richard.henderson@linaro.org> [PMD: Update MAINTAINERS] Signed-off-by: Philippe Mathieu-Daud=C3=A9 --- MAINTAINERS | 2 +- meson.build | 2 +- page-vary-target.c =3D> page-vary-system.c | 19 ++++++------------- 3 files changed, 8 insertions(+), 15 deletions(-) rename page-vary-target.c =3D> page-vary-system.c (74%) diff --git a/MAINTAINERS b/MAINTAINERS index 8da0b357fbb..606b16762cf 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -159,7 +159,7 @@ M: Richard Henderson R: Paolo Bonzini S: Maintained F: system/watchpoint.c -F: page-vary-target.c +F: page-vary-system.c F: page-vary-common.c F: accel/tcg/ F: accel/stubs/tcg-stub.c diff --git a/meson.build b/meson.build index d9a17eeefd3..3cd1d8dbc66 100644 --- a/meson.build +++ b/meson.build @@ -3833,7 +3833,7 @@ if get_option('b_lto') pagevary =3D declare_dependency(link_with: pagevary) endif common_ss.add(pagevary) -specific_ss.add(files('page-vary-target.c')) +system_ss.add(files('page-vary-system.c')) =20 common_ss.add(files('target-info.c')) system_ss.add(files('target-info-qom.c')) diff --git a/page-vary-target.c b/page-vary-system.c similarity index 74% rename from page-vary-target.c rename to page-vary-system.c index bc4d8931b68..6c49c10e23b 100644 --- a/page-vary-target.c +++ b/page-vary-system.c @@ -1,5 +1,5 @@ /* - * Variable page size handling -- target specific part. + * Variable page size handling -- system specific part. * * Copyright (c) 2003 Fabrice Bellard * @@ -17,24 +17,17 @@ * License along with this library; if not, see . */ =20 -#define IN_PAGE_VARY 1 - #include "qemu/osdep.h" #include "exec/page-vary.h" -#include "exec/target_page.h" - -#ifndef CONFIG_USER_ONLY #include "exec/tlb-flags.h" +#include "qemu/target-info-impl.h" =20 QEMU_BUILD_BUG_ON(TLB_FLAGS_MASK & ((1u < TARGET_PAGE_BITS_MIN) - 1)); =20 int migration_legacy_page_bits(void) { -#ifdef TARGET_PAGE_BITS_VARY - QEMU_BUILD_BUG_ON(TARGET_PAGE_BITS_LEGACY < TARGET_PAGE_BITS_MIN); - return TARGET_PAGE_BITS_LEGACY; -#else - return TARGET_PAGE_BITS; -#endif + const TargetInfo *ti =3D target_info(); + + assert(ti->page_bits_init >=3D TARGET_PAGE_BITS_MIN); + return ti->page_bits_init; } -#endif --=20 2.52.0