Hi, following last week KVM call [1], I'm posting my playground
machine to slowly work toward heterogeneous QEMU. This is
orthogonal to Paolo / Markus / Daniel effort to have a
qemu-system-qmp CLI entrypoint [2].
After refactoring a bit the headers to remove target-specific
dependencies, we can remove the targets (and accelerators)
from the picture, to have a target-agnostic QEMU.
This binary helps to find a lot of code abuses where we only
expect one target being built, and is useful to clean that.
So far my naive roadmap draft is:
- Ignoring target-specific hardware devices, target-agnostic
code should only use the CPUClass and CPUState to interface
with the target-specific code.
- CPU objects shouldn't access an unique global accelerator,
but should be initialized with a specific accelerator.
- Each target registers as a QEMU module. Should we expose
a target API beside the CPU?
- Compile TCG-target-specific objects in each target dir?
- Refactor buildsys to register multiple targets.
- TBC.
[1] https://lore.kernel.org/qemu-devel/87fsot761s.fsf@secure.mitica/
[2] https://lore.kernel.org/qemu-devel/20220208144458.1079634-1-pbonzini@redhat.com/
Based-on: <20220214183144.27402-1-f4bug@amsat.org>
"target: Use ArchCPU & CPUArchState as abstract interface to target CPU"
https://lore.kernel.org/qemu-devel/20220214183144.27402-1-f4bug@amsat.org/
Philippe Mathieu-Daudé (1):
target: Add system emulation aiming to target any architecture
configs/devices/any-softmmu/default.mak | 1 +
configs/targets/any-softmmu.mak | 3 +++
hw/any/meson.build | 5 +++++
hw/meson.build | 1 +
include/sysemu/arch_init.h | 1 +
meson.build | 6 +++--
qapi/machine.json | 2 +-
target/Kconfig | 1 +
target/any/Kconfig | 4 ++++
target/any/cpu-param.h | 30 +++++++++++++++++++++++++
target/any/cpu.h | 26 +++++++++++++++++++++
target/any/meson.build | 8 +++++++
target/meson.build | 1 +
13 files changed, 86 insertions(+), 3 deletions(-)
create mode 100644 configs/devices/any-softmmu/default.mak
create mode 100644 configs/targets/any-softmmu.mak
create mode 100644 hw/any/meson.build
create mode 100644 target/any/Kconfig
create mode 100644 target/any/cpu-param.h
create mode 100644 target/any/cpu.h
create mode 100644 target/any/meson.build
--
2.34.1