diff options
author | Igor Mammedov <imammedo@redhat.com> | 2017-02-09 12:08:38 +0100 |
---|---|---|
committer | David Gibson <david@gibson.dropbear.id.au> | 2017-02-22 11:28:28 +1100 |
commit | f2d672c248e359dd36081bbebc8854609cc9f112 (patch) | |
tree | 1c984ffa5eb16784cfa904d4dc1e5e0089dd38d3 /include/hw/boards.h | |
parent | 535455fdee60e4e7979a5060ba7a4e4588ee1a1e (diff) |
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 <imammedo@redhat.com>
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Diffstat (limited to 'include/hw/boards.h')
-rw-r--r-- | include/hw/boards.h | 3 |
1 files changed, 3 insertions, 0 deletions
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; |