mirror of
https://github.com/mii443/qemu.git
synced 2025-12-17 01:28:52 +00:00
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>
This commit is contained in:
committed by
David Gibson
parent
f2d672c248
commit
c5514d0e4b
@@ -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);
|
||||
};
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user