aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--hw/s390x/s390-virtio-ccw.c8
-rw-r--r--numa.c2
2 files changed, 6 insertions, 4 deletions
diff --git a/hw/s390x/s390-virtio-ccw.c b/hw/s390x/s390-virtio-ccw.c
index 8726b4c..f822704 100644
--- a/hw/s390x/s390-virtio-ccw.c
+++ b/hw/s390x/s390-virtio-ccw.c
@@ -390,12 +390,14 @@ static void s390_machine_device_unplug_request(HotplugHandler *hotplug_dev,
}
}
-static CpuInstanceProperties s390_cpu_index_to_props(MachineState *machine,
+static CpuInstanceProperties s390_cpu_index_to_props(MachineState *ms,
unsigned cpu_index)
{
- g_assert(machine->possible_cpus && cpu_index < machine->possible_cpus->len);
+ MachineClass *mc = MACHINE_GET_CLASS(ms);
+ const CPUArchIdList *possible_cpus = mc->possible_cpu_arch_ids(ms);
- return machine->possible_cpus->cpus[cpu_index].props;
+ assert(cpu_index < possible_cpus->len);
+ return possible_cpus->cpus[cpu_index].props;
}
static const CPUArchIdList *s390_possible_cpu_arch_ids(MachineState *ms)
diff --git a/numa.c b/numa.c
index 5d7529c..398e2c9 100644
--- a/numa.c
+++ b/numa.c
@@ -80,7 +80,7 @@ static void parse_numa_node(MachineState *ms, NumaNodeOptions *node,
return;
}
- if (!mc->cpu_index_to_instance_props) {
+ if (!mc->cpu_index_to_instance_props || !mc->get_default_cpu_node_id) {
error_report("NUMA is not supported by this machine-type");
exit(1);
}