Hi,
This series implements one of the most common QMP CPU commands,
query-cpu-definitions.
libvirt and others uses this command to inspect the CPUs available in
the QEMU binary, with the option to further inspect their properties
using device-list-properties.
The design decision made here is to consider all generic (i.e. not
named) CPUs as not static, which the API semantics considers to be the
same as migration-unsafe. The reason why I took this decision is because
generic CPUs can have their extensions changed via command line. Today
this is the case for all CPUs, but we're going to change that in the
near future after this series.
Patches were based on top of Alistair's riscv-to-apply.next.
Daniel Henrique Barboza (4):
target/riscv: add CPU QOM header
target/riscv: add query-cpy-definitions support
target/riscv: add 'static' attribute of query-cpu-definitions
target/riscv: make generic cpus not static
qapi/machine-target.json | 6 ++-
target/riscv/cpu-qom.h | 73 +++++++++++++++++++++++++++++++++++
target/riscv/cpu.c | 54 ++++++++++++++++++++++++--
target/riscv/cpu.h | 46 +---------------------
target/riscv/meson.build | 3 +-
target/riscv/riscv-qmp-cmds.c | 55 ++++++++++++++++++++++++++
6 files changed, 185 insertions(+), 52 deletions(-)
create mode 100644 target/riscv/cpu-qom.h
create mode 100644 target/riscv/riscv-qmp-cmds.c
--
2.39.2