mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-04 08:13:54 -06:00
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
1 changed files with 2 additions and 1 deletions
|
@ -210,7 +210,8 @@ static ObjectClass *arm_cpu_class_by_name(const char *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 oc;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue