On 5/16/25 11:00 PM, Markus Armbruster wrote:
Pierrick Bouvier <pierrick.bouv...@linaro.org> writes:
From: Daniel P. Berrangé <berra...@redhat.com>
This removes the TARGET_* conditions from all the CPU commands
that are conceptually target independent. Top level stubs are
provided to cope with targets which do not currently implement
all of the commands.
Reviewed-by: Richard Henderson <richard.hender...@linaro.org>
Signed-off-by: Daniel P. Berrangé <berra...@redhat.com>
Signed-off-by: Pierrick Bouvier <pierrick.bouv...@linaro.org>
---
MAINTAINERS | 1 -
qapi/machine-target.json | 522 --------------------------
qapi/machine.json | 363 ++++++++++++++++++
stubs/monitor-cpu-s390x.c | 23 ++
stubs/monitor-cpu.c | 21 ++
target/arm/arm-qmp-cmds.c | 2 +-
target/i386/cpu-system.c | 2 +-
target/i386/cpu.c | 2 +-
target/loongarch/loongarch-qmp-cmds.c | 2 +-
target/mips/system/mips-qmp-cmds.c | 12 +-
target/ppc/ppc-qmp-cmds.c | 12 +-
target/riscv/riscv-qmp-cmds.c | 2 +-
target/s390x/cpu_models_system.c | 2 +-
stubs/meson.build | 2 +
14 files changed, 437 insertions(+), 531 deletions(-)
delete mode 100644 qapi/machine-target.json
create mode 100644 stubs/monitor-cpu-s390x.c
create mode 100644 stubs/monitor-cpu.c
[...]
-##
-# @query-cpu-definitions:
-#
-# Return a list of supported virtual CPU definitions
-#
-# Returns: a list of CpuDefinitionInfo
-#
-# Since: 1.2
-##
-{ 'command': 'query-cpu-definitions', 'returns': ['CpuDefinitionInfo'],
- 'if': { 'any': [ 'TARGET_PPC',
- 'TARGET_ARM',
- 'TARGET_I386',
- 'TARGET_S390X',
- 'TARGET_MIPS',
- 'TARGET_LOONGARCH64',
- 'TARGET_RISCV' ] } }
-
Stuff deleted above is added to qapi/machine.json. Okay.
Stuff deleted below is gone until the next commit adds it back to
machine-s390x.json. Build fails. Oops :)
Thanks for catching this!
I'll fix order of deletion, and make sure every commit compiles cleanly.
Thanks,
Pierrick