Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists1p.gnu.org (lists1p.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id AAD65C982D0 for ; Fri, 18 Sep 2026 00:07:25 +0000 (UTC) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1x7M7z-0006bi-6n; Thu, 17 Sep 2026 20:06: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 1x7M7w-0006au-Ir for qemu-riscv@nongnu.org; Thu, 17 Sep 2026 20:06:52 -0400 Received: from mail-pl1-x62f.google.com ([2607:f8b0:4864:20::62f]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1x7M7u-0004qj-Ty for qemu-riscv@nongnu.org; Thu, 17 Sep 2026 20:06:52 -0400 Received: by mail-pl1-x62f.google.com with SMTP id d9443c01a7336-2db710396ffso10655245ad.1 for ; Thu, 17 Sep 2026 17:06:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1789690009; x=1790294809; darn=nongnu.org; h=content-transfer-encoding:mime-version:content-type:message-id:date :subject:cc:to:from:from:to:cc:subject:date:message-id:reply-to :content-type; bh=dSdxLTVBDZLas3mi12fziPFTxITSX7k0t06YRU4w+ds=; b=MDrf+QI/ziY56Bn6Syi4l6c3mD6gvhTks3wsfNMexkAMPvxwVyqfKrpnqYeRiEeRGN KTR4lPljQwrzLBxXYhBNL0tWfZi0qmKtYmpo+0xcstDCx8DuVz2E4Q1ChAxSmMw18IM5 XZqg1c/HD7rqfBvBnC2gL9ELNV/TOrzEvbhsrH2ql/SNV9FAhI3HK+jDEJBxwKEcEpd+ h9hv7oaq6+EnaYh14WRpZWI/iFvj1siM/g16MRt/GRFoj8NslqttXdCrB5PurRHakeAe vR6hVaZQB8FQX7iGlvInbF25HuHvu688+grZLtXKzPnYVH1Q2tnrYKivJu472ylovnPv ne4w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1789690009; x=1790294809; h=content-transfer-encoding:mime-version:content-type: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=dSdxLTVBDZLas3mi12fziPFTxITSX7k0t06YRU4w+ds=; b=0sMaHnJnl5monBvMeprGPChNA6wkaCNDsW5/wJtJJbF9/IOth3jktOz3I4YDG2c07Y xguIbBpbL2WQDJloj7dZtd9Y5aSQc4/AJaDKymCIJBFSGtnK9c0CSuO3IbXvu1T8Mr7b xgW6qoIomQHzUH525H9qo9OkoHbhx25Oiu9XXycdeqpmnJy32lzXKGBY+69qrJdVJQiI J+iLoc73Ae6nYL1QaESLLirwnQ1V3fLFb4LjR2m3jrEDX6Eh4o67SURISuevV7eSlC5D QSDAIAjC/saa0LQatPTNMGT5IKLQVRa2ljutCadCrvzB2vtlHmbATyRVSwnXoalx/YN4 +mfw== X-Forwarded-Encrypted: i=1; AKwUvBwIWA6LStONdmW1MTpi+U0o72dhNEtVbBA/ydSKtwnoDrnHkVGA09bt2VkTiV4DxxuQFw0V1hqZehmJ@nongnu.org X-Gm-Message-State: AFuF++mXQ1ny72Is0uPzMg4L6+n71f9NoB3L258Wz6ORgiMBy4zZhJNi PjlCzGDswB9yNTQ4mA6m/bgLOFIaKMPQuy4+cD3Pr6tXIe36TDEdxzHt X-Gm-Gg: AYBFou0zQz3bGuAEMlDvObhAlOAGTtlYenet2PYakOthLOfcfV/ODYrD7WKVGkOuqN7 fNGO15o8uOB7q755NRzp4m6U68BtN9TZ1MnWE1fsnXZ0XnfquYatSi6P+VpExN/HMQWIPaKSUyd 6GtS1ZY6gWAAkgLBzvUHcczeDeTw2BphcnWUBUexmirJwTe7OBva3lefDCrgRCwNJj9Ldcb6Zlq dmMQQBmzNzKioWqnvOE5SMESeG91rHnNrRpmAMGRwVvGfTHwOpa6Gtfy4xhx8+QJ+tkXkRTPyAj n+kP4umX9vZclk2U4uRYfRlui7B84Nd2tWZz5YP0ScXolnY1mAOvi4NyTt3VNeoL2eQhhFi91zz ou80QVVBPTGc5AJUOYKwo+IK3CV4wE9y16Ez18X1mCDo5LjNLP2Not/uiTc23EULfI93EhODOU8 jZFQOT+KoeRM6IK6ws/4uMsmBnHv8WPLyT1zO7aveG/0w4Nf/GYyTr1Jy4Fu52vaMN7wpdP0wpN 60Bia7dK30dYXm7pWHG26KDu/Q6TavK X-Received: by 2002:a17:90b:58c4:b0:39d:e445:1d44 with SMTP id 98e67ed59e1d1-39e361afbe1mr7537456a91.31.1789690009222; Thu, 17 Sep 2026 17:06:49 -0700 (PDT) Received: from WIN-BH9M8FJACR9 ([103.94.185.75]) by smtp.googlemail.com with ESMTPSA id 5a478bee46e88-33bf5b1d335sm20328212eec.28.2026.09.17.17.06.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 17 Sep 2026 17:06:48 -0700 (PDT) From: Yonggang Luo To: qemu-devel@nongnu.org Cc: Xianglai Li , Weiwei Li , Alistair Francis , Stafford Horne , qemu-riscv@nongnu.org, qemu-arm@nongnu.org, Jiaxun Yang , Zhao Liu , Brian Cain , Laurent Vivier , Peter Maydell , Pierrick Bouvier , Paolo Bonzini , Song Gao <17746591750@163.com>, Daniel Henrique Barboza , Bibo Mao , Chao Liu , Palmer Dabbelt , Philippe Mathieu-Daude , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Liu Zhiwei , Max Filippov Subject: [PATCH 0/8] machine: uniquify virt QOM names Date: Fri, 18 Sep 2026 08:06:31 +0800 Message-ID: <20260918000640.1001-1-luoyonggang@gmail.com> X-Mailer: git-send-email 2.52.0.windows.1 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Received-SPF: pass client-ip=2607:f8b0:4864:20::62f; envelope-from=luoyonggang@gmail.com; helo=mail-pl1-x62f.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-riscv@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-riscv-bounces+qemu-riscv=archiver.kernel.org@nongnu.org Sender: qemu-riscv-bounces+qemu-riscv=archiver.kernel.org@nongnu.org Multiple targets register a virt board as MACHINE_TYPE_NAME("virt"). Those QOM types collide if more than one board is linked into one qemu-system process. This series splits the QOM type from the -M name so each virt board can keep a unique type while -M virt, help, and migration stay the same. - Add machine_class_set_name() so boards can set MachineClass::name when it must differ from the QOM type. machine_class_base_init still defaults the name to the QOM type without -machine. Document that MachineClass::name is the -M name, not the QOM type. Sort -M help by that name so order matches the printed names after types are prefixed (arm-virt-11.1-machine vs virt-11.1). - Give each colliding virt board a unique QOM type and keep the existing -M name via machine_class_set_name(): riscv-virt, arm-virt, or1k-virt, hexagon-virt, loongarch-virt, m68k-virt, and xtensa-virt. Versioned ARM, LoongArch, and M68K boards keep virt-. Latest ARM virt still sets mc->alias to virt. Yonggang Luo (8): machine: allow -M name to differ from QOM type hw/riscv/virt: use unique QOM name hw/arm/virt: use unique QOM name hw/or1k/virt: use unique QOM name hw/hexagon/virt: use unique QOM name hw/loongarch/virt: use unique QOM name hw/m68k/virt: use unique QOM name hw/xtensa/virt: use unique QOM name hw/arm/virt.c | 3 ++- hw/core/machine.c | 6 ++++++ hw/hexagon/virt.c | 1 + hw/loongarch/virt.c | 3 ++- hw/m68k/virt.c | 7 ++++--- hw/or1k/virt.c | 3 ++- hw/riscv/virt.c | 3 ++- hw/xtensa/virt.c | 3 ++- include/hw/arm/virt.h | 2 +- include/hw/core/boards.h | 12 +++++++++++- include/hw/hexagon/virt.h | 2 +- include/hw/loongarch/virt.h | 2 +- include/hw/riscv/virt.h | 2 +- system/vl.c | 8 +++----- 14 files changed, 39 insertions(+), 18 deletions(-) -- 2.52.0.windows.1