mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-04 08:13:54 -06:00
hw/i386/acpi-build: Get NUMA information from struct NumaState
Since commitsaa57020774
("numa: move numa global variable nb_numa_nodes into MachineState") and7e721e7b10
("numa: move numa global variable numa_info into MachineState"), we can get NUMA information completely from MachineState::numa_state. Remove PCMachineState::numa_nodes and PCMachineState::node_mem, since they are just copied from MachineState::numa_state. Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com> Signed-off-by: Jingqi Liu <jingqi.liu@intel.com> Message-Id: <20210823011254.28506-1-jingqi.liu@intel.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
This commit is contained in:
parent
ae4003738f
commit
e77af21a7a
3 changed files with 7 additions and 18 deletions
|
@ -802,18 +802,9 @@ void pc_machine_done(Notifier *notifier, void *data)
|
|||
|
||||
void pc_guest_info_init(PCMachineState *pcms)
|
||||
{
|
||||
int i;
|
||||
MachineState *ms = MACHINE(pcms);
|
||||
X86MachineState *x86ms = X86_MACHINE(pcms);
|
||||
|
||||
x86ms->apic_xrupt_override = true;
|
||||
pcms->numa_nodes = ms->numa_state->num_nodes;
|
||||
pcms->node_mem = g_malloc0(pcms->numa_nodes *
|
||||
sizeof *pcms->node_mem);
|
||||
for (i = 0; i < ms->numa_state->num_nodes; i++) {
|
||||
pcms->node_mem[i] = ms->numa_state->nodes[i].node_mem;
|
||||
}
|
||||
|
||||
pcms->machine_done.notify = pc_machine_done;
|
||||
qemu_add_machine_init_done_notifier(&pcms->machine_done);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue