aboutsummaryrefslogtreecommitdiff
path: root/include/hw/boards.h
diff options
context:
space:
mode:
authorIgor Mammedov <imammedo@redhat.com>2017-02-10 11:20:57 +0100
committerDavid Gibson <david@gibson.dropbear.id.au>2017-02-22 11:28:28 +1100
commitc5514d0e4bafde751ec09439ba042b1f1cda37a7 (patch)
treee9dac28948c2c02109c09f0faa1421ca41d24c0e /include/hw/boards.h
parentf2d672c248e359dd36081bbebc8854609cc9f112 (diff)
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/hw/boards.h')
-rw-r--r--include/hw/boards.h8
1 files changed, 3 insertions, 5 deletions
diff --git a/include/hw/boards.h b/include/hw/boards.h
index 9040dbba06..269d0ba399 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);
};
/**