aboutsummaryrefslogtreecommitdiff
path: root/hw/core
diff options
context:
space:
mode:
Diffstat (limited to 'hw/core')
-rw-r--r--hw/core/machine.c16
1 files changed, 10 insertions, 6 deletions
diff --git a/hw/core/machine.c b/hw/core/machine.c
index c1434e6a69..2e7e9778cd 100644
--- a/hw/core/machine.c
+++ b/hw/core/machine.c
@@ -721,19 +721,23 @@ static void machine_numa_finish_init(MachineState *machine)
const CPUArchId *cpu_slot = &possible_cpus->cpus[i];
if (!cpu_slot->props.has_node_id) {
- if (default_mapping) {
- /* fetch default mapping from board and enable it */
- CpuInstanceProperties props = cpu_slot->props;
- props.has_node_id = true;
- machine_set_cpu_numa_node(machine, &props, &error_fatal);
- } else {
+ /* fetch default mapping from board and enable it */
+ CpuInstanceProperties props = cpu_slot->props;
+
+ if (!default_mapping) {
/* record slots with not set mapping,
* TODO: make it hard error in future */
char *cpu_str = cpu_slot_to_string(cpu_slot);
g_string_append_printf(s, "%sCPU %d [%s]",
s->len ? ", " : "", i, cpu_str);
g_free(cpu_str);
+
+ /* non mapped cpus used to fallback to node 0 */
+ props.node_id = 0;
}
+
+ props.has_node_id = true;
+ machine_set_cpu_numa_node(machine, &props, &error_fatal);
}
}
if (s->len && !qtest_enabled()) {