From nobody Mon Nov 23 04:28:03 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=1793932914; cv=none; d=zohomail.com; s=zohoarc; b=MeXmV3CoaGazpCdPRm4DaQixk7QuHuoJpuU4bWyoW1Ucj6Ry5FghlWBph5lT4eev+GvMkR5bF2JA8+FpfenYpBAs9uOp9v7SbYQOtxViHtEvfVvKtJ6J0knieoUaobvc9H505kAoNH5Uof7igkWnEaMIcFo4FTWpdgw2EL+LU4k= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1793932914; 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=LAgFtZI3pjCQTGA6+IKL/nBbms5kZLlBrfMfKvaI13I=; b=QdlUCh/FKYEL6127Wre6hEYAAhqjCglqCLxmJCE9PaKby0ModW7nFXTlgOopi0VJ2hn4ACMPN4VT97sW2O34f9M5C3wdBPmDk7df3E5z0mPetcEXipbmA651Z3BJT7vPCN816Ob6cBMEwgP+SXQz2TQLYQBrraLHlhN4Bfh9oEs= 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 1793932914852903.5483358225277; Thu, 5 Nov 2026 18:41:54 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1xP9sR-0006Oq-9s; Thu, 05 Nov 2026 21:40:27 -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 1xP9s5-00066k-Ug for qemu-devel@nongnu.org; Thu, 05 Nov 2026 21:40:08 -0500 Received: from mail-dl1-x1231.google.com ([2607:f8b0:4864:20::1231]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1xP9rw-0005xs-DI for qemu-devel@nongnu.org; Thu, 05 Nov 2026 21:40:02 -0500 Received: by mail-dl1-x1231.google.com with SMTP id a92af1059eb24-1ae18eb9b69so297853c88.0 for ; Thu, 05 Nov 2026 18:39:54 -0800 (PST) Received: from DESKTOP-Q716RM7 ([103.94.185.75]) by smtp.googlemail.com with ESMTPSA id a92af1059eb24-1b25e4efa6fsm1108318c88.20.2026.11.05.18.39.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 05 Nov 2026 18:39:52 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20260707; t=1793932794; x=1794537594; 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=LAgFtZI3pjCQTGA6+IKL/nBbms5kZLlBrfMfKvaI13I=; b=yHZqTA/w3iCEb3Ey7Nxjnv+f9bo/ZWfL2eM0EIG13r+eRWOJX2Oe4EnQH/daa4rPov nCnu5sGouX5nBQqCovtWXazyE+8UDNtNS1Lh27t0gPtJRHZD3oOx6pTOo0CEb9Iavbv2 zGk4byVZiwFluI9MlNRSrm4u8ejAEvrpPfed6/UDA4q2b+OKEhASGYv1JrZEHznl9POL jzJPu7RyGvuwqxZ9P//IojbWiupidU1EXNqj1G6LKGA9jbXmn4XMWUkYbGs6FP4s5jtb 2hC4ytawiDlRjTT3oXb3wz7raA8gHf+xvIlQFnnoxI2pdH9SQGEtUj8UvmYxy1QLo1ok kUzA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1793932794; x=1794537594; 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=LAgFtZI3pjCQTGA6+IKL/nBbms5kZLlBrfMfKvaI13I=; b=fZ4hhx4z0U9XxMr5XI7IzEcvdSVeTlHa4Wr6U2494za5EJwo7XRJVyGvHcdAeb+Dq3 86bIMGdXcCMIBosLrMkCc+w2CCkXA+K5QVDGlOWzoJr9vJHC7z8sc8U3LQTsU+wdI0Xj WK8iJhxFVW2e5ESvNVtWvWop01EYecGL7SiZXkfc6RbgXuZBM3dfsqphQGJ1TnwRekXe STYQ/tZv4Q6bIMom7gCTIjbIbMubjlxViLw9cnypPQWFcmkUR2rSjME/gz3229fs7QUb iss6HzMn8NH/VJCU6f2Whzy2Ydn+XUHeuMuaSj/D/BZtKsabEapyTxEuHjAmzKpQLzTP /uWg== X-Gm-Message-State: APuU4Z9cy23C0NDEyS7v71ibS7+UsJfEnyTMXS6ZHimPBaPacLRJglPL aVur+GDJwQLZ/mhGcADEhh+ZPVQL0gEgcT9pnDlgVaY6JZ043VN1lLds/O1mLukc X-Gm-Gg: AYBFou3vCAMyfH0yhQ6+hJgrh4luNqkpzCIpGHfJkICdWYXsW3CLDMxc1LJBapf6/s+ MR033m5zUNK3Dy7kysYp82p7hwVOtd23vSoIOQ0MQh7W13QBEjlqspbCtwwAqEvPh9SxmzENLV2 gQFpbCaK2Udx0nQB7PsxhZlzt9M1q8YEqcgu1dpRLMyj+YAFoVcR+DALlKJrqubLqQl1EAHUCQu k5x1G4ZFZ76ToByJXmXXEuIaR/t7K6ikfJ2WRDC0EyQct2DNfa3PvJOcIZlG2fsfdP/eeS59RQD Q+1iJjiWfg/SKcFamBTUHvlGKQQgjwG5DErfDCrPn/Tn56gUmztRGoO6gKobbu2l1bsm7nqf8Do q6kjT3i5/LNZA1vUlARfZdQjGdRmwTSl8NQhBRnpP4ACA88+XeDB5E3e4VmSOQV2PmZbt7a0VNS 4bT/tXM+rZMlSSwGH34tBMkh4JRWFhXSfM7vVhZKPGMt+xKZC/RNaGd3ajxf+JlZuURrM/5sRl5 x8Df/Za7wCV4CsJPTzy9c04HFv2F7q4sF7czgMv/dprv0wm/VtwKbuSU8W70LOesXQ8/u7Ry6ic Y6c6Yu7vaAh/YBoQVxQu1vh/BH+Fp7nQY8WmnhTM7/hzwlYS X-Received: by 2002:a05:701b:4346:b0:18d:9eec:e0be with SMTP id a92af1059eb24-1b25d286bafmr1250066c88.2.1793932793411; Thu, 05 Nov 2026 18:39:53 -0800 (PST) From: Yonggang Luo To: qemu-devel@nongnu.org Cc: Nicholas Piggin , Richard Henderson , Paolo Bonzini , Chao Liu , Palmer Dabbelt , Alistair Francis , Chinmay Rath , Glenn Miles , qemu-arm@nongnu.org, Peter Maydell , Zhao Liu , Weiwei Li , Pierrick Bouvier , Philippe Mathieu-Daude , Daniel Henrique Barboza , Harsh Prateek Bora , qemu-riscv@nongnu.org, qemu-ppc@nongnu.org, =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Subject: [PATCH v5 1/3] accel: register CPU parent only for AccelCPU subclasses Date: Fri, 6 Nov 2026 10:39:33 +0800 Message-ID: <20261106023936.772-2-luoyonggang@gmail.com> X-Mailer: git-send-email 2.55.0.windows.3 In-Reply-To: <20261106023936.772-1-luoyonggang@gmail.com> References: <20261106023936.772-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::1231; envelope-from=luoyonggang@gmail.com; helo=mail-dl1-x1231.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: 1793932915543158500 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. No extra tests is needed, as these QOM types already be tested by the existing logic instantiating all QOM types. Signed-off-by: Yonggang Luo Reviewed-by: Pierrick Bouvier Tested-by: Pierrick Bouvier --- 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 ++++++++ 6 files changed, 18 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) --=20 2.55.0.windows.3 From nobody Mon Nov 23 04:28:03 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=1793932896; cv=none; d=zohomail.com; s=zohoarc; b=JB5cF5vcRi8iPym7n1xy1GEj7dwdLYqvLmhi15xj8cywz9lDqqupiVounkAm03F5JnapdCfhgVizUGnte45DMFdmQ43sNZcdiRP9HNe1SUZj9GWzsMHlCPjW4cfpmfz8ZDKcfoV9ykNohaw17IUXMDO6Lf5zxr+evxUqBvhMxh8= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1793932896; 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=gq/d0KwPPYo52ABxaaA//hWxeVPvL++rdqpTw0UqREs=; b=Q+tUoyNXS/fN+jqXBYTrOzitrMjrmBPybmGCplX+oMM/lU5OPFi9cXmyxcfj+QWyS2+ygLVNAuOM0a1Xt6tHZp5svaKKDKS/lVgi59Jkp1u/MIBWpos4s8t2IzxJW7nXq9HSqHKjUFU8VouURS+giLFqffIuDLh1z3MZubN9Od4= 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 1793932896515985.9984576539686; Thu, 5 Nov 2026 18:41:36 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1xP9sc-0006Uc-1u; Thu, 05 Nov 2026 21:40:38 -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 1xP9sH-0006BB-SX for qemu-devel@nongnu.org; Thu, 05 Nov 2026 21:40:21 -0500 Received: from mail-dl1-x1230.google.com ([2607:f8b0:4864:20::1230]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1xP9s9-0005yN-Na for qemu-devel@nongnu.org; Thu, 05 Nov 2026 21:40:13 -0500 Received: by mail-dl1-x1230.google.com with SMTP id a92af1059eb24-19305bcb72cso192514c88.1 for ; Thu, 05 Nov 2026 18:40:00 -0800 (PST) Received: from DESKTOP-Q716RM7 ([103.94.185.75]) by smtp.googlemail.com with ESMTPSA id a92af1059eb24-1b25e4efa6fsm1108318c88.20.2026.11.05.18.39.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 05 Nov 2026 18:39:58 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20260707; t=1793932800; x=1794537600; 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=gq/d0KwPPYo52ABxaaA//hWxeVPvL++rdqpTw0UqREs=; b=Vl9cUB4EpG8B1J1qjuaoyH0tIV2jkuFle2SFmEWy5Zv17uWdGdow/Z/G3SY7nJlw8G Rce7DJcawTiP4sT/aU3Px5ZtsLO6M6ez6v7Yo0zzmUUARAvHCItGZYi9LyYBBJ/lGyOs CIu2a1n9vV3/B3bdzG9dcKODLIJOIzGWaaB4tDqpZKAzpGibRUbWwoKVO5JAanw7KPoL 2UJDc7XZKel6Oe275LpakJQOejgxsSoaqmzgdhdCxqsokUUd/rqWiRhEfeab9KN+LIO1 SPPXQYwOBloFzGT/CmCPpKvTodxb6etBJnmkbWMGPR3IXbvHyFSmr8wG22QQV9TX5xws tcGw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1793932800; x=1794537600; 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=gq/d0KwPPYo52ABxaaA//hWxeVPvL++rdqpTw0UqREs=; b=S0IXaxAt3AWoOodMSa1qQItr8jZ8GJ+OkN0yQ/bLGZMjYkL4Le0YXG1Im7WJGI/w2j nfC+Mq5Djc2eLzeT6E7E7QWZ9SXhEsyTKY20stiDTUdz9q1NdexFCiYm2Ip+ZTpzxNc5 ksX7/RkA6DYW7qu9JNz8zHZlGqR8Ja+c5LL5DRr4wTpXjfKROF31OtXp0S4ET++nXmEI pwO5YxOAt/wUftzrIL43brZoaMwXbCUa46bBIA9LjPo0p1DB04ycHgMD8avQsBPeXzDp 06h1ieNYfYD527EA4Sgyl56hk7u8TYH5wfw60+1g2D00wqbLfn21yoxF6UDUD9g1vxmP tHyg== X-Gm-Message-State: APuU4Z/CK0Cwn4v4yZhhMhxaqufIdkmrpJ3wcByDWs49nZekF9Q+hgsz 9c3VR4ExdoDrgLI6tgTKzgPuufIeSBUA9zZZkMYk5b+W5n/2D1eexOaSEvZPELhd X-Gm-Gg: AYBFou11uI5Y58qe14A6eAwr4UJMUidoKpFWX6SOnIrMna3+0jY3Wb+owO9emxfr9Uo /QWFawcG42SrVaugMjJWH6kckbVpEhzZE4nRBaeJNcwLX3R+U7Q99mSXcGY/9vA779ELHTiT1dB 8Pyz7hSTuUL3pOtO5VqtqdQS6xeuoqh/tgrDHrBrZ/x0Fo+76Sa1+KfwEfiv1yGG2KUHuw9PhkG icDd/zughmtgSHeRlx6E6Nw32eD+Htbq7QQaL+um/Zhz/yORrc9kl64uZpIDSd/7VXR0WMvm5yv nCMW9Mor/UeA3iHGC6jEC8eE/5QW9v6G92LFCXcvVXfNzBuOxkYBT8WGwPRvJgI1lpPR9bl/VU+ 9djTAtH1LA1WgIVRlRVCLavF4nb1RHxO/x353tlvwVfZhD0+3PKlZ7sepFsDIuL5K8jUop662Xh 42+w5nfCrnfAv2ERYbZg9kQ3B3/BzUKvqR5VOPQUP6z6xTYvQv/30gId7/X1yWFfPvNVpBuNDlr VGCeBQS5khicCi/afk7SPGFK95XVHrltGgdQcaqncN3zWi70vNRg9c5LT+o5eyZSBeElNWeihP4 1zCWuHaO7NPpTTdZGyXKErgJzpd5yLWjaUp0VP4DkdLQt8q1 X-Received: by 2002:a05:7022:3c08:b0:14a:8cff:fbb8 with SMTP id a92af1059eb24-1b25d31d662mr902654c88.28.1793932799300; Thu, 05 Nov 2026 18:39:59 -0800 (PST) From: Yonggang Luo To: qemu-devel@nongnu.org Cc: Nicholas Piggin , Richard Henderson , Paolo Bonzini , Chao Liu , Palmer Dabbelt , Alistair Francis , Chinmay Rath , Glenn Miles , qemu-arm@nongnu.org, Peter Maydell , Zhao Liu , Weiwei Li , Pierrick Bouvier , Philippe Mathieu-Daude , Daniel Henrique Barboza , Harsh Prateek Bora , qemu-riscv@nongnu.org, qemu-ppc@nongnu.org, =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Subject: [PATCH v5 2/3] Revert "target/riscv/kvm: restrict kvm-accel-riscv-cpu to riscv targets" Date: Fri, 6 Nov 2026 10:39:34 +0800 Message-ID: <20261106023936.772-3-luoyonggang@gmail.com> X-Mailer: git-send-email 2.55.0.windows.3 In-Reply-To: <20261106023936.772-1-luoyonggang@gmail.com> References: <20261106023936.772-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::1230; envelope-from=luoyonggang@gmail.com; helo=mail-dl1-x1230.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: 1793932897160158500 Content-Type: text/plain; charset="utf-8" This is redundant now as all accel-$cpu_type parent is already registered. This reverts commit 2d3e6b4003d5380c245ce8ffac4b8866f6d10a33. Reviewed-by: Pierrick Bouvier Signed-off-by: Yonggang Luo --- 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:28:03 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=1793932850; cv=none; d=zohomail.com; s=zohoarc; b=isJxNjFWPiZm/OltH8P8kXa2ow12rFIzWlDuZr7KjKYNubGkBay04PiiDhy6ZllMc9ND7qr2ujHO7Pfo8yBavQloL2M3mqGiIkoF7J5xr7rBdHoNJRnEv0ynX2oU7laxkFDTBuYBef1fNo6O/D4WQETup4woX1ZNRB/S0bF3EA4= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1793932850; 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=/0hh3Zydje69yihcPOiBJweC3tWFR9Iu3bC83YOJ024=; b=AHz8aUHsiiFepSlPO73XvKIJiAf6xTUFYndBd3l5Om+8oLejo/22VpM9tzDVpSrlvlZ+qn17N63KgjeyHR9EjAnO8+5tvrvhTJIAR62vTsPh3quVpQTaXLNxYrZk9PNd8mjGjBe4xEoxpHKj8lBt6Sd9Ii/46/yw6Dv7KY6S+Tw= 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 1793932850743309.7625513812271; Thu, 5 Nov 2026 18:40:50 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1xP9sY-0006Sk-S5; Thu, 05 Nov 2026 21:40:34 -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 1xP9sH-0006BA-P9 for qemu-devel@nongnu.org; Thu, 05 Nov 2026 21:40:21 -0500 Received: from mail-dl1-x122f.google.com ([2607:f8b0:4864:20::122f]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1xP9s9-0006At-OS for qemu-devel@nongnu.org; Thu, 05 Nov 2026 21:40:13 -0500 Received: by mail-dl1-x122f.google.com with SMTP id a92af1059eb24-1a3c08d6928so389200c88.0 for ; Thu, 05 Nov 2026 18:40:06 -0800 (PST) Received: from DESKTOP-Q716RM7 ([103.94.185.75]) by smtp.googlemail.com with ESMTPSA id a92af1059eb24-1b25e4efa6fsm1108318c88.20.2026.11.05.18.40.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 05 Nov 2026 18:40:04 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20260707; t=1793932805; x=1794537605; 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=/0hh3Zydje69yihcPOiBJweC3tWFR9Iu3bC83YOJ024=; b=chNKi9thHAzlCR01ki+v9fUtvHyJoWy95DOUqlosCqGXx3mwdn+aQwLjobIKnE/xfR lklhglTfEHBTLzLYrGgwh47xSbPSl/1s9f2381dzetEmo0w7CotJU/8xs5zMaEmrWUkq V81Z1+UiTlOtNDMOsbw7pNbvAObCjsqN86zR9UZiblpBYXXtILrOsgWUzncnEWCVQado Ob0DpALgcz6q9Mu8g7b4ZHUxJ/WhqOve3Z/IssVzEHGx6OBhNnkROQahwknQO7cT4XQ1 a7Kvf29HD5rqUxRvCb/YUleWjM817NDwndPqPx+LjIqex08CAkKu2kbjtOaVvypGTvt9 PQmA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1793932805; x=1794537605; 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=/0hh3Zydje69yihcPOiBJweC3tWFR9Iu3bC83YOJ024=; b=ksDzeDDsDAeqf1YkVZDaly2hA81fNC2aJ6LPdcZcwBf+hnjbLhO52npjvcVuIR0EaT scOygcgR40P1E9K4H4Wa+kWuG93FbCbfnk/EX04JmMba6erVhfq7VdgLaBaG1EvpBbQD RHXb4t9qXjQR6TgVEKK236xd1nJjhCYkxFlWSMEbIh9keED1bY2Okdi1YnD08tIyeYAH mrtoa8DTNmzqK+jAG88oRP9T7bJNBHhb+4HmPvWSNCqJD3w0o0HVxlsvgghFvVwoRcS6 Y5oUsLJLXrWJbNUnQLEvVTbut8ctfWGiwr3ubSc/6xocByIxsja+v1Gy52RJEleHhwFF AXEQ== X-Gm-Message-State: APuU4Z+C1Ao23i4ebRYNhgrx6M2vpic2k8RXgagbYBL0cLaalMbpZ04o suSzl0MFMgXNI+y5Hzk5LYNl01WEHzRd+1X6GKB9DCvC7PNCNX4NsqDNjqxq9Dcp X-Gm-Gg: AYBFou1chOQwon8oiDKnR3GeWkisjzz/BDWT40hRmUyiccwZ19+gTBgOMlSgu8vjdCB OeECIiwkfR5zelx/2RA84CsxGHdWrdn7AieDQKl5N4kuyqM8Y05UJlFna4YM2+lyu/gtvbyyIfI CNhcjyBu6SL9ptUMRjByvYGqaE/j9c4b8mtBgZapN9AOpSbhIaO1H3GWO1lX0t+x97K17VVJ35b B7DVGl6Vr+rAUFBUHre2W+ghbQfN5s/Aa7E9h7+F9l6I4U3WI6fvVYkNYa2xloQ2BU3xbxrkgXy RkLhhFleBn8P1Y3rB6JxPb7dmBNWuSiNmjh9XH2FKf9Q+8S6qoOqzjRagcfjQHu5k6i+rQ4WWOL IfccosOnk7AjeywkpDc/UiL70TE2MJ564XrdmSPMV2QPkVbfWlr+uF6M8nljNfp12C36dhtKS6l YqEPU+gpf4DUgGSYfKngkfDJahF6Qsd7l3WSEvcS7s+nWWmFPt9W+J6axlsr4dpOCFzqb//q17h txiJUQjdUd0mYquhhENkxWS9mU6pO8Qjr86hWj5AWURm6T7BJmeJ2A+WrpDAkdkhtBnDMWLy1Uj QyRw755dCNcN49wMvW6A2cksaKOgdjjVgN1OMgmDemmQP+x45vuzWTjk2rgvKkEJqbvioQ== X-Received: by 2002:a05:7022:f513:b0:149:1b5b:1f25 with SMTP id a92af1059eb24-1b25d31ec18mr1052266c88.15.1793932805118; Thu, 05 Nov 2026 18:40:05 -0800 (PST) From: Yonggang Luo To: qemu-devel@nongnu.org Cc: Nicholas Piggin , Richard Henderson , Paolo Bonzini , Chao Liu , Palmer Dabbelt , Alistair Francis , Chinmay Rath , Glenn Miles , qemu-arm@nongnu.org, Peter Maydell , Zhao Liu , Weiwei Li , Pierrick Bouvier , Philippe Mathieu-Daude , Daniel Henrique Barboza , Harsh Prateek Bora , qemu-riscv@nongnu.org, qemu-ppc@nongnu.org, =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Subject: [PATCH v5 3/3] Revert "target/riscv/tcg: restrict tcg-accel-riscv-cpu to riscv targets" Date: Fri, 6 Nov 2026 10:39:35 +0800 Message-ID: <20261106023936.772-4-luoyonggang@gmail.com> X-Mailer: git-send-email 2.55.0.windows.3 In-Reply-To: <20261106023936.772-1-luoyonggang@gmail.com> References: <20261106023936.772-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::122f; envelope-from=luoyonggang@gmail.com; helo=mail-dl1-x122f.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: 1793932852274158500 Content-Type: text/plain; charset="utf-8" This is redundant now as all accel-$cpu_type parent is already registered. This reverts commit ec65e16fd2ba012d57b1bbfcfcd04c31c4111924. Reviewed-by: Pierrick Bouvier Signed-off-by: Yonggang Luo --- 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