mirror of https://github.com/xqemu/xqemu.git
target-arm: Catch attempt to instantiate abstract type in cpu_init()
This fixes -cpu arm-cpu asserting. Cc: qemu-stable@nongnu.org Acked-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Andreas Färber <afaerber@suse.de>
This commit is contained in:
parent
a120c28708
commit
245fb54db5
|
@ -210,7 +210,8 @@ static ObjectClass *arm_cpu_class_by_name(const char *cpu_model)
|
||||||
}
|
}
|
||||||
|
|
||||||
oc = object_class_by_name(cpu_model);
|
oc = object_class_by_name(cpu_model);
|
||||||
if (!oc || !object_class_dynamic_cast(oc, TYPE_ARM_CPU)) {
|
if (!oc || !object_class_dynamic_cast(oc, TYPE_ARM_CPU) ||
|
||||||
|
object_class_is_abstract(oc)) {
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
return oc;
|
return oc;
|
||||||
|
|
Loading…
Reference in New Issue