From nobody Mon Nov 23 04:18:50 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; 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 Return-Path: Received: from lists1p.gnu.org (lists1p.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1793367538787677.4527487710549; Fri, 30 Oct 2026 06:38:58 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1xMmoV-00063R-Mo; Fri, 30 Oct 2026 09:38:35 -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 1xMmoL-00060k-7J; Fri, 30 Oct 2026 09:38:26 -0400 Received: from bambi.snowrabbit.org ([182.48.54.220]) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1xMmoI-0007ak-JJ; Fri, 30 Oct 2026 09:38:24 -0400 Received: by bambi.snowrabbit.org (Postfix, from userid 3001) id 73B34C92D4; Fri, 30 Oct 2026 22:38:18 +0900 (JST) Message-ID: <179336730662.79983.8981663569075755166.745-hid-v2@snowrabbit.org> From: Showta Ishizaki Subject: [PATCH v2] target/ppc: Register the 745's HID0 and HID1 once To: qemu-devel@nongnu.org, qemu-ppc@nongnu.org Cc: Nicholas Piggin , Chinmay Rath , Harsh Prateek Bora , Glenn Miles , BALATON Zoltan , Fabiano Rosas , qemu-stable@nongnu.org, Showta Ishizaki MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Date: Fri, 30 Oct 2026 22:38:18 +0900 (JST) 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=182.48.54.220; envelope-from=zakinko@snowrabbit.org; helo=bambi.snowrabbit.org X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, 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-ZM-MESSAGEID: 1793367543110158500 Content-Type: text/plain; charset="utf-8" init_proc_745(), which the 755 shares, calls register_7xx_sprs() and then register_745_sprs(). Since HID0 and HID1 moved into register_7xx_sprs(), both functions register them the same way, and _spr_register() asserts that no SPR is registered twice, so the 745 and the 755 cannot be created at all: $ qemu-system-ppc -M none -cpu 745 Assertion failed: (spr->name =3D=3D NULL), function _spr_register, file helper_regs.c, line 419. Leave the two to register_7xx_sprs(). Fixes: 0301b39c78c8 ("target/ppc: cpu_init: Deduplicate 7xx SPR registratio= n") Cc: qemu-stable@nongnu.org Reviewed-by: Fabiano Rosas Signed-off-by: Showta Ishizaki --- v2: Drop the comment saying where HID0 and HID1 are registered; keep the existing "Hardware implementation registers" line (BALATON Zoltan) target/ppc/cpu_init.c | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/target/ppc/cpu_init.c b/target/ppc/cpu_init.c index 7f3036d903e..b12ac630a6c 100644 --- a/target/ppc/cpu_init.c +++ b/target/ppc/cpu_init.c @@ -87,16 +87,6 @@ static void register_745_sprs(CPUPPCState *env) 0x00000000); =20 /* Hardware implementation registers */ - spr_register(env, SPR_HID0, "HID0", - SPR_NOACCESS, SPR_NOACCESS, - &spr_read_generic, &spr_write_generic, - 0x00000000); - - spr_register(env, SPR_HID1, "HID1", - SPR_NOACCESS, SPR_NOACCESS, - &spr_read_generic, &spr_write_generic, - 0x00000000); - spr_register(env, SPR_HID2, "HID2", SPR_NOACCESS, SPR_NOACCESS, &spr_read_generic, &spr_write_generic, base-commit: 9703b6cf418d2ce72fae8d00e511135ce0bfda43