diff --git a/bundles.tar.xz b/bundles.tar.xz index e1d6ee43..c2229c09 100644 --- a/bundles.tar.xz +++ b/bundles.tar.xz @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:336893b5cf72b73b6cca9f9b6764b8efeaa388dbd77b72c46105e58454255a76 -size 43256 +oid sha256:f1253b975d29c6b84bbf3f611dbd98fcc2c4193fe76fed6db85dbcaf8b2bc696 +size 43464 diff --git a/module-for-virtio-gpu-pre-load-module-to.patch b/module-for-virtio-gpu-pre-load-module-to.patch index 9f5abca7..e50b2e2a 100644 --- a/module-for-virtio-gpu-pre-load-module-to.patch +++ b/module-for-virtio-gpu-pre-load-module-to.patch @@ -4,16 +4,17 @@ Subject: module: for virtio-gpu, pre-load module to avoid abort on missing module If the hw-display-virtio-gpu module is not loadable when the virtio-gpu -device is on the command line or being added in monitor, qemu will call -abort. We can fail gracefully by doing the module load in a context -which is set up to handle errors properly. (bsc#1181103) +device is referenced either on the command line or the monitor, qemu +will call abort. We can fail gracefully by moving the attempted module +load to a context better situated to handle errors properly. (bsc#1181103) Signed-off-by: Bruce Rogers --- include/qemu/module.h | 1 + qom/object.c | 12 ++++++++++++ + qom/qom-qmp-cmds.c | 17 +++++++++++++++++ softmmu/qdev-monitor.c | 15 +++++++++++++++ - 3 files changed, 28 insertions(+) + 4 files changed, 45 insertions(+) diff --git a/include/qemu/module.h b/include/qemu/module.h index 944d403cbd1535cc121af76a94f2..4b42dd285eeac1ba12e5c9e18ac0 100644 @@ -49,6 +50,34 @@ index 10653552334549241cd5672d7a02..6f301fec34d103b0b07bc41d107c 100644 void object_initialize(void *data, size_t size, const char *typename) { TypeImpl *type = type_get_by_name(typename); +diff --git a/qom/qom-qmp-cmds.c b/qom/qom-qmp-cmds.c +index 310ab2d0481d1517b0432be23256..cf130dc875bb6a7921fd7fb5af26 100644 +--- a/qom/qom-qmp-cmds.c ++++ b/qom/qom-qmp-cmds.c +@@ -131,6 +131,23 @@ ObjectPropertyInfoList *qmp_device_list_properties(const char *typename, + ObjectPropertyIterator iter; + ObjectPropertyInfoList *prop_list = NULL; + ++#ifdef CONFIG_MODULES ++ if (!strcmp(typename, "virtio-gpu-pci") || !strcmp(typename, "virtio-gpu-ccw")) { ++ if (module_load_check("virtio-gpu-device")) { ++ ObjectPropertyInfo *info; ++ info = g_new0(ObjectPropertyInfo, 1); ++ info->name = g_strdup("dummy"); ++ info->type = g_strdup("dummy"); ++ info->has_description = false; ++ info->description = NULL; ++ info->default_value = 0; ++ info->has_default_value = 0; ++ QAPI_LIST_PREPEND(prop_list, info); ++ return prop_list; ++ } ++ } ++#endif ++ + klass = module_object_class_by_name(typename); + if (klass == NULL) { + error_set(errp, ERROR_CLASS_DEVICE_NOT_FOUND, diff --git a/softmmu/qdev-monitor.c b/softmmu/qdev-monitor.c index bf79d0bbcd986320eb609f37253e..564dfaeeda9c3ae9dbf1afa97825 100644 --- a/softmmu/qdev-monitor.c diff --git a/qemu.changes b/qemu.changes index a2fd1767..eb58f1f7 100644 --- a/qemu.changes +++ b/qemu.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Fri Jan 29 14:41:19 UTC 2021 - Bruce Rogers + +- Additional tweaks to ensure libvirt runs ok when + qemu-hw-display-virtio-gpu package is not installed + ------------------------------------------------------------------- Fri Jan 29 02:47:35 UTC 2021 - Lin Ma diff --git a/qom-handle-case-of-chardev-spice-module-.patch b/qom-handle-case-of-chardev-spice-module-.patch index b4ed992e..2fc61da1 100644 --- a/qom-handle-case-of-chardev-spice-module-.patch +++ b/qom-handle-case-of-chardev-spice-module-.patch @@ -6,7 +6,7 @@ When qemu is built with modules, but a given module doesn't load qemu should handle that gracefully. When chardev-spice.so isn't able to be loaded and qemu is invoked with -display spice-app, qemu will reach an abort call. Explicitly detect these conditions -and error out in a normal way before we reach that code. +and error out in a normal way before we reach the abort. Signed-off-by: Bruce Rogers ---