qapi: make most CPU commands unconditionally available
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. Adjust the doc comments accordingly. Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Signed-off-by: Daniel P. Berrangé <berrange@redhat.com> Signed-off-by: Pierrick Bouvier <pierrick.bouvier@linaro.org> Message-ID: <20250522190542.588267-10-pierrick.bouvier@linaro.org> Reviewed-by: Markus Armbruster <armbru@redhat.com>
This commit is contained in:
parent
448553bb7c
commit
d6758495d8
14 changed files with 437 additions and 406 deletions
|
|
@ -82,6 +82,8 @@ if have_system
|
|||
stub_ss.add(files('monitor-i386-sev.c'))
|
||||
stub_ss.add(files('monitor-i386-sgx.c'))
|
||||
stub_ss.add(files('monitor-i386-xen.c'))
|
||||
stub_ss.add(files('monitor-cpu.c'))
|
||||
stub_ss.add(files('monitor-cpu-s390x.c'))
|
||||
endif
|
||||
|
||||
if have_system or have_user
|
||||
|
|
|
|||
23
stubs/monitor-cpu-s390x.c
Normal file
23
stubs/monitor-cpu-s390x.c
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
/* SPDX-License-Identifier: GPL-2.0-or-later */
|
||||
|
||||
#include "qemu/osdep.h"
|
||||
#include "qapi/error.h"
|
||||
#include "qapi/qapi-commands-machine.h"
|
||||
|
||||
CpuModelCompareInfo *
|
||||
qmp_query_cpu_model_comparison(CpuModelInfo *infoa,
|
||||
CpuModelInfo *infob,
|
||||
Error **errp)
|
||||
{
|
||||
error_setg(errp, "CPU model comparison is not supported on this target");
|
||||
return NULL;
|
||||
}
|
||||
|
||||
CpuModelBaselineInfo *
|
||||
qmp_query_cpu_model_baseline(CpuModelInfo *infoa,
|
||||
CpuModelInfo *infob,
|
||||
Error **errp)
|
||||
{
|
||||
error_setg(errp, "CPU model baseline is not supported on this target");
|
||||
return NULL;
|
||||
}
|
||||
21
stubs/monitor-cpu.c
Normal file
21
stubs/monitor-cpu.c
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
/* SPDX-License-Identifier: GPL-2.0-or-later */
|
||||
|
||||
#include "qemu/osdep.h"
|
||||
#include "qapi/error.h"
|
||||
#include "qapi/qapi-commands-machine.h"
|
||||
|
||||
CpuModelExpansionInfo *
|
||||
qmp_query_cpu_model_expansion(CpuModelExpansionType type,
|
||||
CpuModelInfo *model,
|
||||
Error **errp)
|
||||
{
|
||||
error_setg(errp, "CPU model expansion is not supported on this target");
|
||||
return NULL;
|
||||
}
|
||||
|
||||
CpuDefinitionInfoList *
|
||||
qmp_query_cpu_definitions(Error **errp)
|
||||
{
|
||||
error_setg(errp, "CPU model definitions are not supported on this target");
|
||||
return NULL;
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue