From nobody Fri Oct 23 21:32:01 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=1792674011; cv=none; d=zohomail.com; s=zohoarc; b=CKLq979lvevGW+IEBmL5EXRKV90glM2ChrNHy97vWjazhQOuGhgmhaQ//5lKnYvYrmjwIIcLZmgIZscK0D4sHx9m47/WADfj5DLnqaVMXNl+G+tCRGgvyw7Z/nQL1akcp5oQLMWnYavWTpL41DHodxhZfMVir5MHgOxCXffl+Rs= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1792674011; h=Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=15KVxgua1RtTtMZheAeMQxeOO8nOq6kF7AGPMLSRATM=; b=cCL/JxvZEyaV9Ih8C9Rzo8PXv5af47GAS9ST31nYBNgwXv/eDno43fQEm7sqSgAF+tDrrm0PJ1+rT3qVC+FNvacQWyvjWwno6+4H+pkHfj/aU2Y4FL1s7QSsKzhjDcV0PNoCC4e5c+OTnoa/lPNPUITSIUMfOk97SdkJPdYrkeo= 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 lists1p.gnu.org (lists1p.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1792674011455936.6668141116805; Thu, 22 Oct 2026 06:00:11 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1xJsOI-0001AH-Su; Thu, 22 Oct 2026 08:59:32 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists1p.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1xJsNt-00013L-5e for qemu-devel@nongnu.org; Thu, 22 Oct 2026 08:59:08 -0400 Received: from mail-wm1-x334.google.com ([2a00:1450:4864:20::334]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1xJsNr-0007Jz-DK for qemu-devel@nongnu.org; Thu, 22 Oct 2026 08:59:04 -0400 Received: by mail-wm1-x334.google.com with SMTP id 5b1f17b1804b1-4a2001dd4e7so19478195e9.3 for ; Thu, 22 Oct 2026 05:59:03 -0700 (PDT) Received: from lanath.. (wildly.archaic.org.uk. [81.2.115.145]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4a203b439absm79247015e9.9.2026.10.22.05.59.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 22 Oct 2026 05:59:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1792673942; x=1793278742; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to:content-type; bh=15KVxgua1RtTtMZheAeMQxeOO8nOq6kF7AGPMLSRATM=; b=G47B4YvKBvdo7Fz2H+Y9CHjXSd+6l0Bu+RLigNfjJDH3jKdQxw9sVQQ4RK0hHfu8YZ 3zZFlxVwFlfRSgRfJ2IL1/brfyNx5DwS72/fj637XCoVkX/o+UtfnNGh5Z2cBvzmgS8n C44rJ5hjGqOW08VyiuZ7QfyzlS2GS2IlYwWj0e+C++N47WzPVt0U73HzQNCIM72ZEv8p ZHkWfaVFhjXKDef9rdpgZ9ezjHVtqHD4PF4kKLZ7XpkvAYmToJQak5wQzO9T+atbQqJl dyX63NMHqi4RadWiqQPYgbxw8emTFP3P6Qp0Ccf1iwh4dAuxatM4aqv9wfClXG7Q3Zgr EqZA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1792673942; x=1793278742; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to:content-type; bh=15KVxgua1RtTtMZheAeMQxeOO8nOq6kF7AGPMLSRATM=; b=T1fvjb1pAvli+yzC1CWLyF5rylCLyT3pDeMwdQImE5ZxdI/ldcl14CQPfTJtX00YFW 4Sg9pFV4Lx71dEKfzs1heo0KILoXYd28DJH1RvJDho7bamHB2wuV/ixu3WgXbzLQw4+z IpnBlPNro8TBRHVuJ612coTA6i3NE9QvVIKpOB+h4YWqCJzMZ7WwN7j5ERk5+95+oKfd OolbBLPrLnb9NcEX9hOgC/emKTVGSR9tOqJx/lBF6kuriTxqSiOOWcMTEQekYtrG4iH6 WTa2ClvlWgUmkoPHUw9UIRO08BzhiEULKCWsr8MSMSayElhvZIIWPw79LReQHGRMWCv7 fxjg== X-Gm-Message-State: AFq9FYIB6Nk8axMQ7z6/ljLc6nVgOjkGjuhcQY9qxw7ikm0vQ+nb3nlZ obOPD5TMK0JTSJJ4OLCeEA4XCi/sj9mE7zsMBZXqZ+XPHaUzT/vOX7/AynXmZeHPXQTCrcj0oGX J3M1S6OU= X-Gm-Gg: AYBFou3G69txwqITN+rqxmMGM2GLWSYiKkxuIw6yZMZQOTm61tLDaLh+J7u1Sp0zPEz Zk+/Li7B6JqnfpNFhbUwDI+udcNzi+ySGxIi+yYZIhAN2smaAUnt6m6Jp029PDxgAcLpXNzoR/1 NvGAz+gr822sPWlT1H8ZaEUPWF6GpifmYzXFRvFioQb0oZgmmp4KzZLxPMqYnwUQIjNtunKrijp zwiRTEin9t9F/P8SLlZQ9/o2IDap3W4jxWXK5cakHm/dq+idpuHE+vtPXIBpqIy8cUj8ZiufnFp ztQlFJK+f/WLIhx/a4j16SRgy6275PCb6y1Xbj1CbtnqZ5DOFySmr/bFAAY4rG1eCdTN+bvDf5k hk0036WQbrebXkNGHBY26/fEnR2znYwYCGzCbnjCddiUOeddk/c6DCZzCJIoeBpsKD3UXFT6PXf nRayllv0LZMOXBQgE8vPcUWwpdgOc6yBJ7tfFZiPHoFOfs5T5UsN0G76uv+FDGsTMCJcn4WGvzr E+DwVTn6seNddOpnp33Iab8kVeqIpQWEG9R6so7Vs4DHffO7xLaUbPkKPvDv/3sVyhJQrOGcTIY Es0WCWRVydoyGIRZmhr0YPJSww1QxXLuKhQc0Jpo7ONK/M676Pz/WDsWCd5Z X-Received: by 2002:a05:600c:4585:b0:4a1:acaa:9d4c with SMTP id 5b1f17b1804b1-4a1fdb20774mr103770105e9.25.1792673941848; Thu, 22 Oct 2026 05:59:01 -0700 (PDT) From: Peter Maydell To: qemu-devel@nongnu.org Cc: Brian Cain , Pierrick Bouvier , Richard Henderson , Helge Deller , Song Gao <17746591750@163.com>, Bibo Mao , Xianglai Li , Laurent Vivier , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Jiaxun Yang , Aleksandar Rikalo Subject: [PATCH 1/5] target/hexagon: Convert to translate_for_debug Date: Thu, 22 Oct 2026 13:58:54 +0100 Message-ID: <20261022125858.310252-2-peter.maydell@linaro.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20261022125858.310252-1-peter.maydell@linaro.org> References: <20261022125858.310252-1-peter.maydell@linaro.org> MIME-Version: 1.0 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=lists1p.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::334; envelope-from=peter.maydell@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: 1792674014322158500 Content-Type: text/plain; charset="utf-8" Convert hexagon to providing the translate_for_debug method rather than the deprecated get_phys_addr_debug method. Signed-off-by: Peter Maydell Reviewed-by: Brian Cain Reviewed-by: Philippe Mathieu-Daud=C3=A9 --- target/hexagon/cpu.c | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/target/hexagon/cpu.c b/target/hexagon/cpu.c index f20d6de6f63..5e99e84b075 100644 --- a/target/hexagon/cpu.c +++ b/target/hexagon/cpu.c @@ -612,7 +612,8 @@ static void find_qemu_subpage(vaddr *addr, hwaddr *phys= , uint64_t page_size) *phys +=3D offset; } =20 -static hwaddr hexagon_cpu_get_phys_addr_debug(CPUState *cs, vaddr addr) +static bool hexagon_cpu_translate_for_debug(CPUState *cs, vaddr addr, + TranslateForDebugResult *resul= t) { CPUHexagonState *env =3D cpu_env(cs); hwaddr phys_addr; @@ -626,10 +627,16 @@ static hwaddr hexagon_cpu_get_phys_addr_debug(CPUStat= e *cs, vaddr addr) vaddr page_offset =3D addr & (TARGET_PAGE_SIZE - 1); find_qemu_subpage(&addr, &phys_addr, page_size); phys_addr +=3D hexagon_cpu_mmu_enabled(env) ? page_offset : 0; - return phys_addr; + + *result =3D (TranslateForDebugResult) { + .physaddr =3D phys_addr, + .lg_page_size =3D TARGET_PAGE_BITS, + .attrs.debug =3D 1, + }; + return true; } =20 - return -1; + return false; } =20 =20 @@ -755,7 +762,7 @@ static bool hexagon_tlb_fill(CPUState *cs, vaddr addres= s, int size, =20 static const struct SysemuCPUOps hexagon_sysemu_ops =3D { .has_work =3D hexagon_cpu_has_work, - .get_phys_addr_debug =3D hexagon_cpu_get_phys_addr_debug, + .translate_for_debug =3D hexagon_cpu_translate_for_debug, }; =20 static bool hexagon_cpu_exec_interrupt(CPUState *cs, int interrupt_request) --=20 2.43.0 From nobody Fri Oct 23 21:32:01 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=1792673979; cv=none; d=zohomail.com; s=zohoarc; b=HWUE65RmIg1V9q56K4Wo0eJINnqTMXdgcxpC6xCUgyfnmyS4hwl67swjqmgShYrnZbmC42VbtqbyWbVcFaRnPGaARgWESN0Vo9pI69c2w3CenUxLEj7oo8EbEIwodLzj46ebwr5ahEJ+GX/5HdgH4+7EPOKPGPBcrru7IHEdK+8= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1792673979; h=Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=xSWfTn1fmXqw14gMpKz+sBJ/waSif06t4nW1Y/9R7Z0=; b=f9dewEqKQiRZ+rfaWKhBAH+4qO2rRrIYK3qncRYqBIo2zW+GLSXc1atk41CpCOjMYnsTrc1zheNfdv/M6dHGAZlZ4V5k9CEaO4iJ3dM6CLAa+txiaEt8vxtf0XnpP0ig5FE5hgJ6WNWYpiTgar4WdGT0W76RTQGshAxPCYKH+Go= 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 lists1p.gnu.org (lists1p.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1792673979086182.84516558922599; Thu, 22 Oct 2026 05:59:39 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1xJsO8-00015M-Jz; Thu, 22 Oct 2026 08:59:20 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists1p.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1xJsNv-00013f-4a for qemu-devel@nongnu.org; Thu, 22 Oct 2026 08:59:08 -0400 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 1xJsNs-0007K9-Pt for qemu-devel@nongnu.org; Thu, 22 Oct 2026 08:59:06 -0400 Received: by mail-wm1-x32d.google.com with SMTP id 5b1f17b1804b1-4a0286c981dso19236755e9.2 for ; Thu, 22 Oct 2026 05:59:04 -0700 (PDT) Received: from lanath.. (wildly.archaic.org.uk. [81.2.115.145]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4a203b439absm79247015e9.9.2026.10.22.05.59.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 22 Oct 2026 05:59:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1792673943; x=1793278743; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to:content-type; bh=xSWfTn1fmXqw14gMpKz+sBJ/waSif06t4nW1Y/9R7Z0=; b=K4tKjPn9gwkxI9boW/0UaAAHalQP7UU62cLjwJCFE0kmEncxZDKhRMu6//FNsyA+Hy AS8uq2V0fCLHyibehiD5BXMGtt9vq5rS05pv9W6DQJX+AdgJtAqI1+P9c4jPzuGhTpw3 oIPPp7I4i7XRw8F01YK7uYWuM/r1wxTGdqig5XWKBo0ZSalYkkFU0ArVCgeF6VLXjBFm brz812J0+cj4UFXJH63VjVEQww7x6N6GF5uY/TWClAzU413JW60yQlvO/1lGB4bCitAz TfgxTk7EGsEtXcRgiVQP9f2msh0kfZwje63ZLoHd18dz+N57vZTEqf6tb9NtYWSl/TKp OAUA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1792673943; x=1793278743; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to:content-type; bh=xSWfTn1fmXqw14gMpKz+sBJ/waSif06t4nW1Y/9R7Z0=; b=TF+fuOfLlq3yNG6+DJztNZtonzZl06YUdriOIJbKQkC7uGiYItE3eCJF7PKUh9L2vG NQYlP129EYzcz/2lxYgTDvDSg+79QIPmYr6eo9EO+/KQItY14y5fQIQT+ZpI9ha5k9zJ zeq+VzL64n7o4DpAYmBxBorUzrI2jS07H6ygF5pT0ZAxjEdgkL1SELgoDL8YkwwsnHvH I+apryW/a7TZz3ohz4HEmKNQxp0NYj8DorLKL0mQnoiQNj0fhq8qT63CNLfKq+mcXARh zUJeRH2Hdlg+1eMpTP62fJwjS1Osr/9DyiJueiZL19ehKxl7bRqqd9qOIY2SSeyfS8nc X3zQ== X-Gm-Message-State: AFq9FYICXkcohV7IXTau/Krn60Cf4tKeR4ZS41+trLycaiRO4UdjSt19 ZsigYPHqOMV0NubpUo0BaOj7+vckdo5g2tCjvdD76QvAT0CDMpRCOzGWd7vPtgOcQWSyhsab83i RrELT28o= X-Gm-Gg: AYBFou0Kiq2mrrvkZn1kE9yFc0jJhxc6NBuL4OACvUq6dURfWOZgz9ORxo0YYKOowpo eLb93q7vhEMW92cPCASULYhExYj6M1LbOSd3aGN8W3xpiSMM3eFazglsGy08iAbxf+UKvjBdxJG nUcNygSzWPtAylJUvjsTbA3m+PI83EJBuY/MJGk9bXLJdqLhyUW7OH6E7zVKJ8kiEcjA5SeF7HW On3sgCbGFO2veau9D7Oz2FHIS5W7etny4HbF2oDCWFnZ1pt6rzvMC+wOEvRX5KlNGMImWHwhTcu mdvNlb6uK0GqhPYkdmu2hCea6ZjUYDNnbUrFVl7rhz9s7IKYw3qn2MPx5/ABQKyU7/5DBEUjNlF nmisdvHrJZU8+CT/r+xGaEH2brJYIcJw+dOzmlMW+RElMTP11dRjPfXUgeKUkPDeSP4qA1Sg2E/ ObRaDFTN37x3TWOT/dWAtkbtYvqz1OeYfEyPpHDw+4hplCgGy/1fmWkS2X1q/+htGIqA6NSO+C9 /pd3GjYoD104SJ/P3CZrMGNHS7ZbFayEQCfwiMZMZ+KHZVK43BB/yatwUmqXL45wGbzyToNRLvX jCDP7pkERfsNfdM6PJ+wr7QnPUeMLqchTTjjxPn6UhPVFjtCt2rvdcC1PgJ2 X-Received: by 2002:a05:600c:6309:b0:4a0:1f90:594b with SMTP id 5b1f17b1804b1-4a1fdd293d6mr89724145e9.22.1792673943104; Thu, 22 Oct 2026 05:59:03 -0700 (PDT) From: Peter Maydell To: qemu-devel@nongnu.org Cc: Brian Cain , Pierrick Bouvier , Richard Henderson , Helge Deller , Song Gao <17746591750@163.com>, Bibo Mao , Xianglai Li , Laurent Vivier , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Jiaxun Yang , Aleksandar Rikalo Subject: [PATCH 2/5] target/hppa: Convert to translate_for_debug Date: Thu, 22 Oct 2026 13:58:55 +0100 Message-ID: <20261022125858.310252-3-peter.maydell@linaro.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20261022125858.310252-1-peter.maydell@linaro.org> References: <20261022125858.310252-1-peter.maydell@linaro.org> MIME-Version: 1.0 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=lists1p.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::32d; envelope-from=peter.maydell@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: 1792673981660158500 Content-Type: text/plain; charset="utf-8" Convert hppa to providing the translate_for_debug method rather than the deprecated get_phys_addr_debug method. Signed-off-by: Peter Maydell Reviewed-by: Philippe Mathieu-Daud=C3=A9 --- target/hppa/cpu.h | 3 ++- target/hppa/cpu.c | 2 +- target/hppa/mem_helper.c | 21 ++++++++++++++++----- 3 files changed, 19 insertions(+), 7 deletions(-) diff --git a/target/hppa/cpu.h b/target/hppa/cpu.h index f453444d7f9..94c81d9fa6e 100644 --- a/target/hppa/cpu.h +++ b/target/hppa/cpu.h @@ -389,7 +389,8 @@ int hppa_cpu_gdb_write_register(CPUState *cpu, uint8_t = *buf, int reg); void hppa_cpu_dump_state(CPUState *cs, FILE *f, int); #ifndef CONFIG_USER_ONLY void hppa_ptlbe(CPUHPPAState *env); -hwaddr hppa_cpu_get_phys_addr_debug(CPUState *cs, vaddr addr); +bool hppa_cpu_translate_for_debug(CPUState *cs, vaddr addr, + TranslateForDebugResult *result); void hppa_set_ior_and_isr(CPUHPPAState *env, vaddr addr, bool mmu_disabled= ); bool hppa_cpu_tlb_fill_align(CPUState *cs, CPUTLBEntryFull *out, vaddr add= r, MMUAccessType access_type, int mmu_idx, diff --git a/target/hppa/cpu.c b/target/hppa/cpu.c index 07b49e51326..51d9ab186c5 100644 --- a/target/hppa/cpu.c +++ b/target/hppa/cpu.c @@ -245,7 +245,7 @@ static ObjectClass *hppa_cpu_class_by_name(const char *= cpu_model) =20 static const struct SysemuCPUOps hppa_sysemu_ops =3D { .has_work =3D hppa_cpu_has_work, - .get_phys_addr_debug =3D hppa_cpu_get_phys_addr_debug, + .translate_for_debug =3D hppa_cpu_translate_for_debug, }; #endif =20 diff --git a/target/hppa/mem_helper.c b/target/hppa/mem_helper.c index 01e6149c811..2393a155076 100644 --- a/target/hppa/mem_helper.c +++ b/target/hppa/mem_helper.c @@ -346,7 +346,8 @@ int hppa_get_physical_address(CPUHPPAState *env, vaddr = addr, int mmu_idx, return ret; } =20 -hwaddr hppa_cpu_get_phys_addr_debug(CPUState *cs, vaddr addr) +bool hppa_cpu_translate_for_debug(CPUState *cs, vaddr addr, + TranslateForDebugResult *result) { HPPACPU *cpu =3D HPPA_CPU(cs); hwaddr phys; @@ -361,10 +362,20 @@ hwaddr hppa_cpu_get_phys_addr_debug(CPUState *cs, vad= dr addr) excp =3D hppa_get_physical_address(&cpu->env, addr, mmu_idx, 0, 0, &phys, &prot); =20 - /* Since we're translating for debugging, the only error that is a - hard error is no translation at all. Otherwise, while a real cpu - access might not have permission, the debugger does. */ - return excp =3D=3D EXCP_DTLB_MISS ? -1 : phys; + /* + * Since we're translating for debugging, the only error that is a + * hard error is no translation at all. Otherwise, while a real cpu + * access might not have permission, the debugger does. + */ + if (excp =3D=3D EXCP_DTLB_MISS) { + return false; + } + *result =3D (TranslateForDebugResult) { + .physaddr =3D phys, + .lg_page_size =3D TARGET_PAGE_BITS, + .attrs.debug =3D 1, + }; + return true; } =20 void hppa_set_ior_and_isr(CPUHPPAState *env, vaddr addr, bool mmu_disabled) --=20 2.43.0 From nobody Fri Oct 23 21:32:01 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=1792673991; cv=none; d=zohomail.com; s=zohoarc; b=TTC2oWIFZ1oYBLXPLUEABCKExdS463FsIq13TKIVZ7vMfwb/ABN+CCVExNcKScNN0TsRMSvDlPPfqKsPPRGGlGm3EwwUvMwjWCrBb7qXD+/gX3P3+yryHN2H3AmJwapgz7o6+9JKLA8xcYZJhcSX22kENWPP6XFklsCIb0ucz40= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1792673991; h=Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=qI8OBD9x6CAOtPn1OPrDP7VOd6EWQBpJduYoW7fgTe8=; b=Qec99iFavhtF6onNGrp2Ha+h2bBJ5Bx7sBzNsuZgUfQPtlcGPztdSgLiBNCpsELH1esboruUg+PDhPXOuVxDSOqLs+fBmxF8PX4u64OU2CpacDx/BmC8QG2r2nynEKRIdaEfJMwjZ3P5wJb8YOlP+egm04GC/v5GmH/DtqWsX0c= 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 lists1p.gnu.org (lists1p.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1792673991664641.9772628376728; Thu, 22 Oct 2026 05:59:51 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1xJsOS-0001K9-Q6; Thu, 22 Oct 2026 08:59:40 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists1p.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1xJsNv-00013l-QX for qemu-devel@nongnu.org; Thu, 22 Oct 2026 08:59:10 -0400 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 1xJsNu-0007KM-00 for qemu-devel@nongnu.org; Thu, 22 Oct 2026 08:59:07 -0400 Received: by mail-wm1-x332.google.com with SMTP id 5b1f17b1804b1-4a20a37703bso4745595e9.1 for ; Thu, 22 Oct 2026 05:59:05 -0700 (PDT) Received: from lanath.. (wildly.archaic.org.uk. [81.2.115.145]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4a203b439absm79247015e9.9.2026.10.22.05.59.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 22 Oct 2026 05:59:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1792673944; x=1793278744; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to:content-type; bh=qI8OBD9x6CAOtPn1OPrDP7VOd6EWQBpJduYoW7fgTe8=; b=aSawto8d1ECoY5B7AzEYvRXV+ZTig5V9Hr9Y/eo08V5KGB4PwnraYF8sQjucBpox4y y+Sx/u9GuoJorkO9cqYYSN9mEx0eXBmE80zHiCW5Fp2BgTl3RqtEBBJ8Dg+sqaY7uRN4 3LJWxn58N87wS+mkkCi3KdJ3YVLWaVagwWcJQYN7KleSDvd1x8k/Tq1lfe7im/jmBDZO D9jn/X/vBi85sO0mrT82Ip0zPvgr2EaqZs2aaBFT2c0K8Dkz4YLN6jnu8dLtCb7GA7J5 J4GW4F/segLJDNF79bGpJId3NHXXXRv8k0euB2rGEYb3qAzu6R4mQc2D6wCfyibraUxs IUgg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1792673944; x=1793278744; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to:content-type; bh=qI8OBD9x6CAOtPn1OPrDP7VOd6EWQBpJduYoW7fgTe8=; b=K351ke9yfh9Izax7o2B1t1ZvJ3ZnVkGzID6Ur8KIqXUcNGr7YVPWVXI3DFvVss3H8/ EOsVqB7DBJgxU8Ya6cUqTS4TivhpT+WrrlONaPYEfPzjSfdFFfKaYWjOllLWIbhGfkvi TUlCtfZSzttLD5weEytDd7YCOwlKdsyVT6h71idveL1MLX3qN7mSQGKpPR9IpN4Jknfm FqSjNaEm+t6NHHCNi0wdflmWHVT6E7sGIOVCRlw1Gk0Q+PONr7Pbk7xrY2W1YBBe/WRI S0F+WatmGzMAmNWr5xAkUJLm6pQ+JhyhfY2vz1EOFutvHYPjiFMxH2dI/EgTkFpTOkLx XSEg== X-Gm-Message-State: AFq9FYI4HtPmXlIy21OMndmtNvyIy1FX2vpe5oeQk+QHnZctehPPKHRR qQVld+7EunEGAkNYxuw3xr8v9lheUDIRSbIw49O0K2R6L2VjIptLa373/BVdnHtnXfixtJDl3nS PMHb7PLU= X-Gm-Gg: AYBFou1wmfxdZLhbFBb9bLZZyMM/0DsrlNSzzWvqfgwCQreJlojZ7jJOcm/G14wdZRQ rOhaf5NuzKrkkW3V+xYY+m/Ut8kop8NmvNhQy8chdw/Mgoe3ebzz73OU9pYJcBEUfckiFsTg5zA /OeLUytcCFhk6xB+4rlWBOGcO7l2ivx4iJ+f9KuOLvU76WtsGHwfBnZ4p5UmSNPnQgiNprsz5GX Nrqns49Wv9bhKPuYiYhGuMOBiiBNhYLuQ0ZUDAnvw67aDliwpCLLE4e+k6kUbmij28ifWfjw/BM INsvZYQ7MmxNzCGt68zQdyEnOfJqnADohaFWzOc2jleNlKY1vbaOAbPQN7Opus8r3p73FfaQqtI WtKxZ1Y08PQ8pPM1IErBsCrl+8hp84raN9TxelHCFEKT0r6WTHuoila1eOMuKo/Ey6/pyB0CmW1 mFYaDJDZHYNBERkZGKcsuo53IMXo3d0LthWQNYkR0ef+7nWeUohWQR8huMPca60FCezDuaBnkoR OIbtBl6FW06lcdgaf2gbuFViDNLHn+TWmAU3riUzBjVju16Pn6or/mxpNKkYIl+PIIErOL+JYie Er8dhptcwOmiHMVRnthrgbFSfDDhwNsnq1Sj4nrCx0fQAAtcW0tQeAhT8I3s1O9iVdgphbwjYMb OR39mVQ== X-Received: by 2002:a05:600c:4f53:b0:4a1:ce33:1536 with SMTP id 5b1f17b1804b1-4a1fdd20d2amr108196565e9.9.1792673944423; Thu, 22 Oct 2026 05:59:04 -0700 (PDT) From: Peter Maydell To: qemu-devel@nongnu.org Cc: Brian Cain , Pierrick Bouvier , Richard Henderson , Helge Deller , Song Gao <17746591750@163.com>, Bibo Mao , Xianglai Li , Laurent Vivier , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Jiaxun Yang , Aleksandar Rikalo Subject: [PATCH 3/5] target/loongarch: Convert to translate_for_debug Date: Thu, 22 Oct 2026 13:58:56 +0100 Message-ID: <20261022125858.310252-4-peter.maydell@linaro.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20261022125858.310252-1-peter.maydell@linaro.org> References: <20261022125858.310252-1-peter.maydell@linaro.org> MIME-Version: 1.0 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=lists1p.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::332; envelope-from=peter.maydell@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: 1792673993556158500 Content-Type: text/plain; charset="utf-8" Convert loongarch to providing the translate_for_debug method rather than the deprecated get_phys_addr_debug method. Signed-off-by: Peter Maydell Reviewed-by: Philippe Mathieu-Daud=C3=A9 --- target/loongarch/cpu-mmu.h | 3 ++- target/loongarch/cpu.c | 2 +- target/loongarch/cpu_helper.c | 12 +++++++++--- 3 files changed, 12 insertions(+), 5 deletions(-) diff --git a/target/loongarch/cpu-mmu.h b/target/loongarch/cpu-mmu.h index 54fb732d62d..491eb514d9d 100644 --- a/target/loongarch/cpu-mmu.h +++ b/target/loongarch/cpu-mmu.h @@ -99,7 +99,8 @@ TLBRet loongarch_ptw(CPULoongArchState *env, MMUContext *= context, int access_type, int mmu_idx, int debug); void get_dir_base_width(CPULoongArchState *env, uint64_t *dir_base, uint64_t *dir_width, unsigned int level); -hwaddr loongarch_cpu_get_phys_addr_debug(CPUState *cpu, vaddr addr); +bool loongarch_cpu_translate_for_debug(CPUState *cpu, vaddr addr, + TranslateForDebugResult *result); uint64_t loongarch_palen_mask(CPULoongArchState *env); =20 #endif /* LOONGARCH_CPU_MMU_H */ diff --git a/target/loongarch/cpu.c b/target/loongarch/cpu.c index 54c26998979..69d9658f8ce 100644 --- a/target/loongarch/cpu.c +++ b/target/loongarch/cpu.c @@ -841,7 +841,7 @@ static void loongarch_cpu_dump_state(CPUState *cs, FILE= *f, int flags) static const struct SysemuCPUOps loongarch_sysemu_ops =3D { .has_work =3D loongarch_cpu_has_work, .write_elf64_note =3D loongarch_cpu_write_elf64_note, - .get_phys_addr_debug =3D loongarch_cpu_get_phys_addr_debug, + .translate_for_debug =3D loongarch_cpu_translate_for_debug, }; =20 static int64_t loongarch_cpu_get_arch_id(CPUState *cs) diff --git a/target/loongarch/cpu_helper.c b/target/loongarch/cpu_helper.c index 123cad3d930..270917184a6 100644 --- a/target/loongarch/cpu_helper.c +++ b/target/loongarch/cpu_helper.c @@ -363,7 +363,8 @@ TLBRet get_physical_address(CPULoongArchState *env, MMU= Context *context, return loongarch_map_address(env, context, access_type, mmu_idx, is_de= bug); } =20 -hwaddr loongarch_cpu_get_phys_addr_debug(CPUState *cs, vaddr addr) +bool loongarch_cpu_translate_for_debug(CPUState *cs, vaddr addr, + TranslateForDebugResult *result) { CPULoongArchState *env =3D cpu_env(cs); MMUContext context; @@ -371,9 +372,14 @@ hwaddr loongarch_cpu_get_phys_addr_debug(CPUState *cs,= vaddr addr) context.addr =3D addr; if (get_physical_address(env, &context, MMU_DATA_LOAD, cpu_mmu_index(cs, false), 1) !=3D TLBRET_MATC= H) { - return -1; + return false; } - return context.physical; + *result =3D (TranslateForDebugResult) { + .physaddr =3D context.physical, + .attrs.debug =3D 1, + .lg_page_size =3D TARGET_PAGE_BITS, + }; + return true; } =20 uint64_t loongarch_palen_mask(CPULoongArchState *env) --=20 2.43.0 From nobody Fri Oct 23 21:32:01 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=1792674030; cv=none; d=zohomail.com; s=zohoarc; b=YzF0idxscSqOlrxq5zbrZAn4SQQrNmXDCgVJ0x431RlVu5+HNxpcOUq2JzV0bWCNqMlfYaBVCxsAndeQ2iHWhqUueNNlSzY1vspPub7fGdoUe1Mek4iIvKOx9YPOfgy06qEo7K2S7R0T4ngJQ2W9M4lvIAqYEsDosC+mp5M1duA= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1792674030; h=Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=QPQ7UhwLGjAGntITSh1z8fUIdTcQC3SFVKTSXT7fyA4=; b=XfUj+pJxIGCF9SCnA581iKPMsPL8iKMgr9SRqZGXzdCqTdPxq4veN+I3irggipEnyhvCigLI07PUm0Ys3lTosNiDi5L31wxboSmHrx479jc4sWAiFINAQpgD/nzBTqlXe0rM9t3VM9FdmJsU8pb8M59q1G8n1cF+PXa1dr6XbGg= 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 lists1p.gnu.org (lists1p.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1792674030855701.231201928524; Thu, 22 Oct 2026 06:00:30 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1xJsOI-0001A3-SK; Thu, 22 Oct 2026 08:59:32 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists1p.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1xJsNx-00013x-6g for qemu-devel@nongnu.org; Thu, 22 Oct 2026 08:59:10 -0400 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 1xJsNv-0007KX-6G for qemu-devel@nongnu.org; Thu, 22 Oct 2026 08:59:08 -0400 Received: by mail-wm1-x32f.google.com with SMTP id 5b1f17b1804b1-4a20bdaf39cso4504205e9.1 for ; Thu, 22 Oct 2026 05:59:06 -0700 (PDT) Received: from lanath.. (wildly.archaic.org.uk. [81.2.115.145]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4a203b439absm79247015e9.9.2026.10.22.05.59.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 22 Oct 2026 05:59:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1792673946; x=1793278746; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to:content-type; bh=QPQ7UhwLGjAGntITSh1z8fUIdTcQC3SFVKTSXT7fyA4=; b=OWpKECr63StT51LiRD4T35OtXsPerqKiJny6Sv3I4uNC35T6iaMTse4A02FMD+iUNM j1yRIhL0la9cS4zn5FkQ4ebfarpUskBbLw05wxDPuZIpwrvBWH+wuzkStw/EQRmCB0eG OfhdByjdDBtoJJvqL/cl1UmHyNQAwQNJ4g/E11Ly/uBXUXN0uRobT7t8CYnZrQSbHhik gnaLF1J9dWxqsCTIKS7vU1HJoRmgPqr78KcHE4QrmAx9D1jfNjLsZeri7WgGK8weQRQz pcavVEb44kXIEM8kU2sLDQZFGfuwZ0jaKT67DQzEZP2IRq+TcPbNPD/VGhunGS5JBADr 60xA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1792673946; x=1793278746; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to:content-type; bh=QPQ7UhwLGjAGntITSh1z8fUIdTcQC3SFVKTSXT7fyA4=; b=Xsfi9BIrQGLJCSMQ8lFakNI/QxqNq0Ohd7jyM6ge+n81A8OlnJ/mw6PCCFzE3qIQDI +1RiXasJMSLp55FT0+WrMUzp8SQksAgvNtMMQQd6IgFchz6d6HDR1VkgDL2XHEI3WbQX uavF9YxzVON9eBE31J4ZNqMDpr6pNLXx2MMbFPMQSPQDqjkz0WL6nzZQUWTLMSe1Q/au xupfBEZQlmJn6a4b018FUzTeTb4x0bp3E4ZGAq6RveVGZd40sGpaO31fcFe1+Tv+mYcJ qjbQFJ7lUaSO7iyEWk0RWLT8XA3UjT1ISxdrX4TYPFWWCQbmRGM+AlB5TP811iPJa0jz H52g== X-Gm-Message-State: AFq9FYI7QqDRkYFwB/eP0+/TWtGta+2obxgN8gIhleQJk01w8x+KGdWR +ST2+EPTQU8F0/e40pTCcUsqeiy7EjyBsgENkZ5ahpKCPzPl9j0uLkAF4mOWalRD2MpRec/e3JR 2mTkJ59s= X-Gm-Gg: AYBFou0Wsxw8K//FedyH5fADPNfRCuGOlULszPQAZRrwZmaOpPwO6VlPV1Z71wEcUrk 8/AnW6JS83AS6YBRqE4yh6sJNPztk63e1DBp1Cu+vTeAzwk209bvqvfw/KYnglQOOqHCTvfg183 xtitkZsNYhkFl+pZYfxZQ0/SzhIQV1HZOlS0XOmdNIb/ZJcMsLFX7nsZ+9iotNS26f4rgeEveEy i0fW+HQJDZeBSR9gODWRv75S2XTpMgSkhTLW2yumVZjbNejeBNI3mReHOMJnGXdGUQlJxwzkUb9 FSQYwVRZjhpxXizarJJGq0A9903b2up+5FFgkqPVSAPF16RSdqRvkUve1qtHgPsfujyveKeq6SB e+i3zMYp9qwheiQ4lgBfGjEOuKaw+4f8YodaX0V4SxMkuJKsn3oUAsrfEaexlK8wOlMph0cQc9U R9KT1bWg0fyA9sGRGO7WAwayYJ4gLkwxiz4NwuvYh41OBQzulavCYIHewRsqAEgShTrjCgyZHvo 8WQaMpn9aPa1gHcjw2uAxRfnFMIz2TQpyX64NL8sJRUVFYdeUK84FlYrxeRO5v2aU81baKzxPYU RAik46z6NxmBkH80EgN4+dQQSMsmy7vZuRX+pBsSvUP8t7wjSrPoo3tefTzf X-Received: by 2002:a05:600c:3115:b0:4a1:fba8:b13d with SMTP id 5b1f17b1804b1-4a1fdaf7457mr106577095e9.9.1792673945770; Thu, 22 Oct 2026 05:59:05 -0700 (PDT) From: Peter Maydell To: qemu-devel@nongnu.org Cc: Brian Cain , Pierrick Bouvier , Richard Henderson , Helge Deller , Song Gao <17746591750@163.com>, Bibo Mao , Xianglai Li , Laurent Vivier , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Jiaxun Yang , Aleksandar Rikalo Subject: [PATCH 4/5] target/m68k: Convert to translate_for_debug Date: Thu, 22 Oct 2026 13:58:57 +0100 Message-ID: <20261022125858.310252-5-peter.maydell@linaro.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20261022125858.310252-1-peter.maydell@linaro.org> References: <20261022125858.310252-1-peter.maydell@linaro.org> MIME-Version: 1.0 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=lists1p.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::32f; envelope-from=peter.maydell@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: 1792674033295158500 Content-Type: text/plain; charset="utf-8" Convert m68k to providing the translate_for_debug method rather than the deprecated get_phys_addr_debug method. Signed-off-by: Peter Maydell Reviewed-by: Philippe Mathieu-Daud=C3=A9 --- target/m68k/cpu.h | 3 ++- target/m68k/cpu.c | 2 +- target/m68k/helper.c | 16 ++++++++++++---- 3 files changed, 15 insertions(+), 6 deletions(-) diff --git a/target/m68k/cpu.h b/target/m68k/cpu.h index 7cf3791108c..bd2582d5891 100644 --- a/target/m68k/cpu.h +++ b/target/m68k/cpu.h @@ -185,7 +185,8 @@ struct M68kCPUClass { #ifndef CONFIG_USER_ONLY void m68k_cpu_do_interrupt(CPUState *cpu); bool m68k_cpu_exec_interrupt(CPUState *cpu, int int_req); -hwaddr m68k_cpu_get_phys_addr_debug(CPUState *cpu, vaddr addr); +bool m68k_cpu_translate_for_debug(CPUState *cpu, vaddr addr, + TranslateForDebugResult *result); #endif /* !CONFIG_USER_ONLY */ void m68k_cpu_dump_state(CPUState *cpu, FILE *f, int flags); int m68k_cpu_gdb_read_register(CPUState *cpu, GByteArray *buf, int reg); diff --git a/target/m68k/cpu.c b/target/m68k/cpu.c index 9b52ad5fc23..69864faa575 100644 --- a/target/m68k/cpu.c +++ b/target/m68k/cpu.c @@ -688,7 +688,7 @@ static const MonitorDef m68k_monitor_defs[] =3D { =20 static const struct SysemuCPUOps m68k_sysemu_ops =3D { .has_work =3D m68k_cpu_has_work, - .get_phys_addr_debug =3D m68k_cpu_get_phys_addr_debug, + .translate_for_debug =3D m68k_cpu_translate_for_debug, #ifdef CONFIG_HMP .monitor_defs =3D m68k_monitor_defs, #endif diff --git a/target/m68k/helper.c b/target/m68k/helper.c index 5f91d206f59..c30854a6746 100644 --- a/target/m68k/helper.c +++ b/target/m68k/helper.c @@ -908,7 +908,8 @@ txfail: return -1; } =20 -hwaddr m68k_cpu_get_phys_addr_debug(CPUState *cs, vaddr addr) +bool m68k_cpu_translate_for_debug(CPUState *cs, vaddr addr, + TranslateForDebugResult *result) { CPUM68KState *env =3D cpu_env(cs); hwaddr phys_addr; @@ -918,7 +919,8 @@ hwaddr m68k_cpu_get_phys_addr_debug(CPUState *cs, vaddr= addr) =20 if ((env->mmu.tcr & M68K_TCR_ENABLED) =3D=3D 0) { /* MMU disabled */ - return addr; + phys_addr =3D addr; + goto success; } =20 access_type =3D ACCESS_DATA | ACCESS_DEBUG; @@ -928,10 +930,16 @@ hwaddr m68k_cpu_get_phys_addr_debug(CPUState *cs, vad= dr addr) =20 if (get_physical_address(env, &phys_addr, &prot, addr, access_type, &page_size) !=3D 0) { - return -1; + return false; } =20 - return phys_addr; +success: + *result =3D (TranslateForDebugResult) { + .physaddr =3D phys_addr, + .lg_page_size =3D TARGET_PAGE_BITS, + .attrs.debug =3D 1, + }; + return true; } =20 /* --=20 2.43.0 From nobody Fri Oct 23 21:32:01 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=1792674002; cv=none; d=zohomail.com; s=zohoarc; b=T2gu6INPSbrcvTFpPbE9wpcqYy/iULKSLuy2XDS21r65F4ZyGHkM6VWigs+esW8j0OfdJDHJaytb8zQ7lhL6Em7GU9pKtDkyqGb95k8dZ2pPPU+ZjD515MUH70Za4L9jtNtoA3CBlMXLBja68NzBJlHg2vPc0rBCCksBIsQJeIo= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1792674002; h=Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=5q8cqXkH4d0IOT4zH3mEoMRfAvV9e/9SmmXGC/TaIL0=; b=BtZDMAEQOGy8UIurr/IbKKoj88DXXHt17SOXdRk4AIqYh7ULY4jXO6okIzlzAKdMF+6GBg60QZFB1pdJUMcBIOsHAMXQi5jGma+QmH6IbbAe2jNCahdafwxIZHgO5FGOT3wyRcCCxg9qRZvj9024NaZkR1XxdWb9En+vJSlbBxA= 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 lists1p.gnu.org (lists1p.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1792674002134764.2567482847261; Thu, 22 Oct 2026 06:00:02 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1xJsOU-0001Rh-Gh; Thu, 22 Oct 2026 08:59:42 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists1p.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1xJsNy-00014X-JL for qemu-devel@nongnu.org; Thu, 22 Oct 2026 08:59:12 -0400 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 1xJsNw-0007Km-I5 for qemu-devel@nongnu.org; Thu, 22 Oct 2026 08:59:10 -0400 Received: by mail-wm1-x333.google.com with SMTP id 5b1f17b1804b1-4a20e5628f2so225245e9.2 for ; Thu, 22 Oct 2026 05:59:08 -0700 (PDT) Received: from lanath.. (wildly.archaic.org.uk. [81.2.115.145]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4a203b439absm79247015e9.9.2026.10.22.05.59.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 22 Oct 2026 05:59:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1792673947; x=1793278747; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to:content-type; bh=5q8cqXkH4d0IOT4zH3mEoMRfAvV9e/9SmmXGC/TaIL0=; b=BZZL0pw+RZCnKKQxMQVx8hxtqhKHsfjUBybwTttLGY26pPEbIfYEdb2f+l64KQaSZH 2poRQB7icarPo2uhQ5m+nFYCnocUx39XZQYWOnLVJHS3C8h7r3W8aKpeEP/4C7i01UQ5 UfYBGpwrV4aXqHF7NDoYlDw1ZPewFyqND9jZVia8+7EStUb1/AyHxqnXwgGBFGp5IEX5 QhV2igBErUxBvNON2NP8FxfN6mOkGET+QbKV2EzJsI8veLF/kCMg3TDIC0nrZORPSe/r AhjcSDBYIW0AsrucX0AzFu8vmHu12an9GuVh2RPwwwS/imQvRwpP1VaDpOZfUN1N45i4 fV7Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1792673947; x=1793278747; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to:content-type; bh=5q8cqXkH4d0IOT4zH3mEoMRfAvV9e/9SmmXGC/TaIL0=; b=HsX3odBFtyMtiXkC8VHLKw/60ViLnZDzb8NOttda3IpMBrnUJOehupPdC/0jqMZooC THhfQi4dgfDvPCO96CFq1F+kqXbC+K9eXmzA6rfx21W4ZBQsVkz/YEXC3rqNBqb1LltC PSjA3xchA5nSmh9jyQhQfAV+Ft9/Nlp5x35ATe30Rc5w4hb5hpdFMZDOsuWbcKYAafqk CfnA+M8n2+TQj+Td6HIJybIzoSfhyqtdGfe3pqtk5SLIBA9/tRojs3QCzMwAtZOC9LYk bGp4Gi5vgUDhVYtT+Wnt57TyDdu36wJ3Xh8yG7L3YwSjEJHiMo7u/vk9oi7iVOUDDeBa LOJA== X-Gm-Message-State: AFq9FYL5322hQExsrNqfCITEs8NO1JAsIByw/NZDVgWLY3+T9knvgCQO 6HPKince4iWrKym4BOSy4tdHeXKUCO+7AwDINj++BctunDs/Hugp4ZbsvZyInTgqm4UUNHFasXI +K0qXItI= X-Gm-Gg: AYBFou0coBt0adxDOkXhjxd8WfwdqVStx2Q54slbCLbvk4AaUkEiOVzHX2VbC0uwvT4 bNMI7ovnICsUS5HduH8RuQIv8EMxWA/f6sqVCd+imT3QyYYT0R7pwmgPTCeIhMcPINLeOGACikr ha2PWpG8WgPN4YsRRNeEPchS+gRdoQZzbr0lMuYrmXP+fPfLLWaJcgq+vy5oV1wbxjCld7k0zkO cpbtpiVcC2KI5MIqQ5mO0/z/LCCbc/AgqpCxseC1T9LSJkl+BmT70kwhDLA/FJrQYObn20ntO+v mtZxbd4hZl5Ewsc/zsomZBmVnXazqSiouhljc9p3jdBitKHFWhvT4IO7Ifm4JKrBtyo+9GhlXjF pMgx+6N+2aoxMQIKc0fYXNi8pLjaGcgjwkhaOY0Kpp/6UMjvnYGZRtj1ERFiJx4Chatynwjx/4k zAT8mIS3Cm5Te8k4xI2ksVZkU8xr58c2Fu2Lz6qljC/d0YaTouhprsXvG95dy0ZEh7jzVWzbaH6 iYVCmCimXnj8On/JoB+jtjH0cclNRZfBAQI8jGDCy1bMiDkEvcQhqdoE06715uF1PfDrwxic6rU T2KwhoarI8nHkE0EWaT4LQysXmGS1pv0XSJAgmV7MJxNZuRpSDinUrYSNxsA X-Received: by 2002:a05:600c:5391:b0:4a1:d537:1c8d with SMTP id 5b1f17b1804b1-4a1fdd23e21mr109204925e9.19.1792673947054; Thu, 22 Oct 2026 05:59:07 -0700 (PDT) From: Peter Maydell To: qemu-devel@nongnu.org Cc: Brian Cain , Pierrick Bouvier , Richard Henderson , Helge Deller , Song Gao <17746591750@163.com>, Bibo Mao , Xianglai Li , Laurent Vivier , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Jiaxun Yang , Aleksandar Rikalo Subject: [PATCH 5/5] target/mips: Convert to translate_for_debug Date: Thu, 22 Oct 2026 13:58:58 +0100 Message-ID: <20261022125858.310252-6-peter.maydell@linaro.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20261022125858.310252-1-peter.maydell@linaro.org> References: <20261022125858.310252-1-peter.maydell@linaro.org> MIME-Version: 1.0 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=lists1p.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::333; envelope-from=peter.maydell@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: 1792674004180158500 Content-Type: text/plain; charset="utf-8" Convert mips to providing the translate_for_debug method rather than the deprecated get_phys_addr_debug method. Signed-off-by: Peter Maydell Reviewed-by: Philippe Mathieu-Daud=C3=A9 --- target/mips/internal.h | 3 ++- target/mips/cpu.c | 2 +- target/mips/system/physaddr.c | 13 ++++++++++--- 3 files changed, 13 insertions(+), 5 deletions(-) diff --git a/target/mips/internal.h b/target/mips/internal.h index 7dba22300b1..f054dca5f7a 100644 --- a/target/mips/internal.h +++ b/target/mips/internal.h @@ -118,7 +118,8 @@ enum { int get_physical_address(CPUMIPSState *env, hwaddr *physical, int *prot, target_ulong real_address, MMUAccessType access_type, int mmu_idx); -hwaddr mips_cpu_get_phys_addr_debug(CPUState *cpu, vaddr addr); +bool mips_cpu_translate_for_debug(CPUState *cpu, vaddr addr, + TranslateForDebugResult *result); =20 typedef struct r4k_tlb_t r4k_tlb_t; struct r4k_tlb_t { diff --git a/target/mips/cpu.c b/target/mips/cpu.c index 0fead20d651..c618fd3d000 100644 --- a/target/mips/cpu.c +++ b/target/mips/cpu.c @@ -659,7 +659,7 @@ static ObjectClass *mips_cpu_class_by_name(const char *= cpu_model) =20 static const struct SysemuCPUOps mips_sysemu_ops =3D { .has_work =3D mips_cpu_has_work, - .get_phys_addr_debug =3D mips_cpu_get_phys_addr_debug, + .translate_for_debug =3D mips_cpu_translate_for_debug, .legacy_vmsd =3D &vmstate_mips_cpu, }; #endif diff --git a/target/mips/system/physaddr.c b/target/mips/system/physaddr.c index 746dbf8aa4e..6f11e70ba80 100644 --- a/target/mips/system/physaddr.c +++ b/target/mips/system/physaddr.c @@ -19,6 +19,7 @@ #include "qemu/osdep.h" #include "cpu.h" #include "exec/page-protection.h" +#include "exec/target_page.h" #include "../internal.h" =20 static int is_seg_am_mapped(unsigned int am, bool eu, int mmu_idx) @@ -227,7 +228,8 @@ int get_physical_address(CPUMIPSState *env, hwaddr *phy= sical, return ret; } =20 -hwaddr mips_cpu_get_phys_addr_debug(CPUState *cs, vaddr addr) +bool mips_cpu_translate_for_debug(CPUState *cs, vaddr addr, + TranslateForDebugResult *result) { CPUMIPSState *env =3D cpu_env(cs); hwaddr phys_addr; @@ -235,7 +237,12 @@ hwaddr mips_cpu_get_phys_addr_debug(CPUState *cs, vadd= r addr) =20 if (get_physical_address(env, &phys_addr, &prot, addr, MMU_DATA_LOAD, mips_env_mmu_index(env)) !=3D 0) { - return -1; + return false; } - return phys_addr; + *result =3D (TranslateForDebugResult) { + .physaddr =3D phys_addr, + .lg_page_size =3D TARGET_PAGE_BITS, + .attrs.debug =3D 1, + }; + return true; } --=20 2.43.0