Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package qemu for openSUSE:Factory checked in at 2021-01-26 14:44:51 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/qemu (Old) and /work/SRC/openSUSE:Factory/.qemu.new.28504 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "qemu" Tue Jan 26 14:44:51 2021 rev:192 rq:866170 version:5.2.0 Changes: -------- --- /work/SRC/openSUSE:Factory/qemu/qemu.changes 2021-01-20 18:22:59.279288917 +0100 +++ /work/SRC/openSUSE:Factory/.qemu.new.28504/qemu.changes 2021-01-26 14:44:52.395266688 +0100 @@ -1,0 +2,16 @@ +Fri Jan 22 17:24:07 UTC 2021 - Bruce Rogers <[email protected]> + +- Fix issue of qemu crashing (abort called) when virtio-gpu device + is asked for and the qemu-hw-display-virtio-gpu package isn't + installed. (bsc#1181103) + module-for-virtio-gpu-pre-load-module-to.patch +- Add additional inter-module package dependencies, to reflect the + current module dependencies (see qemu source file: util/module.c) +- As of v3.1.0 virt-manager, new VM's are created by default with + audio/sound enabled, so it's time to reflect the need, at least + in the spice case, by having spice-audio available when spice in + general is used (boo#1180210 boo#1181132) +- Further refine package Recommends/Suggests based on architecture +- Remove no longer needed dependency on pwdutils (boo#1181235) + +------------------------------------------------------------------- New: ---- module-for-virtio-gpu-pre-load-module-to.patch ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ qemu.spec ++++++ --- /var/tmp/diff_new_pack.CpJTKl/_old 2021-01-26 14:44:54.535270001 +0100 +++ /var/tmp/diff_new_pack.CpJTKl/_new 2021-01-26 14:44:54.539270007 +0100 @@ -181,6 +181,7 @@ Patch00047: roms-Makefile-add-cross-file-to-qboot-me.patch Patch00048: usb-Help-compiler-out-to-avoid-a-warning.patch Patch00049: iotests-Fix-_send_qemu_cmd-with-bash-5.1.patch +Patch00050: module-for-virtio-gpu-pre-load-module-to.patch # Patches applied in roms/seabios/: Patch01000: seabios-use-python2-explicitly-as-needed.patch Patch01001: seabios-switch-to-python3-as-needed.patch @@ -313,7 +314,6 @@ BuildRequires: nasm %endif BuildRequires: pkgconfig -BuildRequires: pwdutils BuildRequires: python3-Sphinx BuildRequires: rdma-core-devel BuildRequires: snappy-devel @@ -350,21 +350,24 @@ Recommends: kvm_stat %endif Recommends: qemu-block-curl -Recommends: qemu-chardev-spice -Recommends: qemu-hw-display-qxl -Recommends: qemu-hw-display-virtio-gpu -Recommends: qemu-hw-display-virtio-gpu-pci -Recommends: qemu-hw-display-virtio-vga -Recommends: qemu-hw-usb-redirect Recommends: qemu-hw-usb-smartcard Recommends: qemu-ksm = %{qemuver} Recommends: qemu-tools -Recommends: qemu-ui-opengl Recommends: qemu-ui-curses +%ifnarch s390x +Recommends: qemu-hw-display-qxl +Recommends: qemu-hw-display-virtio-vga +Recommends: qemu-hw-usb-redirect Recommends: qemu-ui-gtk -Recommends: qemu-ui-spice-core Recommends: qemu-ui-spice-app +%endif +%ifarch %{ix86} x86_64 +Recommends: qemu-hw-display-virtio-gpu +Recommends: qemu-hw-display-virtio-gpu-pci Recommends: qemu-x86 +%else +Suggests: qemu-x86 +%endif %ifarch ppc ppc64 ppc64le Recommends: qemu-ppc %else @@ -562,6 +565,7 @@ Version: %{qemuver} Release: 0 Provides: %name:%_datadir/%name/forsplits/05 +Requires: qemu-ui-spice-core %{qemu_module_conflicts} %description audio-spice @@ -661,6 +665,7 @@ Version: %{qemuver} Release: 0 Provides: %name:%_datadir/%name/forsplits/08 +Requires: qemu-ui-spice-core %{qemu_module_conflicts} %description chardev-spice @@ -672,6 +677,7 @@ Version: %{qemuver} Release: 0 Provides: %name:%_datadir/%name/forsplits/01 +Requires: qemu-ui-spice-core %{qemu_module_conflicts} %description hw-display-qxl @@ -747,6 +753,7 @@ Group: System/Emulators/PC Version: %{qemuver} Release: 0 +Requires: qemu-ui-opengl %{qemu_module_conflicts} %description ui-gtk @@ -763,26 +770,31 @@ %description ui-opengl This package contains a module for doing OpenGL based UI for QEMU. -%package ui-spice-core -Summary: Core Spice support for QEMU +%package ui-spice-app +Summary: Spice UI support for QEMU Group: System/Emulators/PC Version: %{qemuver} Release: 0 -Provides: %name:%_datadir/%name/forsplits/09 +Requires: qemu-chardev-spice +Requires: qemu-ui-spice-core %{qemu_module_conflicts} -%description ui-spice-core -This package contains a module with core Spice support for QEMU. +%description ui-spice-app +This package contains a module for doing Spice based UI for QEMU. -%package ui-spice-app -Summary: Spice UI support for QEMU +%package ui-spice-core +Summary: Core Spice support for QEMU Group: System/Emulators/PC Version: %{qemuver} Release: 0 +Provides: %name:%_datadir/%name/forsplits/09 +Requires: qemu-ui-opengl +# This next Requires is only since virt-manager expects audio support +Requires: qemu-audio-spice %{qemu_module_conflicts} -%description ui-spice-app -This package contains a module for doing Spice based UI for QEMU. +%description ui-spice-core +This package contains a module with core Spice support for QEMU. %package vhost-user-gpu Summary: Vhost user mode virtio-gpu 2D/3D rendering backend for QEMU @@ -1039,6 +1051,7 @@ %patch00048 -p1 %endif %patch00049 -p1 +%patch00050 -p1 %patch01000 -p1 %patch01001 -p1 %patch01002 -p1 ++++++ bundles.tar.xz ++++++ Binary files old/553032db17440f8de011390e5a1cfddd13751b0b.bundle and new/553032db17440f8de011390e5a1cfddd13751b0b.bundle differ ++++++ module-for-virtio-gpu-pre-load-module-to.patch ++++++ From: Bruce Rogers <[email protected]> Date: Thu, 21 Jan 2021 16:34:32 -0700 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 commandline 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) Signed-off-by: Bruce Rogers <[email protected]> --- include/qemu/module.h | 1 + qom/object.c | 12 ++++++++++++ softmmu/qdev-monitor.c | 8 ++++++++ 3 files changed, 21 insertions(+) diff --git a/include/qemu/module.h b/include/qemu/module.h index 944d403cbd1535cc121af76a94f2..4b42dd285eeac1ba12e5c9e18ac0 100644 --- a/include/qemu/module.h +++ b/include/qemu/module.h @@ -72,5 +72,6 @@ void module_call_init(module_init_type type); bool module_load_one(const char *prefix, const char *lib_name, bool mayfail); void module_load_qom_one(const char *type); void module_load_qom_all(void); +int module_load_check(const char *name); #endif diff --git a/qom/object.c b/qom/object.c index 10653552334549241cd5672d7a02..6f301fec34d103b0b07bc41d107c 100644 --- a/qom/object.c +++ b/qom/object.c @@ -516,6 +516,18 @@ static void object_initialize_with_type(Object *obj, size_t size, TypeImpl *type object_post_init_with_type(obj, type); } +#ifdef CONFIG_MODULES +int module_load_check(const char *name) +{ + TypeImpl *type = type_get_by_name(name); + if (!type) { + module_load_qom_one(name); + type = type_get_by_name(name); + } + return type == NULL; +} +#endif + void object_initialize(void *data, size_t size, const char *typename) { TypeImpl *type = type_get_by_name(typename); diff --git a/softmmu/qdev-monitor.c b/softmmu/qdev-monitor.c index bf79d0bbcd986320eb609f37253e..7f6ad469638ba55a5bb8bfd02fe3 100644 --- a/softmmu/qdev-monitor.c +++ b/softmmu/qdev-monitor.c @@ -650,6 +650,14 @@ DeviceState *qdev_device_add(QemuOpts *opts, Error **errp) return NULL; } +#ifdef CONFIG_MODULES + if (!strcmp(driver, "virtio-gpu-pci") || !strcmp(driver, "virtio-gpu-ccw")) { + if (module_load_check("virtio-gpu-device")) { + error_setg(errp, "loadable module for %s not available!", driver); + return NULL; + } + } +#endif /* create device */ dev = qdev_new(driver); ++++++ qemu.spec.in ++++++ --- /var/tmp/diff_new_pack.CpJTKl/_old 2021-01-26 14:44:54.983270694 +0100 +++ /var/tmp/diff_new_pack.CpJTKl/_new 2021-01-26 14:44:54.987270700 +0100 @@ -245,7 +245,6 @@ BuildRequires: nasm %endif BuildRequires: pkgconfig -BuildRequires: pwdutils BuildRequires: python3-Sphinx BuildRequires: rdma-core-devel BuildRequires: snappy-devel @@ -282,21 +281,24 @@ Recommends: kvm_stat %endif Recommends: qemu-block-curl -Recommends: qemu-chardev-spice -Recommends: qemu-hw-display-qxl -Recommends: qemu-hw-display-virtio-gpu -Recommends: qemu-hw-display-virtio-gpu-pci -Recommends: qemu-hw-display-virtio-vga -Recommends: qemu-hw-usb-redirect Recommends: qemu-hw-usb-smartcard Recommends: qemu-ksm = %{qemuver} Recommends: qemu-tools -Recommends: qemu-ui-opengl Recommends: qemu-ui-curses +%ifnarch s390x +Recommends: qemu-hw-display-qxl +Recommends: qemu-hw-display-virtio-vga +Recommends: qemu-hw-usb-redirect Recommends: qemu-ui-gtk -Recommends: qemu-ui-spice-core Recommends: qemu-ui-spice-app +%endif +%ifarch %{ix86} x86_64 +Recommends: qemu-hw-display-virtio-gpu +Recommends: qemu-hw-display-virtio-gpu-pci Recommends: qemu-x86 +%else +Suggests: qemu-x86 +%endif %ifarch ppc ppc64 ppc64le Recommends: qemu-ppc %else @@ -440,9 +442,9 @@ %description kvm %{generic_qemu_description} -This package provides a symlink to the main QEMU emulator used for KVM -virtualization. The symlink is named qemu-kvm, which causes the QEMU program -to enable the KVM accelerator, due to the name reference ending with 'kvm'. +This package provides a symlink to the main QEMU emulator used for KVM +virtualization. The symlink is named qemu-kvm, which causes the QEMU program +to enable the KVM accelerator, due to the name reference ending with 'kvm'. This package is an artifact of the early origins of QEMU, and is deprecated. %endif @@ -494,6 +496,7 @@ Version: %{qemuver} Release: 0 Provides: %name:%_datadir/%name/forsplits/05 +Requires: qemu-ui-spice-core %{qemu_module_conflicts} %description audio-spice @@ -593,6 +596,7 @@ Version: %{qemuver} Release: 0 Provides: %name:%_datadir/%name/forsplits/08 +Requires: qemu-ui-spice-core %{qemu_module_conflicts} %description chardev-spice @@ -604,6 +608,7 @@ Version: %{qemuver} Release: 0 Provides: %name:%_datadir/%name/forsplits/01 +Requires: qemu-ui-spice-core %{qemu_module_conflicts} %description hw-display-qxl @@ -679,6 +684,7 @@ Group: System/Emulators/PC Version: %{qemuver} Release: 0 +Requires: qemu-ui-opengl %{qemu_module_conflicts} %description ui-gtk @@ -695,26 +701,31 @@ %description ui-opengl This package contains a module for doing OpenGL based UI for QEMU. -%package ui-spice-core -Summary: Core Spice support for QEMU +%package ui-spice-app +Summary: Spice UI support for QEMU Group: System/Emulators/PC Version: %{qemuver} Release: 0 -Provides: %name:%_datadir/%name/forsplits/09 +Requires: qemu-chardev-spice +Requires: qemu-ui-spice-core %{qemu_module_conflicts} -%description ui-spice-core -This package contains a module with core Spice support for QEMU. +%description ui-spice-app +This package contains a module for doing Spice based UI for QEMU. -%package ui-spice-app -Summary: Spice UI support for QEMU +%package ui-spice-core +Summary: Core Spice support for QEMU Group: System/Emulators/PC Version: %{qemuver} Release: 0 +Provides: %name:%_datadir/%name/forsplits/09 +Requires: qemu-ui-opengl +# This next Requires is only since virt-manager expects audio support +Requires: qemu-audio-spice %{qemu_module_conflicts} -%description ui-spice-app -This package contains a module for doing Spice based UI for QEMU. +%description ui-spice-core +This package contains a module with core Spice support for QEMU. %package vhost-user-gpu Summary: Vhost user mode virtio-gpu 2D/3D rendering backend for QEMU
