From: Gerd Hoffmann <kraxel@redhat.com>
To: qemu-devel@nongnu.org
Cc: "Paolo Bonzini" <pbonzini@redhat.com>,
"Daniel P. Berrangé" <berrange@redhat.com>,
"Gerd Hoffmann" <kraxel@redhat.com>,
"Eduardo Habkost" <ehabkost@redhat.com>,
"Michael S. Tsirkin" <mst@redhat.com>
Subject: [PATCH v2 4/6] object_initialize: try module load
Date: Mon, 14 Sep 2020 15:42:22 +0200 [thread overview]
Message-ID: <20200914134224.29769-5-kraxel@redhat.com> (raw)
In-Reply-To: <20200914134224.29769-1-kraxel@redhat.com>
Needed to allow virtio-gpu-pci initialize the
virtio-gpu-device child device.
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
---
qom/object.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/qom/object.c b/qom/object.c
index b1822a2ef4be..387efb25ebe9 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();
--
2.27.0
next prev parent reply other threads:[~2020-09-14 13:43 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-09-14 13:42 [PATCH v2 0/6] meson: fix device module builds Gerd Hoffmann
2020-09-14 13:42 ` [PATCH v2 1/6] meson: fix qxl dependencies Gerd Hoffmann
2020-09-14 13:42 ` [PATCH v2 2/6] meson: fix module config Gerd Hoffmann
2020-09-14 13:42 ` [PATCH v2 3/6] meson: remove duplicate qxl sources Gerd Hoffmann
2020-09-14 13:42 ` Gerd Hoffmann [this message]
2020-09-14 13:42 ` [PATCH v2 5/6] virtio-gpu: make virtio_gpu_ops static Gerd Hoffmann
2020-09-14 13:42 ` [PATCH v2 6/6] virtio-gpu: build modular Gerd Hoffmann
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200914134224.29769-5-kraxel@redhat.com \
--to=kraxel@redhat.com \
--cc=berrange@redhat.com \
--cc=ehabkost@redhat.com \
--cc=mst@redhat.com \
--cc=pbonzini@redhat.com \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).