All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v3 00/10] machine: uniquify virt QOM names
@ 2026-09-26  8:15 Yonggang Luo
  2026-09-26  8:15 ` [PATCH v3 01/10] machine: allow -M name to differ from QOM type Yonggang Luo
                   ` (10 more replies)
  0 siblings, 11 replies; 51+ messages in thread
From: Yonggang Luo @ 2026-09-26  8:15 UTC (permalink / raw)
  To: qemu-devel
  Cc: Chao Liu, Eric Blake, qemu-arm, Paolo Bonzini,
	Philippe Mathieu-Daudé, Markus Armbruster, Alistair Francis,
	Brian Cain, Stafford Horne, Daniel P. Berrangé,
	Peter Maydell, Jiaxun Yang, Fabiano Rosas,
	Daniel Henrique Barboza, Pierrick Bouvier, qemu-riscv,
	Laurent Vivier, Max Filippov, Song Gao, Philippe Mathieu-Daude,
	Palmer Dabbelt, Laurent Vivier, Weiwei Li, Zhao Liu

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-<ver>. Latest
  ARM virt still sets mc->alias to virt.
- query-machines returns MachineInfo typename, the QOM type from
  object_class_get_name(), for qom-list-properties. The -M name alone
  is not that type once virt boards are prefixed.

Changes v2 -> v3:
The versioned-machine example in boards.h now follows hw/arm/virt.c.
machine_class_set_name() keeps the -M name as virt-<version>, the QOM type in
the example is arm-virt, and the latest helper is DEFINE_VIRT_MACHINE_AS_LATEST.

Changes v1 -> v2:
- query-machines returns MachineInfo typename. v1 returned only the
  -M name, so a client that appended "-machine" looked up the wrong
  type for a prefixed board such as arm-virt-11.1-machine versus
  -M virt-11.1.

Yonggang Luo (10):
  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
  qapi: return MachineInfo typename from query-machines
  machine: match the versioned virt example to arm virt

 hw/arm/virt.c               |  3 +-
 hw/core/machine-qmp-cmds.c  |  1 +
 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    | 26 +++++++++++----
 include/hw/hexagon/virt.h   |  2 +-
 include/hw/loongarch/virt.h |  2 +-
 include/hw/riscv/virt.h     |  2 +-
 qapi/machine.json           |  6 +++-
 system/vl.c                 |  8 ++---
 tests/qtest/qom-test.c      | 65 +++++++++++++++++++++++++++++++++----
 17 files changed, 113 insertions(+), 30 deletions(-)

-- 
2.52.0.windows.1



^ permalink raw reply	[flat|nested] 51+ messages in thread

end of thread, other threads:[~2026-10-03 18:30 UTC | newest]

Thread overview: 51+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-09-26  8:15 [PATCH v3 00/10] machine: uniquify virt QOM names Yonggang Luo
2026-09-26  8:15 ` [PATCH v3 01/10] machine: allow -M name to differ from QOM type Yonggang Luo
2026-09-30  8:44   ` Zhao Liu
2026-09-30 18:19   ` Pierrick Bouvier
2026-10-01  1:55     ` Yonggang Luo
2026-10-01  4:23       ` Pierrick Bouvier
2026-10-01  8:01         ` Daniel P. Berrangé
2026-10-01  8:13           ` Yonggang Luo
2026-10-01  8:44             ` Philippe Mathieu-Daudé
2026-10-01 10:33               ` Yonggang Luo
2026-10-01 16:14               ` Yonggang Luo
2026-10-01 16:19                 ` Pierrick Bouvier
2026-10-01 17:40                   ` Daniel P. Berrangé
2026-10-01 18:08                     ` Pierrick Bouvier
2026-10-01 18:26                       ` Daniel P. Berrangé
2026-10-01 18:56                         ` Pierrick Bouvier
2026-10-02  2:00                           ` Yonggang Luo
2026-10-02 15:40                             ` Pierrick Bouvier
2026-10-02 16:32                               ` Daniel P. Berrangé
2026-10-02 16:43                                 ` Yonggang Luo
2026-10-02 16:52                                   ` Daniel P. Berrangé
2026-10-02 16:58                                     ` Yonggang Luo
2026-10-02 16:17                             ` Daniel P. Berrangé
2026-10-02 16:29                               ` Yonggang Luo
2026-10-02  3:10                           ` Yonggang Luo
2026-10-02 15:34                           ` Yonggang Luo
2026-10-02 16:14                           ` Daniel P. Berrangé
2026-10-02 16:27                             ` Yonggang Luo
2026-10-02 16:34                               ` Daniel P. Berrangé
2026-10-03 18:29                                 ` Yonggang Luo
2026-10-01  2:07     ` Yonggang Luo
2026-09-26  8:15 ` [PATCH v3 02/10] hw/riscv/virt: use unique QOM name Yonggang Luo
2026-09-30  8:44   ` Zhao Liu
2026-09-26  8:15 ` [PATCH v3 03/10] hw/arm/virt: " Yonggang Luo
2026-09-30  8:44   ` Zhao Liu
2026-09-26  8:15 ` [PATCH v3 04/10] hw/or1k/virt: " Yonggang Luo
2026-09-30  8:44   ` Zhao Liu
2026-09-26  8:15 ` [PATCH v3 05/10] hw/hexagon/virt: " Yonggang Luo
2026-09-30  8:45   ` Zhao Liu
2026-09-26  8:15 ` [PATCH v3 06/10] hw/loongarch/virt: " Yonggang Luo
2026-09-30  8:45   ` Zhao Liu
2026-09-26  8:15 ` [PATCH v3 07/10] hw/m68k/virt: " Yonggang Luo
2026-09-30  8:45   ` Zhao Liu
2026-09-26  8:15 ` [PATCH v3 08/10] hw/xtensa/virt: " Yonggang Luo
2026-09-30  8:46   ` Zhao Liu
2026-09-26  8:15 ` [PATCH v3 09/10] qapi: return MachineInfo typename from query-machines Yonggang Luo
2026-09-28  6:44   ` Markus Armbruster
2026-09-30  8:46   ` Zhao Liu
2026-09-26  8:15 ` [PATCH v3 10/10] machine: match the versioned virt example to arm virt Yonggang Luo
2026-09-30  8:47   ` Zhao Liu
2026-09-30  2:50 ` [PATCH v3 00/10] machine: uniquify virt QOM names Yonggang Luo

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.