mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-02 23:33:54 -06:00
cpus: Introduce CPUClass::list_cpus() callback
Some targets define cpu_list to a method listing their CPUs on stdout. In order to make list_cpus() generic, introduce the CPUClass::list_cpus() callback. When no callback is registered, list_cpus() defaults to the cpu_list definition. Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org> Reviewed-by: Thomas Huth <thuth@redhat.com> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Reviewed-by: Zhao Liu <zhao1.liu@intel.com> Message-Id: <20250324185837.46506-2-philmd@linaro.org>
This commit is contained in:
parent
9ce6caa0d9
commit
0a5692fecc
2 changed files with 9 additions and 1 deletions
|
@ -102,6 +102,7 @@ struct SysemuCPUOps;
|
|||
* CPUClass:
|
||||
* @class_by_name: Callback to map -cpu command line model name to an
|
||||
* instantiatable CPU type.
|
||||
* @list_cpus: list available CPU models and flags.
|
||||
* @parse_features: Callback to parse command line arguments.
|
||||
* @reset_dump_flags: #CPUDumpFlags to use for reset logging.
|
||||
* @memory_rw_debug: Callback for GDB memory access.
|
||||
|
@ -148,6 +149,7 @@ struct CPUClass {
|
|||
/*< public >*/
|
||||
|
||||
ObjectClass *(*class_by_name)(const char *cpu_model);
|
||||
void (*list_cpus)(void);
|
||||
void (*parse_features)(const char *typename, char *str, Error **errp);
|
||||
|
||||
int (*memory_rw_debug)(CPUState *cpu, vaddr addr,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue