[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v2 4/6] object_initialize: try module load
From: |
Gerd Hoffmann |
Subject: |
[PATCH v2 4/6] object_initialize: try module load |
Date: |
Mon, 14 Sep 2020 15:42:22 +0200 |
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
- [PATCH v2 0/6] meson: fix device module builds, Gerd Hoffmann, 2020/09/14
- [PATCH v2 2/6] meson: fix module config, Gerd Hoffmann, 2020/09/14
- [PATCH v2 6/6] virtio-gpu: build modular, Gerd Hoffmann, 2020/09/14
- [PATCH v2 3/6] meson: remove duplicate qxl sources, Gerd Hoffmann, 2020/09/14
- [PATCH v2 1/6] meson: fix qxl dependencies, Gerd Hoffmann, 2020/09/14
- [PATCH v2 4/6] object_initialize: try module load,
Gerd Hoffmann <=
- [PATCH v2 5/6] virtio-gpu: make virtio_gpu_ops static, Gerd Hoffmann, 2020/09/14