mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-07 09:43:56 -06:00
hw/i386: Replace global smp variables with machine smp properties
The global smp variables in i386 are replaced with smp machine properties. To avoid calling qdev_get_machine() as much as possible, some related funtions for acpi data generations are refactored. No semantic changes. A local variable of the same name would be introduced in the declaration phase if it's used widely in the context OR replace it on the spot if it's only used once. No semantic changes. Signed-off-by: Like Xu <like.xu@linux.intel.com> Message-Id: <20190518205428.90532-8-like.xu@linux.intel.com> Reviewed-by: Eduardo Habkost <ehabkost@redhat.com> Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
This commit is contained in:
parent
ae71ed8610
commit
0e11fc6955
5 changed files with 31 additions and 13 deletions
|
@ -756,6 +756,8 @@ static ioreq_t *cpu_get_ioreq_from_shared_memory(XenIOState *state, int vcpu)
|
|||
/* retval--the number of ioreq packet */
|
||||
static ioreq_t *cpu_get_ioreq(XenIOState *state)
|
||||
{
|
||||
MachineState *ms = MACHINE(qdev_get_machine());
|
||||
unsigned int max_cpus = ms->smp.max_cpus;
|
||||
int i;
|
||||
evtchn_port_t port;
|
||||
|
||||
|
@ -1383,6 +1385,8 @@ static int xen_map_ioreq_server(XenIOState *state)
|
|||
|
||||
void xen_hvm_init(PCMachineState *pcms, MemoryRegion **ram_memory)
|
||||
{
|
||||
MachineState *ms = MACHINE(pcms);
|
||||
unsigned int max_cpus = ms->smp.max_cpus;
|
||||
int i, rc;
|
||||
xen_pfn_t ioreq_pfn;
|
||||
XenIOState *state;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue