From nobody Mon Nov 23 04:28:09 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=1793466638; cv=none; d=zohomail.com; s=zohoarc; b=kg74auJ3yu8mrJqFCQEfWYeODvP+q1dwfJKHhGOe5PUv5niFV+sm8zNP7bNfNPfPMuTM1QghjbrENlb8OzvTaJBKtxcPBvG4bp8Fv6+ZcFn7v0KuC/Yp1xQ8spj6Ky8z2tLMtEe5fDEunvoNlSrenQbujDrILVskIB+6kMO1+Go= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1793466638; 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=+RG6AwrbAc3DBcsycdxRaw/qTZXpuCetdZ3GmPTCm+o=; b=hpD6pmM7T1J5947JEvqmBnytm9Vi5piVf69uWPN5r78D1E6AgKlYb5XSCMVBZ8CL9LIGKnMtG3z8ZL2vuQKRn2joKiSP+M7Sm5PXMSVKmbU5nayqaH7+42fE5VRPq7EjTGdQPzTE4fh7XsAYsMDw156NwNaQjU4IQw4bMGAqrfg= 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 179346663888173.68235259600158; Sat, 31 Oct 2026 10:10:38 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1xNCaS-0003ot-A3; Sat, 31 Oct 2026 13:09:48 -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 1xNCaO-0003o6-NR for qemu-devel@nongnu.org; Sat, 31 Oct 2026 13:09:44 -0400 Received: from mail-dl1-x1232.google.com ([2607:f8b0:4864:20::1232]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1xNCaM-0001Ux-OD for qemu-devel@nongnu.org; Sat, 31 Oct 2026 13:09:44 -0400 Received: by mail-dl1-x1232.google.com with SMTP id a92af1059eb24-1a2761c69fbso1630340c88.0 for ; Sat, 31 Oct 2026 10:09:42 -0700 (PDT) Received: from DESKTOP-Q716RM7 ([103.94.185.75]) by smtp.googlemail.com with ESMTPSA id a92af1059eb24-1ac1854da78sm23749065c88.6.2026.10.31.10.09.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 31 Oct 2026 10:09:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20260707; t=1793466581; x=1794071381; 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=+RG6AwrbAc3DBcsycdxRaw/qTZXpuCetdZ3GmPTCm+o=; b=BjBrX+NWlSN8KATXHP1KIpVLeRpv6Qs7Oz7joNUs6tp9PxTe1G1HSVDUtEnIw+Cuqf YI9T3wM+zabvplmBKs8FAuraA2ub2tR7MSz/AoNyckD8lWDCJ9u8riGv/pMqzD+M7h+K yINnB8Z1nE5/tu3Xkg3tHhYdhh+0hlIMd3amg1NbxS+0xBw2gkszSWHTKHLSX1KdKek2 gWt1LGNiuFRSBfXPKXxwiTiM+CxDbV1/kSrdygQPP66o8tXQ3vwZRYg7VOurc+Mfvm5Q ASZ3vbiXWLpJi/gJzjB5fab5A/sSbKnmwn3SLwUvP8q9M36MHMKBKW43FjvtOlm0Xql8 ARRg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1793466581; x=1794071381; 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=+RG6AwrbAc3DBcsycdxRaw/qTZXpuCetdZ3GmPTCm+o=; b=uDRmxEtwlyi2g4ZJomDyVT72/4gM+iQ7g4jEEAhyznf+x5ZG6htkcNpZuat7uWmfHw eD5AeZUO8mN4XxskswOJztrH/m1prG9zJ3O6sXF5AmCt1jD5tZOP7XA/N9n31tRP7zhX QTnbqoElObXIkLh763SuPM/SZL2E/F2ObyaJLq5r8czwl/+QFLCOnv+Y5u4Qg9xSTP9l ZvThxLTOTSVPbDdsEGkSXcM0OLjnE5NZQ1Ao9InVFLaS6T4ynCugt1rR/pMx1nj1cF12 87JBJQ+1k1JGJpcy/yj2SVFYUmIkw0y3ShHHRhDvv3QoY2NSQzf+AWfFuKYwm16N3qFk 1sSQ== X-Gm-Message-State: AFq9FYKVLQpeV5DSu7Ee/jBIGSimdVSn6IfQ0gc7aORp9ygweItsxsRZ /zW08fukAd1BowwnQMZsmoxx96lsqf0+/ykPGOIs7qip59/prIHB4gwSF08Z8B9L X-Gm-Gg: AYBFou3fRpH0w0gsvrKM1QbY88Y41wpe75lAj7oM1WDzOY4EAU5ImkOcZciP55zZdOU GTHw2A4aPf14t8td0Kqpa7PuV/UiDW2Qi4jQ5e+vrMjvcYRJ93s9Y2AJr+79Wungy6MCCr+6Pqf DSiRICKCZ5CoILrlNUpJ39AgMwVGMQay1MVkGDe3TaNKKTJDJMqv+DXyoUSzTpM1n+IxzdyGf/k WXate7oEErxPebYAfLBX4FQzIeSpSPF2AwrXeCC3D25kNM1t87bF5guPUS18LvjnvzVLVOnZr61 isQIuQFyzClO8lsvJoYWM9LksOBA1T5nweWe9PZ0T4f1c8Hr17qoQOme2fki1YH9c+GRbcPj009 Qg8kH2WoXO9ReFAdh6E2IB5Y7ZCNr5qxLVkclvxYCsFo9MiqgK5dkl0WtYXNCEOyMY5dPcMYAJV m7PLZ0TQYRDuswqn0T2xAjiZ0aRA1Hw3rwxcMs2qJtEatrqYj9FERuIQ2vFiML2yKZGKQokAwjI jPDCIN8ksdZtdKBZiP4JIt11mtmWH/dU5uQjYg7QsBFc1JHxcKQSzX21dLbCjnpXm1qA7R5IU5E gMyTXjFk+bh9UxpW0dFEA0eKBWNQKnxc6vYtOERz6hXbyGUb X-Received: by 2002:a05:7022:d98:b0:19e:fbee:5167 with SMTP id a92af1059eb24-1ac5ab53b29mr7686596c88.21.1793466581023; Sat, 31 Oct 2026 10:09:41 -0700 (PDT) From: Yonggang Luo To: qemu-devel@nongnu.org Cc: Daniel Henrique Barboza , Chao Liu , Paolo Bonzini , Pierrick Bouvier , Weiwei Li , Palmer Dabbelt , =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= , Alistair Francis , qemu-riscv@nongnu.org, =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= , Philippe Mathieu-Daude Subject: [PATCH v3 1/3] accel: register CPU parent once per target base arch Date: Sun, 1 Nov 2026 01:09:23 +0800 Message-ID: <20261031170925.789-2-luoyonggang@gmail.com> X-Mailer: git-send-email 2.55.0.windows.3 In-Reply-To: <20261031170925.789-1-luoyonggang@gmail.com> References: <20261031170925.789-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::1232; envelope-from=luoyonggang@gmail.com; helo=mail-dl1-x1232.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: 1793466640912158500 Content-Type: text/plain; charset="utf-8" Move accel-$cpu_type registration into accel-cpu-target.c. System targets whose variants share CPU_RESOLVING_TYPE (arm, riscv, sh4, and xtensa) build that file once per TARGET_BASE_ARCH. User-mode and every other system target compile it once per target. test-multi-target checks that each target's accel parent exists after QOM init. Signed-off-by: Yonggang Luo --- accel/accel-common.c | 15 --------------- accel/accel-cpu-target.c | 27 +++++++++++++++++++++++++++ meson.build | 32 ++++++++++++++++++++++++++++++++ tests/unit/test-multi-target.c | 10 ++++++++++ 4 files changed, 69 insertions(+), 15 deletions(-) create mode 100644 accel/accel-cpu-target.c diff --git a/accel/accel-common.c b/accel/accel-common.c index 00a400243f0..e7abec4a7b1 100644 --- a/accel/accel-common.c +++ b/accel/accel-common.c @@ -129,18 +129,3 @@ static const TypeInfo accel_types[] =3D { }; =20 DEFINE_TYPES(accel_types) - -static void register_accel_target_type(void) -{ - g_autofree char *name =3D g_strconcat("accel-", target_cpu_type(), NUL= L); - const TypeInfo accel_cpu_type =3D { - .name =3D name, - .parent =3D TYPE_OBJECT, - .abstract =3D true, - .class_size =3D sizeof(AccelCPUClass), - }; - - type_register_static(&accel_cpu_type); -} - -type_init(register_accel_target_type); diff --git a/accel/accel-cpu-target.c b/accel/accel-cpu-target.c new file mode 100644 index 00000000000..ef4da5a2b61 --- /dev/null +++ b/accel/accel-cpu-target.c @@ -0,0 +1,27 @@ +/* + * Accelerator CPU parent registration. + * + * Compiled once per target. System targets for arm, riscv, sh4, and + * xtensa share one CPU_RESOLVING_TYPE, so those bases compile it once. + * The constructor is static, so more than one copy can be linked. + * + * SPDX-License-Identifier: MIT + */ + +#include "qemu/osdep.h" +#include "qemu/module.h" +#include "accel/accel-cpu-target.h" + +static void register_accel_target_type(void) +{ + const TypeInfo accel_cpu_type =3D { + .name =3D TYPE_ACCEL_CPU, + .parent =3D TYPE_OBJECT, + .abstract =3D true, + .class_size =3D sizeof(AccelCPUClass), + }; + + type_register_static(&accel_cpu_type); +} + +type_init(register_accel_target_type); diff --git a/meson.build b/meson.build index 7ec3fb90233..2b605b373fa 100644 --- a/meson.build +++ b/meson.build @@ -3243,6 +3243,11 @@ config_devices_h =3D {} config_target_h =3D {} config_target_mak =3D {} config_base_arch_mak =3D {} +# System targets of these bases share one CPU_RESOLVING_TYPE. +# i386/x86_64, ppc/ppc64, mips/mips64, and sparc/sparc64 do not. +# Once they share one name too, drop this workaround. +config_base_arch_cpu_type =3D ['arm', 'riscv', 'sh4', 'xtensa'] +config_base_arch_target =3D {} config_target_info =3D {} =20 disassemblers =3D { @@ -3443,6 +3448,10 @@ foreach target : target_dirs target_base_arch =3D config_target['TARGET_BASE_ARCH'] config_base_arch =3D config_base_arch_mak.get(target_base_arch, {}) + co= nfig_target config_base_arch_mak +=3D {target_base_arch: config_base_arch} + if (target.endswith('-softmmu') and + target_base_arch in config_base_arch_cpu_type) + config_base_arch_target +=3D {target_base_arch: target} + endif endforeach target_dirs =3D actual_target_dirs =20 @@ -4150,6 +4159,7 @@ common_all =3D static_library('common', target_common_arch_libs =3D {} target_common_system_arch_libs =3D {} target_stubs_arch_libs =3D {} +target_cpu_libs =3D {} foreach target_base_arch, config_base_arch : config_base_arch_mak target_inc =3D [include_directories('target' / target_base_arch)] inc =3D [common_user_inc + target_inc] @@ -4219,6 +4229,23 @@ foreach target_base_arch, config_base_arch : config_= base_arch_mak c_args: target_system_c_args) target_stubs_arch_libs +=3D {target_base_arch: lib} endif + + if target_base_arch in config_base_arch_target + accel_target =3D config_base_arch_target[target_base_arch] + target_cpu_libs +=3D { + target_base_arch: static_library( + 'accel-cpu-type-' + target_base_arch, + files('accel/accel-cpu-target.c'), + config_target_h[accel_target], + genh, + build_by_default: false, + include_directories: inc, + c_args: ['-DCOMPILING_PER_TARGET', + '-DCONFIG_TARGET=3D"@0@-config-target.h"'.format(accel_ta= rget), + '-DTARGET_ARCH_PREFIX=3Dtarget_' + target_base_arch.to_lo= wer()], + dependencies: common_deps + system_deps) + } + endif endforeach =20 if have_rust @@ -4390,6 +4417,11 @@ foreach target : target_dirs target_common =3D common_ss.apply(config_target, strict: false) objects =3D [common_all.extract_objects(target_common.sources())] arch_deps +=3D target_common.dependencies() + if target_type =3D=3D 'system' and target_base_arch in target_cpu_libs + objects +=3D target_cpu_libs[target_base_arch].extract_all_objects(rec= ursive: false) + else + arch_srcs +=3D files('accel/accel-cpu-target.c') + endif if target_base_arch in target_common_arch_libs src =3D target_common_arch[target_base_arch].apply(config_target, stri= ct: false) lib =3D target_common_arch_libs[target_base_arch] diff --git a/tests/unit/test-multi-target.c b/tests/unit/test-multi-target.c index c7559827a08..0f0aff0d7d2 100644 --- a/tests/unit/test-multi-target.c +++ b/tests/unit/test-multi-target.c @@ -30,6 +30,13 @@ /* stub for system/main.c */ int (*qemu_main)(void); =20 +static void test_accel_cpu_parent(const TargetInfo *ti) +{ + g_autofree char *name =3D g_strconcat("accel-", ti->cpu_type, NULL); + + g_assert_nonnull(object_class_by_name(name)); +} + static void test_qom_types_are_unique(const void *data) { const TargetInfo *ti =3D data; @@ -49,6 +56,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:28:09 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=1793466650; cv=none; d=zohomail.com; s=zohoarc; b=nw5+kGvoXj7b+nImBOK3IHD8AYgeXfkopX0TwyEdv4DXWrRfzY0P0FQ/r7RcASS4xHAG4rZbTK36Bx8ivO/37W6G6O1pHQbl8QVj5vJLXUNNx9v0w3CKfbDbvVrSUQYb8YJZi9xnEHSQVKwIgWQqjXSg5cIny19kr7CLPyxJIi0= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1793466650; 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=SCvaE1xWeWnx7UnU/1gnWw/QKe7acN1+xJB52VmOclA=; b=YJUOT+3HLpT4QbwHuPu2VKBFoT+DCCUKCWS06C3Y+70DEwf4zRrlMkcaGCTxKfI1czsF2x8cj5kI2ywaPlr9Dz0UNIAq5mdV4bpugX9unUmhnX3KkAg1epLV4fCl1tWnsZI85GghS5i5smJ/0a1NPuqGSqzoSUrLfMCnZRgeCa0= 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 179346665011567.66648175765431; Sat, 31 Oct 2026 10:10:50 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1xNCaV-0003pl-6p; Sat, 31 Oct 2026 13:09:51 -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 1xNCaT-0003pD-4V for qemu-devel@nongnu.org; Sat, 31 Oct 2026 13:09:49 -0400 Received: from mail-dl1-x1233.google.com ([2607:f8b0:4864:20::1233]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1xNCaR-0001VQ-JW for qemu-devel@nongnu.org; Sat, 31 Oct 2026 13:09:48 -0400 Received: by mail-dl1-x1233.google.com with SMTP id a92af1059eb24-14394530ec6so2244288c88.1 for ; Sat, 31 Oct 2026 10:09:47 -0700 (PDT) Received: from DESKTOP-Q716RM7 ([103.94.185.75]) by smtp.googlemail.com with ESMTPSA id a92af1059eb24-1ac1854da78sm23749065c88.6.2026.10.31.10.09.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 31 Oct 2026 10:09:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20260707; t=1793466586; x=1794071386; 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=SCvaE1xWeWnx7UnU/1gnWw/QKe7acN1+xJB52VmOclA=; b=V1iZJU4jjNZdqvQIdP19g0LWBrnhsZnQYPh0zpFcot3gH9nKvjnEPIFlbpzFc5N+Ju Y7Z9q6gD703fhNxLefJ+gvVHhaBQKDttTex0NUr/kb4ZCvRsMUq0cgn2rsiCNp78rRlr mO6kyAIo2jdqJtZE2HH2UwjS094rudsY5f6QHAwXUIkrXSQt+Xy/MPytsN+Em/bxpqyM IzXvEldMqrAEljCdeR5r4s72yE8urpAcQPbE/9ZNylXbyXSzAmCdLJJQdfLMrwe9IjG3 w8mVxhVXKbdYsbbNoLlSRBNKfH8mKoKyruc2BLmD9My5gH97KQWtiunS93aEu99HgRky YznQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1793466586; x=1794071386; 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=SCvaE1xWeWnx7UnU/1gnWw/QKe7acN1+xJB52VmOclA=; b=js55N83hTtTMlwjWY3nKJ6yue0LqPACYJj8mTrlzi9uTBc7LomhDAJH7WA5oEt7Jws nAu91kdh5APJd0IhhlxJ/H+zf65UUALrhFZHxIVYlQjYE0kPuu7NqeHXkoRmpqU8slwo 0xodZEt9308ZG6cE8/0c5px4rXNbwZXp9f/XFdRsPQPQYSvhcSywE8a6V2HpdI6C2+VO iZc5ITn8pxV8lTH/8yJYS233wUe90a3hWw16LeqiA6NGPGsGMmGbw4+6AYjS7WNQ0ad2 DCP1f+ZBKtAmyt+GH4gzy/75tWPn3ftRLxNxCnEpzw7u6K4s9GBl8o3oC6pOVJka2Cii tzbg== X-Gm-Message-State: AFq9FYK63t45vz0TTGU5XWS0K9w4fpzxxgjL0BYgIbEN2d3Re6s9g1D+ 9jzMMO7ME9S9Rux+5JR2mTzpfkO7vg+h4XMA4+gP7BGvkiUEt7+1Is5UspEkcky7 X-Gm-Gg: AYBFou0c1pqwQLgGRn/PnBaONGtvrtawKEy8pH+YKE6ip6/0pHkkRG7eaWPfkNczz1x ak2XtaJMSwEtG3IJBt5soNPxR+qPtNfOjV43d5VBdDdSiqlMMDuYrtQkqBaQRTM8ETrweBEcML8 r3h6BL4wNHDxN5dQHZWXgo+6p0UYxL58RJqDGlir6pGTUkNdmlSE2koCIP9l6oxiis4ngqHVzuZ mXzG4ip6c3zKiqAk/es7vTfVmol1IeSxiN7l8F2VqfWIfXrG9V8SEaK7ERvxU8EklaSesHEiF6q DmnTc8KZGVTYut2ykdUB226lteerUFKG7hh74ExFUPEguln0QGZIVbBn/LgD9khq4IhtvF2ePlz Hkzg+VkQQChc5QX0NG1tI3Zd1x1KGRE91ut72TKgOMSs9/ohj9LlPN8JNTzIf8zNUy0UE3Xyozr 5S03pwUSN/c6qeFoixyvBFX4MQzrANMMP6TDq7CpKWH5WBKHQ7XjpzGhQ0w2ts73diRInTNZIMz +qdQ3ouHgY4MdarspW/QAj/dbRz4XxYGEb1xURTN3KpaWRfHPb+Zs7rD+HASTJ0Y12LQNjUtuFY R7hMYky3v6Yr3CVSG2Uintg2qowweB3wnn5/6FFGr3sqDC+T X-Received: by 2002:a05:701b:4206:20b0:1a4:9eaa:d01d with SMTP id a92af1059eb24-1ac5fd08905mr7930123c88.45.1793466585766; Sat, 31 Oct 2026 10:09:45 -0700 (PDT) From: Yonggang Luo To: qemu-devel@nongnu.org Cc: Daniel Henrique Barboza , Chao Liu , Paolo Bonzini , Pierrick Bouvier , Weiwei Li , Palmer Dabbelt , =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= , Alistair Francis , qemu-riscv@nongnu.org, =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= , Philippe Mathieu-Daude Subject: [PATCH v3 2/3] Revert "target/riscv/kvm: restrict kvm-accel-riscv-cpu to riscv targets" Date: Sun, 1 Nov 2026 01:09:24 +0800 Message-ID: <20261031170925.789-3-luoyonggang@gmail.com> X-Mailer: git-send-email 2.55.0.windows.3 In-Reply-To: <20261031170925.789-1-luoyonggang@gmail.com> References: <20261031170925.789-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::1233; envelope-from=luoyonggang@gmail.com; helo=mail-dl1-x1233.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: 1793466653122154100 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 --- 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 5a82a63b822..c085b22b23e 100644 --- a/target/riscv/kvm/kvm-cpu.c +++ b/target/riscv/kvm/kvm-cpu.c @@ -26,7 +26,6 @@ #include "qapi/error.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" @@ -2236,7 +2235,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:09 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=1793466610; cv=none; d=zohomail.com; s=zohoarc; b=F9gsQxGCIfncGNUqNE6kmO0QlFgDzYwao9zn8OpasP+YaR+520HTTpb2Hqb1GfnwZmZPrzFWbTNxZgPoGjp5xoB/IXBF7+3mostEy0j3FDi7uGKy8nJHfR8FuWh5auKKpekxhE8jX4ayViO4p+MZeDMxD+IYdDyP02esMyjmGT0= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1793466610; 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=yUNIvB3FxzBkZ+ejHoX3nLFFjBvTWomjc/HNnaE4vXI=; b=X4QmwgTnnPmmuErZG5vibTceWxL/Ygcv1ljFv7HhczPUTrkGYAa1B+6M7zhNvV/WCFFmdYoXj3MJQ76jFxxWbY4l7EIaNEQIBwGiBe72tb+zvGvw2owPyZzaorcjoRZyS796kBOTYF8lQuKoR1BpqoSVgTMXIrS8qJhyN2JIFuI= 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 1793466610586191.72396430270726; Sat, 31 Oct 2026 10:10:10 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1xNCaZ-0003qx-6G; Sat, 31 Oct 2026 13:09:55 -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 1xNCaX-0003qW-LG for qemu-devel@nongnu.org; Sat, 31 Oct 2026 13:09:53 -0400 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 1xNCaW-0001Vq-3O for qemu-devel@nongnu.org; Sat, 31 Oct 2026 13:09:53 -0400 Received: by mail-dl1-x1231.google.com with SMTP id a92af1059eb24-15943c9c005so1247368c88.1 for ; Sat, 31 Oct 2026 10:09:51 -0700 (PDT) Received: from DESKTOP-Q716RM7 ([103.94.185.75]) by smtp.googlemail.com with ESMTPSA id a92af1059eb24-1ac1854da78sm23749065c88.6.2026.10.31.10.09.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 31 Oct 2026 10:09:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20260707; t=1793466590; x=1794071390; 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=yUNIvB3FxzBkZ+ejHoX3nLFFjBvTWomjc/HNnaE4vXI=; b=gFgMa/WXzE4oRLlyZEEaUfmh1cTxiUA0lqGLYNaggf69yPknRpkwEcCiZjtv+mYZN8 WUpx37u864iVFDagKI/yIqar6dkp7N68uge03DWxxyEa5DzN09BxT4mvtgCvVeHJM1Sj ajeFT6ftFRvBa4lb/hrlIuNnn7x9BLxhq3xMcr/JCF/ZwgypIssD0QOtJOehlYT1uSuq 2AYII9jaNA3IGDDtp+RYymHtC7/VeinqNf3c7f8rAOMtqlWgLb7WhOaCu7+jiFmRklMg wVugATb/6AvGTgyKrU+XV/A3qbLt+LSoyo+MOq0DHFUkIke0HmyWUg8gvQDKY6ttyotr JAuw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1793466590; x=1794071390; 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=yUNIvB3FxzBkZ+ejHoX3nLFFjBvTWomjc/HNnaE4vXI=; b=STCr07YOtrizZ7cDnDZszutLN0Fh6CQFTxH36Z0wk9y6K5ED5D1x4WfL9xMu3uWuMJ tMCXWSCZtiGbQ5FfwhGEFXJkrHKACqq0GrODQA9mb6nRVI8aQJMxh4gHBqNGhqE3Li03 uJO19XEv/ZtcwbunFflqkkMjeM3vlS3ZxVkXe+YhhA90vg7bQ32CLVdsm60LYZDtGZL2 MEhsbfesO3pslk+akbOZzdmcMgPE7TWEV47feclvtTsBsVqf0PFWXa7JXnLADYdWdv+D TqaxxHtUjtw7zsjJs+sx7n6RXU/KuBTawLBK5/jcLLY0pq9+XKzsumzDngyjLHns0rJ4 E45A== X-Gm-Message-State: AFq9FYKVwVtPqkkd3gN99BSzsETbrlRnCz+1imA0WiqLg+PKue18GvGe bzNq696efNg0+DYhgwe2MxmhBPjolaoAt1/dE/yWRkutqY2R9K311xrLJB9suQP3 X-Gm-Gg: AYBFou1g3bd79fmalF9DxBuX5XvWAobSm8DAsO1bcxhsQDkJR7+j57zfWjSNDD0PTb8 GRcvw+unS+Ik6fxccJ8oaO8fRHgK5UI/+bbz57gwU0Hp5JU76wATaFDXWCrwDBvoC1YrrkkVu0o cBAky3ttwbUM/fGxIbpuFNsCxki736UqohpCfLzLg7HTE0ecY4sdmgAy42QUczXeNkAXddG3cqm f2q6JCS5mC74U+d31HNu1y2B/QBv0BR4IsjNWRalH4J53NICrJbUy2ZWLrGwwyjje4zoOQAQy/G 7Z3kzg2Knk/iIBlxMr/0TfTbR3x2tZKEElMP7l8P7JwRoJEyqbYMr2aLFjy5tiu4u7hBPAxCEcN ZM/aIWY5pINkqFmdMjPT5M/R8ALBEiQKN9K6v5thJhcdCfz3M9XJ1Xh0iBXIbx17Ssqy8Ww0vf5 T9Wyhw+8sm85REkfXts3HuQaKtP5kO3xu8+JUvUL85369xQ94NQ6Z3A2rvx2KJtrZxdrhPOBKiD /k9PZjioL/pTIbghf+7bgfCiWd7DzyVDPqs0SyXA85Wp1tNlzWaFmfWcIFqx3pl+ZAheYTxIrLa Jq+fO0DeUM5obU1QKgCl0chQiqE3m0ZNWX8810Uvm5hMF4gnXw== X-Received: by 2002:a05:7022:208a:b0:1b0:4272:4282 with SMTP id a92af1059eb24-1b042725256mr1322960c88.17.1793466590235; Sat, 31 Oct 2026 10:09:50 -0700 (PDT) From: Yonggang Luo To: qemu-devel@nongnu.org Cc: Daniel Henrique Barboza , Chao Liu , Paolo Bonzini , Pierrick Bouvier , Weiwei Li , Palmer Dabbelt , =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= , Alistair Francis , qemu-riscv@nongnu.org, =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= , Philippe Mathieu-Daude Subject: [PATCH v3 3/3] Revert "target/riscv/tcg: restrict tcg-accel-riscv-cpu to riscv targets" Date: Sun, 1 Nov 2026 01:09:25 +0800 Message-ID: <20261031170925.789-4-luoyonggang@gmail.com> X-Mailer: git-send-email 2.55.0.windows.3 In-Reply-To: <20261031170925.789-1-luoyonggang@gmail.com> References: <20261031170925.789-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=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: 1793466612767154100 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 --- 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 2a7796c382e..1369b7c4ded 100644 --- a/target/riscv/tcg/tcg-cpu.c +++ b/target/riscv/tcg/tcg-cpu.c @@ -1754,7 +1754,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