diff options
author | Igor Mammedov <imammedo@redhat.com> | 2017-02-10 11:20:57 +0100 |
---|---|---|
committer | David Gibson <david@gibson.dropbear.id.au> | 2017-02-22 11:28:28 +1100 |
commit | c5514d0e4bafde751ec09439ba042b1f1cda37a7 (patch) | |
tree | e9dac28948c2c02109c09f0faa1421ca41d24c0e /include | |
parent | f2d672c248e359dd36081bbebc8854609cc9f112 (diff) | |
download | qemu-c5514d0e4bafde751ec09439ba042b1f1cda37a7.zip qemu-c5514d0e4bafde751ec09439ba042b1f1cda37a7.tar.gz qemu-c5514d0e4bafde751ec09439ba042b1f1cda37a7.tar.bz2 |
machine: replace query_hotpluggable_cpus() callback with has_hotpluggable_cpus flag
Generic helper machine_query_hotpluggable_cpus() replaced
target specific query_hotpluggable_cpus() callbacks so
there is no need in it anymore. However inon NULL callback
value is used to detect/report hotpluggable cpus support,
therefore it can be removed completely.
Replace it with MachineClass.has_hotpluggable_cpus boolean
which is sufficient for the task.
Suggested-by: David Gibson <david@gibson.dropbear.id.au>
Signed-off-by: Igor Mammedov <imammedo@redhat.com>
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Diffstat (limited to 'include')
-rw-r--r-- | include/hw/boards.h | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/include/hw/boards.h b/include/hw/boards.h index 9040dbb..269d0ba 100644 --- a/include/hw/boards.h +++ b/include/hw/boards.h @@ -87,10 +87,8 @@ typedef struct { * Returns an array of @CPUArchId architecture-dependent CPU IDs * which includes CPU IDs for present and possible to hotplug CPUs. * Caller is responsible for freeing returned list. - * @query_hotpluggable_cpus: - * Returns a @HotpluggableCPUList, which describes CPUs objects which - * could be added with -device/device_add. - * Caller is responsible for freeing returned list. + * @has_hotpluggable_cpus: + * If true, board supports CPUs creation with -device/device_add. * @minimum_page_bits: * If non-zero, the board promises never to create a CPU with a page size * smaller than this, so QEMU can use a more efficient larger page @@ -136,12 +134,12 @@ struct MachineClass { bool option_rom_has_mr; bool rom_file_has_mr; int minimum_page_bits; + bool has_hotpluggable_cpus; HotplugHandler *(*get_hotplug_handler)(MachineState *machine, DeviceState *dev); unsigned (*cpu_index_to_socket_id)(unsigned cpu_index); const CPUArchIdList *(*possible_cpu_arch_ids)(MachineState *machine); - HotpluggableCPUList *(*query_hotpluggable_cpus)(MachineState *machine); }; /** |