diff options
author | Like Xu | 2019-05-18 22:54:20 +0200 |
---|---|---|
committer | Eduardo Habkost | 2019-07-05 22:07:36 +0200 |
commit | a0628599fa72524a1f59bbaa7410e6825a8feb3f (patch) | |
tree | 217e3b8e376d07c8f4078b926face539eb8ba6c8 /hw/core | |
parent | hw/boards: Add struct CpuTopology to MachineState (diff) | |
download | qemu-a0628599fa72524a1f59bbaa7410e6825a8feb3f.tar.gz qemu-a0628599fa72524a1f59bbaa7410e6825a8feb3f.tar.xz qemu-a0628599fa72524a1f59bbaa7410e6825a8feb3f.zip |
machine: Refactor smp-related call chains to pass MachineState
To get rid of the global smp_* variables we're currently using, it's recommended
to pass MachineState in the list of incoming parameters for functions that use
global smp variables, thus some redundant parameters are dropped. It's applied
for legacy smbios_*(), *_machine_reset(), hot_add_cpu() and mips *_create_cpu().
Suggested-by: Igor Mammedov <imammedo@redhat.com>
Signed-off-by: Like Xu <like.xu@linux.intel.com>
Reviewed-by: Alistair Francis <alistair.francis@wdc.com>
Message-Id: <20190518205428.90532-3-like.xu@linux.intel.com>
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
Diffstat (limited to 'hw/core')
-rw-r--r-- | hw/core/machine-qmp-cmds.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/hw/core/machine-qmp-cmds.c b/hw/core/machine-qmp-cmds.c index 1e08252af7..14dbad1d6e 100644 --- a/hw/core/machine-qmp-cmds.c +++ b/hw/core/machine-qmp-cmds.c @@ -264,7 +264,7 @@ void qmp_cpu_add(int64_t id, Error **errp) mc = MACHINE_GET_CLASS(current_machine); if (mc->hot_add_cpu) { - mc->hot_add_cpu(id, errp); + mc->hot_add_cpu(current_machine, id, errp); } else { error_setg(errp, "Not supported"); } |