All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v5 0/3] Register accel-$cpu_type for all targets
@ 2026-11-06  2:39 Yonggang Luo
  2026-11-06  2:39 ` [PATCH v5 1/3] accel: register CPU parent only for AccelCPU subclasses Yonggang Luo
                   ` (3 more replies)
  0 siblings, 4 replies; 9+ messages in thread
From: Yonggang Luo @ 2026-11-06  2:39 UTC (permalink / raw)
  To: qemu-devel
  Cc: Nicholas Piggin, Richard Henderson, Paolo Bonzini, Chao Liu,
	Palmer Dabbelt, Alistair Francis, Chinmay Rath, Glenn Miles,
	qemu-arm, Peter Maydell, Zhao Liu, Weiwei Li, Pierrick Bouvier,
	Philippe Mathieu-Daude, Daniel Henrique Barboza,
	Harsh Prateek Bora, qemu-riscv, qemu-ppc,
	Philippe Mathieu-Daudé

A multi-target system binary links more than one target.
accel_cpu_register_type() creates the abstract parent accel-$cpu_type for each
target that has an AccelCPU subclass. ARM, i386, RISC-V, and PowerPC call it.
Other targets have no such subclass, and machine init skips a missing class.

test-multi-target already instantiates every QOM type, so this series adds no
parent check.

This is an alternative to gating accelerator CPU types with is_available. The
RISC-V TCG and KVM gates are reverted here as redundant.

v4: https://lore.kernel.org/qemu-devel/20261105183310.1614-1-luoyonggang@gmail.com/

Changes v4 -> v5:

- Drop test_accel_cpu_parent(). test_qom_types_are_unique() already instantiates
  every QOM type

Yonggang Luo (3):
  accel: register CPU parent only for AccelCPU subclasses
  Revert "target/riscv/kvm: restrict kvm-accel-riscv-cpu to riscv
    targets"
  Revert "target/riscv/tcg: restrict tcg-accel-riscv-cpu to riscv
    targets"

 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 ++++++++
 target/riscv/kvm/kvm-cpu.c | 2 --
 target/riscv/tcg/tcg-cpu.c | 1 -
 8 files changed, 18 insertions(+), 7 deletions(-)

-- 
2.55.0.windows.3



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

end of thread, other threads:[~2026-11-12 15:10 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-11-06  2:39 [PATCH v5 0/3] Register accel-$cpu_type for all targets Yonggang Luo
2026-11-06  2:39 ` [PATCH v5 1/3] accel: register CPU parent only for AccelCPU subclasses Yonggang Luo
2026-11-06 17:59   ` Pierrick Bouvier
2026-11-06 19:12     ` Yonggang Luo
2026-11-12 13:43   ` Daniel P. Berrangé
2026-11-12 15:09     ` Yonggang Luo
2026-11-06  2:39 ` [PATCH v5 2/3] Revert "target/riscv/kvm: restrict kvm-accel-riscv-cpu to riscv targets" Yonggang Luo
2026-11-06  2:39 ` [PATCH v5 3/3] Revert "target/riscv/tcg: restrict tcg-accel-riscv-cpu " Yonggang Luo
2026-11-06 18:05 ` [PATCH v5 0/3] Register accel-$cpu_type for all targets Pierrick Bouvier

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.