mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-03 15:53:54 -06:00
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>
This commit is contained in:
parent
edeeec9117
commit
a0628599fa
14 changed files with 46 additions and 44 deletions
|
@ -173,8 +173,8 @@ struct MachineClass {
|
|||
const char *deprecation_reason;
|
||||
|
||||
void (*init)(MachineState *state);
|
||||
void (*reset)(void);
|
||||
void (*hot_add_cpu)(const int64_t id, Error **errp);
|
||||
void (*reset)(MachineState *state);
|
||||
void (*hot_add_cpu)(MachineState *state, const int64_t id, Error **errp);
|
||||
int (*kvm_type)(MachineState *machine, const char *arg);
|
||||
|
||||
BlockInterfaceType block_default_type;
|
||||
|
|
|
@ -268,8 +268,9 @@ void smbios_set_cpuid(uint32_t version, uint32_t features);
|
|||
void smbios_set_defaults(const char *manufacturer, const char *product,
|
||||
const char *version, bool legacy_mode,
|
||||
bool uuid_encoded, SmbiosEntryPointType ep_type);
|
||||
uint8_t *smbios_get_table_legacy(size_t *length);
|
||||
void smbios_get_tables(const struct smbios_phys_mem_area *mem_array,
|
||||
uint8_t *smbios_get_table_legacy(MachineState *ms, size_t *length);
|
||||
void smbios_get_tables(MachineState *ms,
|
||||
const struct smbios_phys_mem_area *mem_array,
|
||||
const unsigned int mem_array_size,
|
||||
uint8_t **tables, size_t *tables_len,
|
||||
uint8_t **anchor, size_t *anchor_len);
|
||||
|
|
|
@ -189,7 +189,7 @@ void pc_register_ferr_irq(qemu_irq irq);
|
|||
void pc_acpi_smi_interrupt(void *opaque, int irq, int level);
|
||||
|
||||
void pc_cpus_init(PCMachineState *pcms);
|
||||
void pc_hot_add_cpu(const int64_t id, Error **errp);
|
||||
void pc_hot_add_cpu(MachineState *ms, const int64_t id, Error **errp);
|
||||
|
||||
void pc_guest_info_init(PCMachineState *pcms);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue