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 /hw/i386 | |
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 'hw/i386')
-rw-r--r-- | hw/i386/pc.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/hw/i386/pc.c b/hw/i386/pc.c index f96cfc6..d24388e 100644 --- a/hw/i386/pc.c +++ b/hw/i386/pc.c @@ -1955,7 +1955,7 @@ static void pc_cpu_pre_plug(HotplugHandler *hotplug_dev, } /* if 'address' properties socket-id/core-id/thread-id are not set, set them - * so that query_hotpluggable_cpus would show correct values + * so that machine_query_hotpluggable_cpus would show correct values */ /* TODO: move socket_id/core_id/thread_id checks into x86_cpu_realizefn() * once -smp refactoring is complete and there will be CPU private @@ -2326,7 +2326,7 @@ static void pc_machine_class_init(ObjectClass *oc, void *data) mc->get_hotplug_handler = pc_get_hotpug_handler; mc->cpu_index_to_socket_id = pc_cpu_index_to_socket_id; mc->possible_cpu_arch_ids = pc_possible_cpu_arch_ids; - mc->query_hotpluggable_cpus = machine_query_hotpluggable_cpus; + mc->has_hotpluggable_cpus = true; mc->default_boot_order = "cad"; mc->hot_add_cpu = pc_hot_add_cpu; mc->block_default_type = IF_IDE; |