From nobody Mon May 6 04:23:01 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=pass(p=reject dis=none) header.from=citrix.com ARC-Seal: i=1; a=rsa-sha256; t=1659956797; cv=none; d=zohomail.com; s=zohoarc; b=c8vlMdNL/wafixjmIgsDKJ7GfvEc+pcZyoGMHdH8LeUBm/lK7pBufPNyFt5rudfjKHnr1CPHafpZwZy0CdLZcjd3gdiwzDBcRrwJ1lWxFWvC87a7vT7BwDY+uasWE6+9PY4TrtLiXlka1QFgOq1g+ZL79Sr5zufUhGfpwq9tROY= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1659956797; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=XGk57HF7kedcZxMGwOHb8aj8ZzEel5rbnZJSOaN8RSA=; b=d0vsdRgEjghFd7DcvttV8BOX02L+RqBApkIKTZM4jbs1fNkt2FvxD0QsyxIAS637AJ/3zvSTB1rIyMs7o6OXsgHf96XRS7pp/i2TV7imE6g8zOtbbd50tTaIzI3A0vNlU51b5FzezzrlSje1xlnHjMD1VLLfHMeJW5okh5KDn1k= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=pass header.from= (p=reject dis=none) Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1659956797913806.228714251886; Mon, 8 Aug 2022 04:06:37 -0700 (PDT) Received: from list by lists.xenproject.org with outflank-mailman.382388.617324 (Exim 4.92) (envelope-from ) id 1oL0a4-0005uo-Oj; Mon, 08 Aug 2022 11:05:56 +0000 Received: by outflank-mailman (output) from mailman id 382388.617324; Mon, 08 Aug 2022 11:05:56 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1oL0a4-0005uh-LR; Mon, 08 Aug 2022 11:05:56 +0000 Received: by outflank-mailman (input) for mailman id 382388; Mon, 08 Aug 2022 11:05:56 +0000 Received: from se1-gles-sth1-in.inumbo.com ([159.253.27.254] helo=se1-gles-sth1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1oL0a4-0005ep-5W for xen-devel@lists.xenproject.org; Mon, 08 Aug 2022 11:05:56 +0000 Received: from esa4.hc3370-68.iphmx.com (esa4.hc3370-68.iphmx.com [216.71.155.144]) by se1-gles-sth1.inumbo.com (Halon) with ESMTPS id 11d60e7a-170a-11ed-bd2e-47488cf2e6aa; Mon, 08 Aug 2022 13:05:55 +0200 (CEST) X-Outflank-Mailman: Message body and most headers restored to incoming version X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" X-Inumbo-ID: 11d60e7a-170a-11ed-bd2e-47488cf2e6aa DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=citrix.com; s=securemail; t=1659956754; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=+TMoGxiqff4av5HP+7bjjRzkm1T+xybFBCI1AfNJyi4=; b=VxUc//Fdg8pIARCaUTHySDh5x7mzK80Q5tn6qIANx/ZUZkjukyZcRtWe OZuxwl+hqLc8g3Li/4lEX8kReUU7U+mAfrF7YMBclttzVIgjxOCsZY6D4 YigsrccCQdbDuWIt8x/yA4vx5GoRqdJEUxr2Gh/uwEgaF6brg60YfDD6N w=; Authentication-Results: esa4.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none X-SBRS: 2.7 X-MesageID: 80148078 X-Ironport-Server: esa4.hc3370-68.iphmx.com X-Remote-IP: 162.221.156.83 X-Policy: $RELAYED IronPort-Data: A9a23:wHgEFqj7aZmE4a2AndrzZ+saX161HhAKZh0ujC45NGQN5FlHY01je htvX2DXaKrZMGOmL4t0bo2w8R4O75+EytM2GVE6riEwFiMb9cadCdqndUqhZCn6wu8v7a5EA 2fyTvGacajYm1eF/k/F3oDJ9CU6j+fQLlbFILasEjhrQgN5QzsWhxtmmuoo6qZlmtH8CA6W0 T/Ii5S31GSNhnglaQr414rZ8Ek15KSq6GtB1rADTasjUGH2xiF94K03fcldH1OgKqFIE+izQ fr0zb3R1gs1KD90V7tJOp6iGqE7aua60Tqm0xK6aID76vR2nQQg075TCRYpQRw/ZwNlPTxG4 I4lWZSYEW/FN0BX8QgXe0Ew/ypWZcWq9FJbSJQWXAP6I0DuKhPRL/tS4E4eNJJb27t+Hn532 +08MDlQS0meiP2o+efuIgVsrpxLwMjDOYoevjdrzC3DDOZgSpfGK0nIzYYGhnFq3JkIRKuAI ZpCAdZsRE2ojxlnM1ELCJU4jaGwi2P2aTFwo1OJv6snpWPUyWSd1ZC9aIOJKoTVFa25mG6Jv SH3plSgCCgCPfLC4yjCqk+n2rfmyHaTtIU6S+Tjq68CbEeo7nMXIA0bUx28u/bRokyxQdVEM GQP5zEj66M18SSDXtT7GhG1vnOAlhodQMZLVf037hmXzajZ6BrfAXILJhZDYtE7sM49RRQxy 0SE2djuAFRSXKa9ECzHsO3O9HXrZHZTfTRqiTI4oRUt6saggdw6kQ32YMdHCKfoq4ToFi7u+ mXfxMQhvIn/nfLnxo3iow2W3Wzx+cGVJuImzl6JBzz4t2uVcKbgPtX1sgaDsJ6sOa7DFjG8U G44d99yBQzkJbWEj2SzTeoEB9lFDN7VYWSH0TaD83TMnglBGkJPnqgKuVmS3G8zbq45lcbBO Sc/Qz956p5JJ2eNZqRqeY+3AMlC5fG+SIW1B6+PMYsWPcMZmOq7EMZGNSatM53FyhBwwcnTx 7/BGSpTMZrqIfs+l2fnLwvs+bQq2jo/1QvueHwP9Dz+iOL2TCPEFt843K6mNL9RAFWs/FqIq L6y9qKil31ibQEJSnCLqdBLcQhbcxDWx/ne8qRqSwJKGSI+cElJNhMb6ehJl1BN90iNqtr1w w== IronPort-HdrOrdr: A9a23:e4P0QKqb829wWHGwoNGNzeQaV5oteYIsimQD101hICG8cqSj+P xG+85rsiMc6QxhIU3I9urgBEDtex7hHNtOkOss1NSZLW3bUQmTTL2KhLGKq1aLJ8S9zJ856U 4JSdkZNDSaNzZHZKjBjDVQa+xQo+W6zA== X-IronPort-AV: E=Sophos;i="5.93,222,1654574400"; d="scan'208";a="80148078" From: Anthony PERARD To: CC: Jan Beulich , Anthony PERARD , Wei Liu , Juergen Gross Subject: [XEN PATCH 1/2] tools/libxl: Replace deprecated -sdl option on QEMU command line Date: Mon, 8 Aug 2022 12:05:44 +0100 Message-ID: <20220808110545.62886-2-anthony.perard@citrix.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20220808110545.62886-1-anthony.perard@citrix.com> References: <20220808110545.62886-1-anthony.perard@citrix.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @citrix.com) X-ZM-MESSAGEID: 1659956798662100003 Content-Type: text/plain; charset="utf-8" "-sdl" is deprecated upstream since 6695e4c0fd9e ("softmmu/vl: Deprecate the -sdl and -curses option"), QEMU v6.2, and the option is removed by 707d93d4abc6 ("ui: Remove deprecated options "-sdl" and "-curses""), in upcoming QEMU v7.1. Instead, use "-display sdl", available since 1472a95bab1e ("Introduce -display argument"), before QEMU v1.0. Signed-off-by: Anthony PERARD Reviewed-by: Jason Andryuk --- tools/libs/light/libxl_dm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/libs/light/libxl_dm.c b/tools/libs/light/libxl_dm.c index 1864ee30f0..04bf5d8563 100644 --- a/tools/libs/light/libxl_dm.c +++ b/tools/libs/light/libxl_dm.c @@ -1349,7 +1349,7 @@ static int libxl__build_device_model_args_new(libxl__= gc *gc, flexarray_append_pair(dm_args, "-display", "none"); =20 if (sdl && !is_stubdom) { - flexarray_append(dm_args, "-sdl"); + flexarray_append_pair(dm_args, "-display", "sdl"); if (sdl->display) flexarray_append_pair(dm_envs, "DISPLAY", sdl->display); if (sdl->xauthority) --=20 Anthony PERARD From nobody Mon May 6 04:23:01 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=pass(p=reject dis=none) header.from=citrix.com ARC-Seal: i=1; a=rsa-sha256; t=1659956795; cv=none; d=zohomail.com; s=zohoarc; b=Vh2i67TQhI2JnpSdSr32ZC7vIBNp7YU0Pp2LVJxqyfz+K9ltvPCpIbkpm9yODYxzNP51CRAFoGXDqrQ5n+5ENoQmwaqzmNJHyqmaQPDqeCeEdr6bGp6wG0kqtlwrGyYvJEmo0CGxbkUkWVpXEAj4dyDL8T7ocvcM4a5Cpw/njY0= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1659956795; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=Dwje7OQBFmA2++AfJHJp0yB4FMgvq/hxgxE6Mj3pe/I=; b=iXlDMrr+RXaOEM//ggc6IEYmlqgdXeSDxk/mDzYV3Ac9lo6CpJixaamD3A6Ddu91DiSv5YXYTn/zstblvSg8wc9lw0B/zeFPxgEU3lNkwjQp5+8Q903TwFNdpkt+gt0RsBzBr9Z3I5fyFqM+hChbfdOaI49BbfNS8Od093rgZiU= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=pass header.from= (p=reject dis=none) Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1659956795050678.1269890522113; Mon, 8 Aug 2022 04:06:35 -0700 (PDT) Received: from list by lists.xenproject.org with outflank-mailman.382390.617335 (Exim 4.92) (envelope-from ) id 1oL0a9-0006Et-06; Mon, 08 Aug 2022 11:06:01 +0000 Received: by outflank-mailman (output) from mailman id 382390.617335; Mon, 08 Aug 2022 11:06:00 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1oL0a8-0006EZ-TB; Mon, 08 Aug 2022 11:06:00 +0000 Received: by outflank-mailman (input) for mailman id 382390; Mon, 08 Aug 2022 11:06:00 +0000 Received: from se1-gles-sth1-in.inumbo.com ([159.253.27.254] helo=se1-gles-sth1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1oL0a8-0005ep-79 for xen-devel@lists.xenproject.org; Mon, 08 Aug 2022 11:06:00 +0000 Received: from esa4.hc3370-68.iphmx.com (esa4.hc3370-68.iphmx.com [216.71.155.144]) by se1-gles-sth1.inumbo.com (Halon) with ESMTPS id 14ef6f74-170a-11ed-bd2e-47488cf2e6aa; Mon, 08 Aug 2022 13:05:58 +0200 (CEST) X-Outflank-Mailman: Message body and most headers restored to incoming version X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" X-Inumbo-ID: 14ef6f74-170a-11ed-bd2e-47488cf2e6aa DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=citrix.com; s=securemail; t=1659956758; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=UoENNw6Pj7pjKh3ByeuEJ7KwsY4w8czj33URcS8/NGA=; b=KOS+1qq/3as92JhsQBJh/o4xDy9HnAya4lUxpc+Y7wNtRRqVY1aqw53V Yl1aHojop+0DI2yPJtxGM8NVH48Dk3PH79qSxdZ5P6LgZGnJlBQC5NwgJ yv68VFzH1RtWBESH24XCepiOjyVCWGXi/yJo3MSn0UDKzh8F77voTLgZ8 A=; Authentication-Results: esa4.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none X-SBRS: 2.7 X-MesageID: 80148087 X-Ironport-Server: esa4.hc3370-68.iphmx.com X-Remote-IP: 162.221.156.83 X-Policy: $RELAYED IronPort-Data: A9a23:CwDuWKsCf8yaYibt4mSbcJsd3efnVCheMUV32f8akzHdYApBsoF/q tZmKW6Ea//YZ2P9f4h0aom//U4A6pfTx9VhGwJkpHg0Qy8X+JbJXdiXEBz9bniYRiHhoOOLz Cm8hv3odp1coqr0/0/1WlTZhSAgk/vOHtIQMcacUghpXwhoVSw9vhxqnu89k+ZAjMOwRgiAo rsemeWGULOe82MyYzl8B56r8ks15qyi4GNA5zTSWNgQ1LPgvyhNZH4gDfnZw0vQGuF8AuO8T uDf+7C1lkuxE8AFU47Nfh7TKyXmc5aKVeS8oiM+t5uK23CukhcawKcjXMfwXG8M49m/c3Kd/ /0W3XC4YV9B0qQhA43xWTEAe811FfUuFLMqvRFTGCFcpqHLWyKE/hlgMK05FYInuaF3GDgQz vE/cjQjdDuOqrOa8YvuH4GAhux7RCXqFIYWu3UmxjDFF/c2B5vERs0m5/cBgm123JoXW6+DO YxJMlKDbzyZC/FLEl4RFJI5mvbunnTleidUgFmUubA28y7YywkZPL3FYIKMJozSFZo9ckCwp EXU+l3lJjEhFN2zzSGr7Xj2j6jopHauMG4VPOLhraM76LGJ/UQMDDUGWF39puO24ma8VMhYM Fc84Tc1oO4580nDZsnwWVi0rWCJujYYWsFMCKsq5QeV0K3W7g2FQG8eQVZpatYrqcs3TjwCz UKSkpXiAjkHjVGOYSvDrPHO92r0YHVLaz9ZDcMZcecby9bc48Yzl0uRddtESqqblPb4NGDc8 gnf+UDSmI4vYd43O7STpA6a0mzy+8eQEmbZ9S2MADv7s1oRiJqNItXxtAOFtasowJOxFAHpg ZQSpySJAAni57mpnTfFfugCFarBCx2tYGyF2g4H83XMGl2QF5+fkWN4umgWyL9BaJpsRNMQS Ba7VfltzJFSJmC2SqR8fpi8Dc8npYC5S4m0BqGLNYUfOscqHONiwM2JTR744owQuBJ0zfFX1 WmzK65A8kr2+Yw4lWHrFo/xIJcgxzwkxHO7eK0XOy+PiOPGDFbIGOhtDbd7RrpmhE9yiFmKr o032grj40k3bdASlQGOrdZNdQxSfCZT6FKfg5U/S9Nv6zFOQAkJY8I9C5t4E2C5t8y5Ttv1w 0w= IronPort-HdrOrdr: A9a23:3bema65sovSyJ/eITAPXwMTXdLJyesId70hD6qhwISY6TiX+rb HLoB17726TtN9/YhEdcLy7VJVoIkmskKKdg7NhXotKNTOO0ADDQb2KhbGSpAEIcBeeygcy78 hdmtBFeb/NMWQ= X-IronPort-AV: E=Sophos;i="5.93,222,1654574400"; d="scan'208";a="80148087" From: Anthony PERARD To: CC: Jan Beulich , Anthony PERARD , Wei Liu , Juergen Gross Subject: [XEN PATCH 2/2] tools/libxl: Replace deprecated -soundhw on QEMU command line Date: Mon, 8 Aug 2022 12:05:45 +0100 Message-ID: <20220808110545.62886-3-anthony.perard@citrix.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20220808110545.62886-1-anthony.perard@citrix.com> References: <20220808110545.62886-1-anthony.perard@citrix.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @citrix.com) X-ZM-MESSAGEID: 1659956797320100001 Content-Type: text/plain; charset="utf-8" -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=3Ddefault" instead. Signed-off-by: Anthony PERARD Reviewed-by: Jason Andryuk --- docs/man/xl.cfg.5.pod.in | 6 +++--- tools/libs/light/libxl_types_internal.idl | 10 ++++++++++ tools/libs/light/libxl_dm.c | 19 ++++++++++++++++++- 3 files changed, 31 insertions(+), 4 deletions(-) diff --git a/docs/man/xl.cfg.5.pod.in b/docs/man/xl.cfg.5.pod.in index 6d98d73d76..b2901e04cf 100644 --- a/docs/man/xl.cfg.5.pod.in +++ b/docs/man/xl.cfg.5.pod.in @@ -2555,9 +2555,9 @@ The form serial=3DDEVICE is also accepted for backwar= ds compatibility. =20 =3Ditem B =20 -Select the virtual sound card to expose to the guest. The valid -devices are defined by the device model configuration, please see the -B 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, B, B, B, B, B, B if there= are +available with the device model QEMU. The default is not to export any sou= nd device. =20 =3Ditem B diff --git a/tools/libs/light/libxl_types_internal.idl b/tools/libs/light/l= ibxl_types_internal.idl index 8f71980aec..fb0f4f23d7 100644 --- a/tools/libs/light/libxl_types_internal.idl +++ b/tools/libs/light/libxl_types_internal.idl @@ -56,3 +56,13 @@ libxl__device_action =3D Enumeration("device_action", [ (1, "ADD"), (2, "REMOVE"), ]) + +libxl__qemu_soundhw =3D Enumeration("qemu_soundhw", [ + (1, "ac97"), + (2, "adlib"), + (3, "cs4231a"), + (4, "es1370"), + (5, "gus"), + (6, "hda"), + (7, "sb16"), + ]) diff --git a/tools/libs/light/libxl_dm.c b/tools/libs/light/libxl_dm.c index 04bf5d8563..fc264a3a13 100644 --- a/tools/libs/light/libxl_dm.c +++ b/tools/libs/light/libxl_dm.c @@ -1204,6 +1204,7 @@ static int libxl__build_device_model_args_new(libxl__= gc *gc, uint64_t ram_size; const char *path, *chardev; bool is_stubdom =3D libxl_defbool_val(b_info->device_model_stubdomain); + int rc; =20 dm_args =3D flexarray_make(gc, 16, 1); dm_envs =3D flexarray_make(gc, 16, 1); @@ -1531,7 +1532,23 @@ static int libxl__build_device_model_args_new(libxl_= _gc *gc, } } if (b_info->u.hvm.soundhw) { - flexarray_vappend(dm_args, "-soundhw", b_info->u.hvm.soundhw, = NULL); + libxl__qemu_soundhw soundhw; + + rc =3D 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"); --=20 Anthony PERARD