Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package xen for openSUSE:Factory checked in at 2022-08-30 14:48:41 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/xen (Old) and /work/SRC/openSUSE:Factory/.xen.new.2083 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "xen" Tue Aug 30 14:48:41 2022 rev:321 rq:1000083 version:4.16.2_04 Changes: -------- --- /work/SRC/openSUSE:Factory/xen/xen.changes 2022-08-24 15:10:20.520438132 +0200 +++ /work/SRC/openSUSE:Factory/.xen.new.2083/xen.changes 2022-08-30 14:48:53.788031084 +0200 @@ -1,0 +2,12 @@ +Mon Aug 29 10:24:31 MDT 2022 - carn...@suse.com + +- bsc#1201994 - Xen DomU unable to emulate audio device + 62fde97e-tools-libxl-Replace-deprecated-soundhw-on-QEMU-command-line.patch + +------------------------------------------------------------------- +Tue Aug 23 08:52:05 MDT 2022 - carn...@suse.com + +- Things are compiling fine now with gcc12. + Drop gcc12-fixes.patch + +------------------------------------------------------------------- Old: ---- gcc12-fixes.patch New: ---- 62fde97e-tools-libxl-Replace-deprecated-soundhw-on-QEMU-command-line.patch ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ xen.spec ++++++ --- /var/tmp/diff_new_pack.nuVQB4/_old 2022-08-30 14:48:55.300034942 +0200 +++ /var/tmp/diff_new_pack.nuVQB4/_new 2022-08-30 14:48:55.304034953 +0200 @@ -119,7 +119,7 @@ %endif Provides: installhint(reboot-needed) -Version: 4.16.2_02 +Version: 4.16.2_04 Release: 0 Summary: Xen Virtualization: Hypervisor (aka VMM aka Microkernel) License: GPL-2.0-only @@ -155,6 +155,7 @@ # For xen-libs Source99: baselibs.conf # Upstream patches +Patch1: 62fde97e-tools-libxl-Replace-deprecated-soundhw-on-QEMU-command-line.patch # EMBARGOED security fixes # libxc Patch301: libxc-bitmap-long.patch @@ -228,7 +229,6 @@ Patch621: xen.build-compare.doc_html.patch # Build patches Patch99996: xen.stubdom.newlib.patch -Patch99997: gcc12-fixes.patch URL: http://www.cl.cam.ac.uk/Research/SRG/netos/xen/ BuildRoot: %{_tmppath}/%{name}-%{version}-build %define pyver %(python3 -c "import sys; print(sys.version.rpartition('.')[0])") ++++++ 62fde97e-tools-libxl-Replace-deprecated-soundhw-on-QEMU-command-line.patch ++++++ Subject: tools/libxl: Replace deprecated -soundhw on QEMU command line From: Anthony PERARD anthony.per...@citrix.com Thu Aug 18 09:25:50 2022 +0200 Date: Thu Aug 18 09:25:50 2022 +0200: Git: 62ca138c2c052187783aca3957d3f47c4dcfd683 -soundhw is deprecated since 825ff02911c9 ("audio: add soundhw deprecation notice"), QEMU v5.1, and is been remove for upcoming v7.1 by 039a68373c45 ("introduce -audio as a replacement for -soundhw"). Instead we can just add the sound card with "-device", for most option that "-soundhw" could handle. "-device" is an option that existed before QEMU 1.0, and could already be used to add audio hardware. The list of possible option for libxl's "soundhw" is taken the list from QEMU 7.0. The list of options for "soundhw" are listed in order of preference in the manual. The first three (hda, ac97, es1370) are PCI devices and easy to test on Linux, and the last four are ISA devices which doesn't seems to work out of the box on linux. The sound card 'pcspk' isn't listed even if it used to be accepted by '-soundhw' because QEMU crash when trying to add it to a Xen domain. Also, it wouldn't work with "-device" might need to be "-machine pcspk-audiodev=default" instead. Signed-off-by: Anthony PERARD <anthony.per...@citrix.com> Reviewed-by: Jason Andryuk <jandr...@gmail.com> --- a/docs/man/xl.cfg.5.pod.in +++ b/docs/man/xl.cfg.5.pod.in @@ -2540,9 +2540,9 @@ The form serial=DEVICE is also accepted =item B<soundhw="DEVICE"> -Select the virtual sound card to expose to the guest. The valid -devices are defined by the device model configuration, please see the -B<qemu(1)> manpage for details. The default is not to export any sound +Select the virtual sound card to expose to the guest. The valid devices are +B<hda>, B<ac97>, B<es1370>, B<adlib>, B<cs4231a>, B<gus>, B<sb16> if there are +available with the device model QEMU. The default is not to export any sound device. =item B<vkb_device=BOOLEAN> --- a/tools/libs/light/libxl_dm.c +++ b/tools/libs/light/libxl_dm.c @@ -1204,6 +1204,7 @@ static int libxl__build_device_model_arg uint64_t ram_size; const char *path, *chardev; bool is_stubdom = libxl_defbool_val(b_info->device_model_stubdomain); + int rc; dm_args = flexarray_make(gc, 16, 1); dm_envs = flexarray_make(gc, 16, 1); @@ -1531,7 +1532,23 @@ static int libxl__build_device_model_arg } } if (b_info->u.hvm.soundhw) { - flexarray_vappend(dm_args, "-soundhw", b_info->u.hvm.soundhw, NULL); + libxl__qemu_soundhw soundhw; + + rc = libxl__qemu_soundhw_from_string(b_info->u.hvm.soundhw, &soundhw); + if (rc) { + LOGD(ERROR, guest_domid, "Unknown soundhw option '%s'", b_info->u.hvm.soundhw); + return ERROR_INVAL; + } + + switch (soundhw) { + case LIBXL__QEMU_SOUNDHW_HDA: + flexarray_vappend(dm_args, "-device", "intel-hda", + "-device", "hda-duplex", NULL); + break; + default: + flexarray_append_pair(dm_args, "-device", + (char*)libxl__qemu_soundhw_to_string(soundhw)); + } } if (!libxl__acpi_defbool_val(b_info)) { flexarray_append(dm_args, "-no-acpi"); --- a/tools/libs/light/libxl_types_internal.idl +++ b/tools/libs/light/libxl_types_internal.idl @@ -55,3 +55,13 @@ libxl__device_action = Enumeration("devi (1, "ADD"), (2, "REMOVE"), ]) + +libxl__qemu_soundhw = Enumeration("qemu_soundhw", [ + (1, "ac97"), + (2, "adlib"), + (3, "cs4231a"), + (4, "es1370"), + (5, "gus"), + (6, "hda"), + (7, "sb16"), + ])