summaryrefslogtreecommitdiffstats
path: root/hw/acpi/cpu.c
diff options
context:
space:
mode:
authorIgor Mammedov2017-05-10 13:29:52 +0200
committerEduardo Habkost2017-05-11 21:08:49 +0200
commitea2650724ceb15903eb25473252047784fae5672 (patch)
tree2a5a23ab49edbadb18b52f058003a7ef2c713d87 /hw/acpi/cpu.c
parentnuma: do default mapping based on possible_cpus instead of node_cpu bitmaps (diff)
downloadqemu-ea2650724ceb15903eb25473252047784fae5672.tar.gz
qemu-ea2650724ceb15903eb25473252047784fae5672.tar.xz
qemu-ea2650724ceb15903eb25473252047784fae5672.zip
pc: get numa node mapping from possible_cpus instead of numa_get_node_for_cpu()
Signed-off-by: Igor Mammedov <imammedo@redhat.com> Reviewed-by: Andrew Jones <drjones@redhat.com> Message-Id: <1494415802-227633-9-git-send-email-imammedo@redhat.com> Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
Diffstat (limited to 'hw/acpi/cpu.c')
-rw-r--r--hw/acpi/cpu.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/hw/acpi/cpu.c b/hw/acpi/cpu.c
index 8c719d3f9d..a233fe17cf 100644
--- a/hw/acpi/cpu.c
+++ b/hw/acpi/cpu.c
@@ -503,7 +503,6 @@ void build_cpus_aml(Aml *table, MachineState *machine, CPUHotplugFeatures opts,
/* build Processor object for each processor */
for (i = 0; i < arch_ids->len; i++) {
- int j;
Aml *dev;
Aml *uid = aml_int(i);
GArray *madt_buf = g_array_new(0, 1, 1);
@@ -557,9 +556,9 @@ void build_cpus_aml(Aml *table, MachineState *machine, CPUHotplugFeatures opts,
* as a result _PXM is required for all CPUs which might
* be hot-plugged. For simplicity, add it for all CPUs.
*/
- j = numa_get_node_for_cpu(i);
- if (j < nb_numa_nodes) {
- aml_append(dev, aml_name_decl("_PXM", aml_int(j)));
+ if (arch_ids->cpus[i].props.has_node_id) {
+ aml_append(dev, aml_name_decl("_PXM",
+ aml_int(arch_ids->cpus[i].props.node_id)));
}
aml_append(cpus_dev, dev);