From f2d672c248e359dd36081bbebc8854609cc9f112 Mon Sep 17 00:00:00 2001 From: Igor Mammedov Date: Thu, 9 Feb 2017 12:08:38 +0100 Subject: machine: unify [pc_|spapr_]query_hotpluggable_cpus() callbacks All callbacks FOO_query_hotpluggable_cpus() are practically the same except of setting vcpus_count to different values. Convert them to a generic machine_query_hotpluggable_cpus() callback by moving vcpus_count initialization to per machine specific callback possible_cpu_arch_ids(). Signed-off-by: Igor Mammedov Signed-off-by: David Gibson --- include/hw/boards.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'include/hw/boards.h') diff --git a/include/hw/boards.h b/include/hw/boards.h index 60209df755..9040dbba06 100644 --- a/include/hw/boards.h +++ b/include/hw/boards.h @@ -41,15 +41,18 @@ int machine_phandle_start(MachineState *machine); bool machine_dump_guest_core(MachineState *machine); bool machine_mem_merge(MachineState *machine); void machine_register_compat_props(MachineState *machine); +HotpluggableCPUList *machine_query_hotpluggable_cpus(MachineState *machine); /** * CPUArchId: * @arch_id - architecture-dependent CPU ID of present or possible CPU * @cpu - pointer to corresponding CPU object if it's present on NULL otherwise * @props - CPU object properties, initialized by board + * #vcpus_count - number of threads provided by @cpu object */ typedef struct { uint64_t arch_id; + int64_t vcpus_count; CpuInstanceProperties props; Object *cpu; } CPUArchId; -- cgit v1.2.3