From nobody Mon Nov 23 04:36:07 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=gmail.com ARC-Seal: i=1; a=rsa-sha256; t=1793903655; cv=none; d=zohomail.com; s=zohoarc; b=Tfu7Bw04mUxlDvJ7xQY64ts+xj+2nJfmhTWw/iCbHocBnEx8EByCcFk6NBcaXke2+Hxu8vAL1GMK5Tf23E72wYNVDWUFFSeKBBTKJ3ihIeQH0Jyk9s+S/cTsSV/bynGqHZ4ZyK4kuAGwApnmBu/mbhygD9i8gYzx3vVDk714Krw= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1793903655; 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=EFNSrzxzwfKs1jErYYgeJAHc5AJGMN0OaeLJcCaY8O4=; b=dEK48gPYMMoM+RZ2PunKdLakQgKqtf/LBaIDswD6irXLozPP3A0kpm/U85L1QkvfORt9H2oii7y5XFL0TWElg2P5bVQpaMZEgeGLVZsOh3/T98n5PDFmwlmdQwlct7nvr+kYuk9LcdKcE36k2COxq/YZXAomR4nouXgtneSFSk4= 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 1793903655508994.0256089399555; Thu, 5 Nov 2026 10:34:15 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1xP2HS-00058R-2w; Thu, 05 Nov 2026 13:33:47 -0500 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 1xP2HF-00056y-Ee for qemu-devel@nongnu.org; Thu, 05 Nov 2026 13:33:34 -0500 Received: from mail-dy1-x132e.google.com ([2607:f8b0:4864:20::132e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1xP2HA-0007e9-Hs for qemu-devel@nongnu.org; Thu, 05 Nov 2026 13:33:30 -0500 Received: by mail-dy1-x132e.google.com with SMTP id 5a478bee46e88-36eb1cb7aabso1098904eec.0 for ; Thu, 05 Nov 2026 10:33:28 -0800 (PST) Received: from DESKTOP-Q716RM7 ([103.94.185.75]) by smtp.googlemail.com with ESMTPSA id 5a478bee46e88-36f66086a4asm277795eec.0.2026.11.05.10.33.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 05 Nov 2026 10:33:25 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20260707; t=1793903607; x=1794508407; 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=EFNSrzxzwfKs1jErYYgeJAHc5AJGMN0OaeLJcCaY8O4=; b=gdzSkZEU/SFeTIu2o4n9dtHpqPTKMtjwNmMabat86uD29Z2jsKrpFOFSfFmJvlGERR RKU71RWSerlgcr9O3kvf6w+mPAIlxpoHpX/YIAootbpBXcRDVVBzEkz70W8aEa4c1T6h V6KrXaCvD1jImRbWzDc4LHZyWYJ6q169iYq9oogZytI8M4swXS7tY9vqO5QXJIVZL8a1 LN5ZB+N766YxHa+WObppwQdnlcZ0hMGM71TUeegARFnqhpjmpPgx/Hz+5MqqqXIgdsX8 EOHSQfxOBG1FgMt+YkoRvEor5mwD4SJdwF3ZuLXlj99CnvQr2ce1Ii6Zfru7Qv9cvhGo pTVg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1793903607; x=1794508407; 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=EFNSrzxzwfKs1jErYYgeJAHc5AJGMN0OaeLJcCaY8O4=; b=N6SgZCIltCR9WndtbWjCX8dk+RHy+bVvzKdz9SaDTF7Wc3KVuI0tkqsnOheZA3nyCI 4iSfHdxyhNWQhgmNDAnGu5o/O1R7wglfIIp9boQ4EZzklC7ODlqRqpEYDb/Y+Ya41xgB hm7y8NmzwX63mZItCRhHkjfClhIoQGL787RQOWQJlNyBd+sirgbwSw0/vA54vWmnd7Dv 3FfNI4QXP+gD2IeIS3qC4B2JYKH8HYcYI9pjeBs+zD7lBZh5ayJDxxAnftBzlmi9Cn4l 6HAPHyIReXufKU+KZcPHmZDwRcusLbt/oZFUZRAX64UlbF1e/xXASWhAavieNxN7oDIP AFzA== X-Gm-Message-State: APuU4Z9DzMUiPnHdp8xUyiDPwT3r2f32pThAuZPjIVSz871o61FYPdwh AL1GQxLpou0OdN2dWMgT5Smc54Kkb6c+K/484oIBe1ftc0jki7UjHG/QCCrTKjyeBzU= X-Gm-Gg: AYBFou2heYilndVEVl1twcJGhl4I8NcHXyDXSt8n/UDtdDwgePOt/p1ekwQxOdH8Wsr DzZEy/H5kCHjwkubkiNqJNwl+Pe34NRlWrRnzj/YZy8GrqeD0VgBjTH8S3FPgFlpZ5aCzOlX8On GNBtcFZ8ZdW6WuS22i+zCAgDYZ3OXLLJbB0yAdNZCMbJUfL3Q0A5A0aCts9BSu4bHPLCUg4u5Iu 0oGg7L0vYA32hML3slgc6wcvwWncRvQT1gsuth6UT5DHxdQkqXvO562a9SiZlmKA/9PnW+DmUNC AZjTQJ45CnqoZbwoYIPlS26EXuIxLvVs7Fl8uwc/3qw/5t6Dzo1RCJNwN0WZUfG+sseiL6fxKvY dBIjJMUwi92fqH2Q7Asmm7vNwYeTU9fOnNCqJ0ICQ0voUvpxhyMkPGdfRC/vvitMXVP4mxJcFp5 sNHlVdjwIRZAbInkz8aYQ9GyY8cLwA9phLIQaaPDxBndFT/fLhT8ebj5tdrWdyzeC1Qqc/eWB0X A0GL21/7t6cllVZiYkWffiKWUOdTxY8yXKDtIGO6bjQ+sUgYrOki33nBgu7jmIJfH/XGDz3ixeE Z2HMddGPfZ285zLLndwnIpfTK414u1TwO/I8rDPQlnBXNKFk X-Received: by 2002:a05:693c:839a:20b0:36e:371:8255 with SMTP id 5a478bee46e88-36f6fb7f6b0mr36858eec.0.1793903606279; Thu, 05 Nov 2026 10:33:26 -0800 (PST) From: Yonggang Luo To: qemu-devel@nongnu.org Cc: Chao Liu , Peter Maydell , Weiwei Li , Richard Henderson , Alistair Francis , Harsh Prateek Bora , Daniel Henrique Barboza , qemu-arm@nongnu.org, qemu-riscv@nongnu.org, Glenn Miles , Zhao Liu , Chinmay Rath , Philippe Mathieu-Daude , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , qemu-ppc@nongnu.org, Palmer Dabbelt , Paolo Bonzini , Pierrick Bouvier , Nicholas Piggin Subject: [PATCH v4 1/3] accel: register CPU parent only for AccelCPU subclasses Date: Fri, 6 Nov 2026 02:33:07 +0800 Message-ID: <20261105183310.1614-2-luoyonggang@gmail.com> X-Mailer: git-send-email 2.55.0.windows.3 In-Reply-To: <20261105183310.1614-1-luoyonggang@gmail.com> References: <20261105183310.1614-1-luoyonggang@gmail.com> 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=2607:f8b0:4864:20::132e; envelope-from=luoyonggang@gmail.com; helo=mail-dy1-x132e.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, FREEMAIL_FROM=0.001, 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 @gmail.com) X-ZM-MESSAGEID: 1793903656897158500 Content-Type: text/plain; charset="utf-8" accel_cpu_register_type() creates the abstract parent accel-. A subclass names that parent, and type_initialize() aborts when the parent is missing. The old type_init registered only target_cpu_type(), which is one name in a multi-target process. Call the helper from the CPU type init of each target that has an AccelCPU subclass. ARM calls it because whpx-common.c parents accel-arm-cpu on aarch64-softmmu. i386 calls it for TCG, KVM, HVF, NVMM, and MSHV. i386-softmmu and x86_64-softmmu each pass their own CPU_RESOLVING_TYPE, so WHPX on x86_64-softmmu finds accel-x86_64-cpu. RISC-V calls it for TCG and KVM. PowerPC calls it for KVM. Other targets have no AccelCPU subclass. Machine init looks up tcg-accel- or kvm-accel- and skips a missing class, so those targets do not need the parent. test-multi-target checks the parent only for the CPU types that register it. Signed-off-by: Yonggang Luo --- accel/accel-common.c | 6 ++---- include/accel/accel-cpu.h | 2 ++ target/arm/cpu.c | 2 ++ target/i386/cpu.c | 2 ++ target/ppc/cpu_init.c | 2 ++ target/riscv/cpu.c | 8 ++++++++ tests/unit/test-multi-target.c | 25 +++++++++++++++++++++++++ 7 files changed, 43 insertions(+), 4 deletions(-) diff --git a/accel/accel-common.c b/accel/accel-common.c index 00a400243f..441d1b77fa 100644 --- a/accel/accel-common.c +++ b/accel/accel-common.c @@ -130,9 +130,9 @@ static const TypeInfo accel_types[] =3D { =20 DEFINE_TYPES(accel_types) =20 -static void register_accel_target_type(void) +void accel_cpu_register_type(const char *cpu_type) { - g_autofree char *name =3D g_strconcat("accel-", target_cpu_type(), NUL= L); + g_autofree char *name =3D g_strconcat("accel-", cpu_type, NULL); const TypeInfo accel_cpu_type =3D { .name =3D name, .parent =3D TYPE_OBJECT, @@ -142,5 +142,3 @@ static void register_accel_target_type(void) =20 type_register_static(&accel_cpu_type); } - -type_init(register_accel_target_type); diff --git a/include/accel/accel-cpu.h b/include/accel/accel-cpu.h index 9e7eede7c3..2fdb64d2ae 100644 --- a/include/accel/accel-cpu.h +++ b/include/accel/accel-cpu.h @@ -20,4 +20,6 @@ typedef struct AccelCPUClass { bool (*cpu_target_realize)(CPUState *cpu, Error **errp); } AccelCPUClass; =20 +void accel_cpu_register_type(const char *cpu_type); + #endif /* ACCEL_CPU_H */ diff --git a/target/arm/cpu.c b/target/arm/cpu.c index 71681447b2..725f1f3a5f 100644 --- a/target/arm/cpu.c +++ b/target/arm/cpu.c @@ -28,6 +28,7 @@ #include "qemu/module.h" #include "qapi/error.h" #include "cpu.h" +#include "accel/accel-cpu.h" #ifdef CONFIG_TCG #include "exec/translation-block.h" #include "accel/tcg/cpu-ops.h" @@ -2753,6 +2754,7 @@ static const TypeInfo arm_cpu_type_info =3D { =20 static void arm_cpu_register_types(void) { + accel_cpu_register_type(CPU_RESOLVING_TYPE); type_register_static(&arm_cpu_type_info); } =20 diff --git a/target/i386/cpu.c b/target/i386/cpu.c index eab0d5a4d4..31b09e6f8e 100644 --- a/target/i386/cpu.c +++ b/target/i386/cpu.c @@ -23,6 +23,7 @@ #include "qemu/qemu-print.h" #include "qemu/hw-version.h" #include "cpu.h" +#include "accel/accel-cpu.h" #include "tcg/helper-tcg.h" #include "exec/translation-block.h" #include "system/hvf.h" @@ -11093,6 +11094,7 @@ static void x86_cpu_register_types(void) { int i; =20 + accel_cpu_register_type(CPU_RESOLVING_TYPE); type_register_static(&x86_cpu_type_info); for (i =3D 0; i < ARRAY_SIZE(builtin_x86_defs); i++) { x86_register_cpudef_types(&builtin_x86_defs[i]); diff --git a/target/ppc/cpu_init.c b/target/ppc/cpu_init.c index 7f3036d903..fe3f2549b7 100644 --- a/target/ppc/cpu_init.c +++ b/target/ppc/cpu_init.c @@ -43,6 +43,7 @@ #include "exec/page-protection.h" #include "exec/watchpoint.h" #include "helper_regs.h" +#include "accel/accel-cpu.h" #include "internal.h" #include "spr_common.h" #include "power8-pmu.h" @@ -7589,6 +7590,7 @@ static const TypeInfo ppc_vhyp_type_info =3D { =20 static void ppc_cpu_register_types(void) { + accel_cpu_register_type(CPU_RESOLVING_TYPE); type_register_static(&ppc_cpu_type_info); #ifndef CONFIG_USER_ONLY type_register_static(&ppc_vhyp_type_info); diff --git a/target/riscv/cpu.c b/target/riscv/cpu.c index 362e561809..10e24f20e8 100644 --- a/target/riscv/cpu.c +++ b/target/riscv/cpu.c @@ -25,6 +25,7 @@ #include "qemu/guest-random.h" #include "qemu/atomic.h" #include "cpu.h" +#include "accel/accel-cpu.h" #include "cpu_vendorid.h" #include "target/riscv/tcg/csr.h" #include "internals.h" @@ -3931,3 +3932,10 @@ static const TypeInfo riscv_cpu_type_infos[] =3D { }; =20 DEFINE_TYPES(riscv_cpu_type_infos) + +static void riscv_accel_cpu_register_type(void) +{ + accel_cpu_register_type(CPU_RESOLVING_TYPE); +} + +type_init(riscv_accel_cpu_register_type) diff --git a/tests/unit/test-multi-target.c b/tests/unit/test-multi-target.c index c7559827a0..fd44cf74ca 100644 --- a/tests/unit/test-multi-target.c +++ b/tests/unit/test-multi-target.c @@ -30,6 +30,28 @@ /* stub for system/main.c */ int (*qemu_main)(void); =20 +static void test_accel_cpu_parent(const TargetInfo *ti) +{ + static const char * const needed[] =3D { + "arm-cpu", + "i386-cpu", + "powerpc-cpu", + "powerpc64-cpu", + "riscv-cpu", + "x86_64-cpu", + }; + size_t i; + g_autofree char *name =3D NULL; + + for (i =3D 0; i < ARRAY_SIZE(needed); i++) { + if (g_str_equal(ti->cpu_type, needed[i])) { + name =3D g_strconcat("accel-", ti->cpu_type, NULL); + g_assert_nonnull(object_class_by_name(name)); + return; + } + } +} + static void test_qom_types_are_unique(const void *data) { const TargetInfo *ti =3D data; @@ -49,6 +71,9 @@ static void test_qom_types_are_unique(const void *data) module_call_init(MODULE_INIT_QOM); /* trigger type_initialize for all types */ object_class_get_list("", false); + + /* Accel parent lookup depends on the QOM types above being unique. */ + test_accel_cpu_parent(ti); } =20 int main(int argc, char **argv) --=20 2.55.0.windows.3 From nobody Mon Nov 23 04:36:07 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=gmail.com ARC-Seal: i=1; a=rsa-sha256; t=1793903686; cv=none; d=zohomail.com; s=zohoarc; b=jMfyt2K22PwLK0AEKfeYt6E6J2RAjd2hxxWEd0FmvHYZ4dp1viuLs69RJCLWEfmUVpyIgBG5StrzN3aOBmgo7+RSa/2wVVGR5kyC3J7yq2VZYyixaV2LNl6anKGeq5c7l3KrROOgZ804a8xWDhgCQ9ydwHAG/CNnKin+8V4OAy4= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1793903686; 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=oy5DoHzhJBLmB2vbo8S3/BszoXn1nmgmNWYhTGzcVGU=; b=A4xPS0tKbi9lRNNItwc81GLinK8W6mlpUTwcaq0GmG/hPHtRq0wdqZzhCtZxXNvOIwJBjO/uAI1jz9LnuN6g1YPYcIKfQMAHky2Z1fNNi+4oE9UMv9bzNFb9wKWozDRHGVMUEhHzkLwcPHi6hP7FRdJ4Ikm/dP0bJgUEP2R2Jt8= 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 1793903686839204.55843924571184; Thu, 5 Nov 2026 10:34:46 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1xP2He-0005Cp-PZ; Thu, 05 Nov 2026 13:34:02 -0500 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 1xP2HM-000588-AB for qemu-devel@nongnu.org; Thu, 05 Nov 2026 13:33:43 -0500 Received: from mail-dy1-x132c.google.com ([2607:f8b0:4864:20::132c]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1xP2HG-0007fD-Mi for qemu-devel@nongnu.org; Thu, 05 Nov 2026 13:33:37 -0500 Received: by mail-dy1-x132c.google.com with SMTP id 5a478bee46e88-36a0f27c9f4so4147278eec.1 for ; Thu, 05 Nov 2026 10:33:34 -0800 (PST) Received: from DESKTOP-Q716RM7 ([103.94.185.75]) by smtp.googlemail.com with ESMTPSA id 5a478bee46e88-36f66086a4asm277795eec.0.2026.11.05.10.33.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 05 Nov 2026 10:33:31 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20260707; t=1793903613; x=1794508413; 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=oy5DoHzhJBLmB2vbo8S3/BszoXn1nmgmNWYhTGzcVGU=; b=IKGJCJV8zd+BOmOCz69DYR+QHYWdddqGkCMgBr/Nx6i9wwcBml1vTplPqtZuVE40lJ qdfTx5R5uW/G2fLo4Nbo6tq0Xbd4iqy/fU581IbmkxLye06wReA4Ab/f8KEJQDXiscb7 pIe4ygS4D7VfeSc6saBN7sfpDrnGF2az+4HTN4BCV4j4YU5ZgJTRldIE4+CrCYYF5Lm1 mudTrbeySyguBr/Rv89aelo20y9fA/YzDKamzmZMLRFnyk04VBl+1uyawuQPMfzqbzL0 1DRDbrGw1Bcebhsu07184N3GF+2LR8/OJr5k/YPQYqsuFzXyYZR9ZyvQ4zA50yUd3S64 aNKw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1793903613; x=1794508413; 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=oy5DoHzhJBLmB2vbo8S3/BszoXn1nmgmNWYhTGzcVGU=; b=eIp6vPbXZe0er3xm37KGLwWZe5Hess6osWn15HvS33UKzl9isT3X7UPDII7QKe8tPp Ml2aa/3mI2MSYHRZX7wSkwMW1Eh4DF2RSReUNSV5RTVnD1w2f9xnPYfFPSH1Nh+hy5yI 7FLfiO27dlUI1lVNRtx5100GRaAovI/xktKG1ZeTeTYJiTXeshr5Fxzh2HtQuA0FAD6m +KjZ06j1ilbVjpHRmRCHfxW/2C7vQVk03Ewd+b+/daBrHzT6Jq3vMcAa5ljLL+PG4rTD cAoufgDpzGDdwhY+eGvBQC993cC58IBhuI8EDzO2GvljCKokld+0qd7aNUtAoZuA1BR5 9M9A== X-Gm-Message-State: APuU4Z9P81vO2ZGnCMdUNheo21q5/SuWWiyqlPU5JBx4RZSQkeBC7TFy JbdW1iBgLYVbl0z0nYwSnis9cB7t0sRtO1CMQl7ZGjHP1C3a7RxyJ30tgzrRV2LqZD8= X-Gm-Gg: AYBFou204LDipl58jaRHGvCTJ4VLbOIQvrsi0lMWh5B8q77+7Wyq1lMf5HYeaKHA+jr UB+qp8p/hGOXhNNdICev4PATZYBdoQ+dBUlFQQbjRwj8TYzPZvSClerTpqO5ktPL9xvzmYT1W9x XZrMnB2MAbkG6yBr89CZ5ctHSHM5SsxXuY8UBnuojfprzKm3GeQH11TQm1I1BNmBjt5QKTAVH43 ZwImv9SIKe79PMoNTkhXHItUGvEfN9svLbgj72HUMU/ng/8c0BrEwNBXQ/Csg/Hzak90nB/PyfU +zMo0ewderyzdQcXlv+u/HF9XQvHQIDvg7vO84dd0MdcufQOve6xtsEZ0kPtuVWQc5nKk7F4aU9 2CxWyN4U1yAygymPiulqnZuWP8Iqwzy4NK/rtD+poksYE1qE7z4nv5KANm94TmMNFRPDi7mznBf bN361+42UJ0e1/Dp7tTAkf5CaCh/IfDDV9HDJjlN4rVx1C8IkK8ivwIdJaRenYj2aMsjCTIakqp mykn/baD2R/tCjx7AP1KxgEhcXDQ18JU04Xz2RP2YiS8AbpXGYOd/9ZKe32r7tv+rhchs2Ll0xT fDbhgoavi9QkdZDXMOXYFXkpuDHas7XtAlUGlfN4Pb6tp/vVoPXYjlanrNZyrAz0fXXDtQ== X-Received: by 2002:a05:693c:69cf:b0:369:daea:812a with SMTP id 5a478bee46e88-36a423fae73mr27075385eec.30.1793903613090; Thu, 05 Nov 2026 10:33:33 -0800 (PST) From: Yonggang Luo To: qemu-devel@nongnu.org Cc: Chao Liu , Peter Maydell , Weiwei Li , Richard Henderson , Alistair Francis , Harsh Prateek Bora , Daniel Henrique Barboza , qemu-arm@nongnu.org, qemu-riscv@nongnu.org, Glenn Miles , Zhao Liu , Chinmay Rath , Philippe Mathieu-Daude , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , qemu-ppc@nongnu.org, Palmer Dabbelt , Paolo Bonzini , Pierrick Bouvier , Nicholas Piggin Subject: [PATCH v4 2/3] Revert "target/riscv/kvm: restrict kvm-accel-riscv-cpu to riscv targets" Date: Fri, 6 Nov 2026 02:33:08 +0800 Message-ID: <20261105183310.1614-3-luoyonggang@gmail.com> X-Mailer: git-send-email 2.55.0.windows.3 In-Reply-To: <20261105183310.1614-1-luoyonggang@gmail.com> References: <20261105183310.1614-1-luoyonggang@gmail.com> 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=2607:f8b0:4864:20::132c; envelope-from=luoyonggang@gmail.com; helo=mail-dy1-x132c.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, FREEMAIL_FROM=0.001, 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 @gmail.com) X-ZM-MESSAGEID: 1793903689092158500 Content-Type: text/plain; charset="utf-8" This is redundant now as all accel-$cpu_type parent is already registered. This reverts commit 2d3e6b4003d5380c245ce8ffac4b8866f6d10a33. Signed-off-by: Yonggang Luo Reviewed-by: Pierrick Bouvier --- target/riscv/kvm/kvm-cpu.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/target/riscv/kvm/kvm-cpu.c b/target/riscv/kvm/kvm-cpu.c index 5beb602338..aa28098e10 100644 --- a/target/riscv/kvm/kvm-cpu.c +++ b/target/riscv/kvm/kvm-cpu.c @@ -27,7 +27,6 @@ #include "qapi/qapi-builtin-type-infos.h" #include "qemu/error-report.h" #include "qemu/main-loop.h" -#include "qemu/target-info.h" #include "qapi/visitor.h" #include "system/system.h" #include "system/kvm.h" @@ -2241,7 +2240,6 @@ static const TypeInfo kvm_cpu_accel_type_info =3D { =20 .parent =3D TYPE_ACCEL_CPU, .class_init =3D kvm_cpu_accel_class_init, - .is_available =3D target_base_riscv, .abstract =3D true, }; static void kvm_cpu_accel_register_types(void) --=20 2.55.0.windows.3 From nobody Mon Nov 23 04:36:07 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=gmail.com ARC-Seal: i=1; a=rsa-sha256; t=1793903794; cv=none; d=zohomail.com; s=zohoarc; b=PC8+qKpUBUDylpUgavmFFUfrrNCAG9LTBqlOEjgS+AorpvkJnZkKyzs1PKIcP8I70b6MQJ7ZxRc8omAPuaMmwMU7z+dyvr8m+JjF0ErjKsZFTtBD8/OsbYV9NB48w4gc1alFwFJFQ2CxK8IYSGreQiDneV3n9x+cPO3SM/3GFo4= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1793903794; 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=K6QnG2OWy45OWEL5o3UglLvd+yAc+id9BaTefFb/yno=; b=Q+mGLc2NPCTlsOVV6Y536CxK5G7ZweQDF5FcspFx2oW2yFxo+jGxkq/09HvTvUMpLQqZRxPtflUqTKC+0z3+ITNGe9gWMCeOmfGwudXjuvCWe3AHLlrT9i0zXLDulelSOWQOCosqDYmrN3jdYgXd1wsIkqW3nRWFXi8qq9NnI9s= 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 1793903794264362.2169999316875; Thu, 5 Nov 2026 10:36:34 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1xP2K5-0006jX-QL; Thu, 05 Nov 2026 13:36:30 -0500 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 1xP2HT-00059l-S0 for qemu-devel@nongnu.org; Thu, 05 Nov 2026 13:33:48 -0500 Received: from mail-dy1-x132d.google.com ([2607:f8b0:4864:20::132d]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1xP2HO-0007h1-BW for qemu-devel@nongnu.org; Thu, 05 Nov 2026 13:33:45 -0500 Received: by mail-dy1-x132d.google.com with SMTP id 5a478bee46e88-36eb1cb7aabso1099234eec.0 for ; Thu, 05 Nov 2026 10:33:40 -0800 (PST) Received: from DESKTOP-Q716RM7 ([103.94.185.75]) by smtp.googlemail.com with ESMTPSA id 5a478bee46e88-36f66086a4asm277795eec.0.2026.11.05.10.33.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 05 Nov 2026 10:33:38 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20260707; t=1793903619; x=1794508419; 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=K6QnG2OWy45OWEL5o3UglLvd+yAc+id9BaTefFb/yno=; b=KDVCUa/EJhIOKjQ67S3/fsn/a4hF4M/H2ayb4IHKe4e2e6VvuKpQ4FrhCeovu/JKcG lmh1VlJv3uHe95Y2Th9dkSGd4EGBplZDRqcuwEAjr4K9frMGlltgcZcagx+TTTIIZlGh NvRktQZOYWdVIvzLLne+YOSRhIQ5u5IuYtIQBEKetCDrmOVaTdaWaASBLehxCLvUjBC8 FS7O/xrYt3V2VU8tfuBEQ7y1iRceB9h214C9uGDbOR90GVf+SnBxD9AH+Wo9VM39ERrz JXJN5BCx26mTou5wi721nDCX9u+eBDQ0t1FENEMJJPN7eF9BQiLH4r4K6NIlHPI+EB/i hi6g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1793903619; x=1794508419; 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=K6QnG2OWy45OWEL5o3UglLvd+yAc+id9BaTefFb/yno=; b=UqpoDwLdkAcAnpIxL/EhNAfwAVE60FxS6REQdGSrnLqk1EyxGcaEdSOn2IejQ278o5 0xcMLknjjxpz0TIE/XczVQOF2ZtNNasOHKWN2igAJgwFy0oWAA8DABOoWHXPSTmQejK5 u/V5jM90spQuB8oWrfB8YltnD+Boazk1bGRMKr0vKtk+Ocnzul6Q5PvtnGUwZ7MtXwNF Xv85VFGP6YUP1XvfONFKTePu6xm/g8oS7voei2GbZ7TNQf9a4dk/EV55IMwWJ8+IKYBm vmVagT8WQ7Sa+cJjzyZyvcBm95fM6TwcB6AoHN8hPLaKJxf3UFBg5K4f5pJ2ezAjLgPf 8wQQ== X-Gm-Message-State: APuU4Z8zn2xlb3H/6KOkTlJqajP0UPGP01eis9HmYxXBkjXs0+ekv0XB ul+Kgt76l9zOVesDPvBpFNhYAzr1OOLyqEgg7eMg3NPaVhHbUPN64Pfyv/IALpPoUSk= X-Gm-Gg: AYBFou36aibO2NLZCb45cZ9IIuGz58AQ2auaHwHxAl2xO7z0ptt6nqHxdEayvrbfRZ+ Svw05QKc28OjO6MxMCgFtshV0TaF1BtDFX88Ph+J1m/Bq3W5wJ+qf9WXzZVIXpP2cceAzzrp08z Lu5fNlKc3bpGaoJcNL81acwkhh8cvicKWEZf+k9JIOMxjsNeSK55EQmsmn3Wjkfpzalg1TZTsgE QcixuFJW5pNx1FItS3TTHUSW11GQOmkC7cVYZAAcuK5rNFCl3/UJRVoLgLVZymcuI1Qht+fSaQe 4mMbbGpnsJAw8d24Vs9xGk/TBGax/Q344rdZyxPJe8Td/DUMp/0w5TAXb9sCBHIhbwgeA9Rh2xx 2F+0fPoQjIwEa+Sxx6iGbW4pSROmupbxBk2VtMNNw/pxegth8eK75eWLY4dKvZaSRfJ79En7TD1 pyjn9toSnZvsJbdmC751BvkG/6KBIuw3P5ipBXnDLFEMJYIbZ3v2lr+6CghKtKoYqYW1/ErWZle u5br0xrrsqYkaIosW+6DvyAvfbsSa+GS+uXcAeICIq5mmH+Qz3cmhQkTWmaoKaE8M0GVjHf7hRa OAmWw7wcpHsNVgbnvXb3SqOrqRBNBgecX4NtEkzu3bP3uAYT X-Received: by 2002:a05:693c:8854:b0:36f:6d81:3f99 with SMTP id 5a478bee46e88-36f6d81425amr52897eec.7.1793903619219; Thu, 05 Nov 2026 10:33:39 -0800 (PST) From: Yonggang Luo To: qemu-devel@nongnu.org Cc: Chao Liu , Peter Maydell , Weiwei Li , Richard Henderson , Alistair Francis , Harsh Prateek Bora , Daniel Henrique Barboza , qemu-arm@nongnu.org, qemu-riscv@nongnu.org, Glenn Miles , Zhao Liu , Chinmay Rath , Philippe Mathieu-Daude , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , qemu-ppc@nongnu.org, Palmer Dabbelt , Paolo Bonzini , Pierrick Bouvier , Nicholas Piggin Subject: [PATCH v4 3/3] Revert "target/riscv/tcg: restrict tcg-accel-riscv-cpu to riscv targets" Date: Fri, 6 Nov 2026 02:33:09 +0800 Message-ID: <20261105183310.1614-4-luoyonggang@gmail.com> X-Mailer: git-send-email 2.55.0.windows.3 In-Reply-To: <20261105183310.1614-1-luoyonggang@gmail.com> References: <20261105183310.1614-1-luoyonggang@gmail.com> 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=2607:f8b0:4864:20::132d; envelope-from=luoyonggang@gmail.com; helo=mail-dy1-x132d.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, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: qemu development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @gmail.com) X-ZM-MESSAGEID: 1793903795025158500 Content-Type: text/plain; charset="utf-8" This is redundant now as all accel-$cpu_type parent is already registered. This reverts commit ec65e16fd2ba012d57b1bbfcfcd04c31c4111924. Signed-off-by: Yonggang Luo Reviewed-by: Pierrick Bouvier --- target/riscv/tcg/tcg-cpu.c | 1 - 1 file changed, 1 deletion(-) diff --git a/target/riscv/tcg/tcg-cpu.c b/target/riscv/tcg/tcg-cpu.c index 5834ec1524..3d9c997329 100644 --- a/target/riscv/tcg/tcg-cpu.c +++ b/target/riscv/tcg/tcg-cpu.c @@ -1755,7 +1755,6 @@ static const TypeInfo riscv_tcg_cpu_accel_type_info = =3D { =20 .parent =3D TYPE_ACCEL_CPU, .class_init =3D riscv_tcg_cpu_accel_class_init, - .is_available =3D target_base_riscv, .abstract =3D true, }; =20 --=20 2.55.0.windows.3