aboutsummaryrefslogtreecommitdiff
path: root/hw/i386/pc.c
diff options
context:
space:
mode:
authorEduardo Habkost <ehabkost@redhat.com>2015-12-11 16:42:32 -0200
committerMichael S. Tsirkin <mst@redhat.com>2016-02-06 20:44:10 +0200
commitdd4c2f01ab92ae0a158958a8fc61fcd09e34987a (patch)
treee06bde3c39a5045e1c4e52d0183b0ccf7d6bdfbc /hw/i386/pc.c
parentf264d360e0bebf4fae054e624bf7204788aff99d (diff)
pc: Move APIC and NUMA data from PcGuestInfo to PCMachineState
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com> Reviewed-by: Marcel Apfelbaum <marcel@redhat.com>
Diffstat (limited to 'hw/i386/pc.c')
-rw-r--r--hw/i386/pc.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/hw/i386/pc.c b/hw/i386/pc.c
index a47784a38e..66f7bb9bc0 100644
--- a/hw/i386/pc.c
+++ b/hw/i386/pc.c
@@ -1188,24 +1188,24 @@ PcGuestInfo *pc_guest_info_init(PCMachineState *pcms)
PcGuestInfo *guest_info = &pcms->acpi_guest_info;
int i, j;
- guest_info->apic_id_limit = pc_apic_id_limit(max_cpus);
- guest_info->apic_xrupt_override = kvm_allows_irq0_override();
- guest_info->numa_nodes = nb_numa_nodes;
- guest_info->node_mem = g_malloc0(guest_info->numa_nodes *
- sizeof *guest_info->node_mem);
+ pcms->apic_id_limit = pc_apic_id_limit(max_cpus);
+ pcms->apic_xrupt_override = kvm_allows_irq0_override();
+ pcms->numa_nodes = nb_numa_nodes;
+ pcms->node_mem = g_malloc0(pcms->numa_nodes *
+ sizeof *pcms->node_mem);
for (i = 0; i < nb_numa_nodes; i++) {
- guest_info->node_mem[i] = numa_info[i].node_mem;
+ pcms->node_mem[i] = numa_info[i].node_mem;
}
- guest_info->node_cpu = g_malloc0(guest_info->apic_id_limit *
- sizeof *guest_info->node_cpu);
+ pcms->node_cpu = g_malloc0(pcms->apic_id_limit *
+ sizeof *pcms->node_cpu);
for (i = 0; i < max_cpus; i++) {
unsigned int apic_id = x86_cpu_apic_id_from_index(i);
- assert(apic_id < guest_info->apic_id_limit);
+ assert(apic_id < pcms->apic_id_limit);
for (j = 0; j < nb_numa_nodes; j++) {
if (test_bit(i, numa_info[j].node_cpu)) {
- guest_info->node_cpu[apic_id] = j;
+ pcms->node_cpu[apic_id] = j;
break;
}
}