All of lore.kernel.org
 help / color / mirror / Atom feed
* qemu-system-arm dies on introspection of ast2700-a1 and ast2700-a2
@ 2026-10-21 11:52 Markus Armbruster
  2026-10-21 13:16 ` Philippe Mathieu-Daudé
  2026-10-21 15:01 ` Alex Bennée
  0 siblings, 2 replies; 3+ messages in thread
From: Markus Armbruster @ 2026-10-21 11:52 UTC (permalink / raw)
  To: qemu-devel
  Cc: Cédric Le Goater, Peter Maydell, Jamin Lin, Kane Chen,
	qemu-arm, Philippe Mathieu-Daudé

Watch this:

    $ qemu-system-arm -S -nodefaults -display none -M none -qmp stdio
    {"QMP": {"version": {"qemu": {"micro": 50, "minor": 1, "major": 11}, "package": "v11.1.0-2545-g2d150b99ce"}, "capabilities": ["oob"]}}
    {"execute": "qmp_capabilities", "arguments": {"enable": ["oob"]}}
    {"return": {}}
    {"execute": "qom-list-properties", "arguments": {"typename": "ast2700-a1"}}
    qemu-system-arm: unknown type 'cortex-a35-arm-cpu'
    [Exit 1 ]

Same for ast2700-a2.

I found the folllowing in their .instance_init() method
aspeed_soc_ast2700_init():

    for (i = 0; i < sc->num_cpus; i++) {
        if (qtest_enabled() && !target_aarch64()) {
            /*
             * Introspection qtest just want to create this object
             * without realizing it. ARM_CPU_TYPE_NAME("cortex-a35")
             * is not available on 32-bit binary: skip it since we
             * won't even realize it.
             */
            continue;
        }
        object_initialize_child(obj, "cpu[*]", &a->cpu[i],
                                aspeed_soc_cpu_type(sc->valid_cpu_types));
    }

This seems to paper over the bug so make the tests pass.  That's wrong.

.instance_init() must not fail and must not exit(), regardless of
context.

object_initialize_child() exit()s when the type doesn't exist, because
&error_fatal gets passed to in type_get_or_load_by_name() in
object_initialize_child().

The narrow fix is to make type "cortex-a35-arm-cpu" exist, or to make
the two bad types "ast2700-a1" and "ast2700-a2" not exist.



^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2026-10-21 15:03 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-10-21 11:52 qemu-system-arm dies on introspection of ast2700-a1 and ast2700-a2 Markus Armbruster
2026-10-21 13:16 ` Philippe Mathieu-Daudé
2026-10-21 15:01 ` Alex Bennée

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.