diff --git a/target/s390x/cpu.c b/target/s390x/cpu.c index 5724dffb88..34538c3ab9 100644 --- a/target/s390x/cpu.c +++ b/target/s390x/cpu.c @@ -199,6 +199,7 @@ static void s390_cpu_realizefn(DeviceState *dev, Error **errp) #else /* implicitly set for linux-user only */ cpu->env.core_id = scc->next_core_id; + scc->next_core_id++; #endif if (cpu_exists(cpu->env.core_id)) { @@ -206,12 +207,6 @@ static void s390_cpu_realizefn(DeviceState *dev, Error **errp) ", it already exists", cpu->env.core_id); goto out; } - if (cpu->env.core_id != scc->next_core_id) { - error_setg(&err, "Unable to add CPU with core-id: %" PRIu32 - ", the next available core-id is %" PRIu32, cpu->env.core_id, - scc->next_core_id); - goto out; - } /* sync cs->cpu_index and env->core_id. The latter is needed for TCG. */ cs->cpu_index = env->core_id; @@ -219,7 +214,6 @@ static void s390_cpu_realizefn(DeviceState *dev, Error **errp) if (err != NULL) { goto out; } - scc->next_core_id++; #if !defined(CONFIG_USER_ONLY) qemu_register_reset(s390_cpu_machine_reset_cb, cpu);