From: Gerd Hoffmann Date: Mon, 14 Sep 2020 13:42:22 +0000 (+0200) Subject: object_initialize: try module load X-Git-Tag: v5.2.0-rc0~112^2~2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=64f7aece8ea0745c0990f7ba20189341e70f123c;p=thirdparty%2Fqemu.git object_initialize: try module load Needed to allow virtio-gpu-pci initialize the virtio-gpu-device child device. Signed-off-by: Gerd Hoffmann Message-id: 20200914134224.29769-5-kraxel@redhat.com --- diff --git a/qom/object.c b/qom/object.c index b1822a2ef4b..387efb25ebe 100644 --- a/qom/object.c +++ b/qom/object.c @@ -518,6 +518,12 @@ void object_initialize(void *data, size_t size, const char *typename) { TypeImpl *type = type_get_by_name(typename); +#ifdef CONFIG_MODULES + if (!type) { + module_load_qom_one(typename); + type = type_get_by_name(typename); + } +#endif if (!type) { error_report("missing object type '%s'", typename); abort();