From nobody Fri May 3 04:27:58 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) client-ip=209.132.183.28; envelope-from=libvir-list-bounces@redhat.com; helo=mx1.redhat.com; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1523277729064894.6967164518013; Mon, 9 Apr 2018 05:42:09 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id CD4DD82109; Mon, 9 Apr 2018 12:42:07 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 907894D9E5; Mon, 9 Apr 2018 12:42:07 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id 31EC6B3487; Mon, 9 Apr 2018 12:42:07 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id w39Cg5hk022575 for ; Mon, 9 Apr 2018 08:42:05 -0400 Received: by smtp.corp.redhat.com (Postfix) id 737F85F718; Mon, 9 Apr 2018 12:42:05 +0000 (UTC) Received: from mx1.redhat.com (ext-mx07.extmail.prod.ext.phx2.redhat.com [10.5.110.31]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 698B75F717 for ; Mon, 9 Apr 2018 12:42:00 +0000 (UTC) Received: from mail1.bemta5.messagelabs.com (mail1.bemta5.messagelabs.com [195.245.231.153]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 9B396C04BE15 for ; Mon, 9 Apr 2018 12:41:59 +0000 (UTC) Received: from [85.158.136.83] (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256 bits)) by server-17.bemta-5.messagelabs.com id 36/E5-08832-69F5BCA5; Mon, 09 Apr 2018 12:41:58 +0000 Received: (qmail 30826 invoked from network); 9 Apr 2018 12:41:58 -0000 Received: from unknown (HELO mailhost2.uk.fujitsu.com) (62.60.8.149) by server-8.tower-36.messagelabs.com with DHE-RSA-AES256-GCM-SHA384 encrypted SMTP; 9 Apr 2018 12:41:58 -0000 Received: from abgdgate60u.abg.fsc.net ([172.25.138.90]) by mailhost2.uk.fujitsu.com (8.14.5/8.14.5) with ESMTP id w39CfvCx029923 for ; Mon, 9 Apr 2018 13:41:57 +0100 Received: from abg4858n-lnx.abg.fsc.net (HELO abg4858n-lnx.CSOD.local) ([172.26.71.109]) by abgdgate60u.abg.fsc.net with ESMTP; 09 Apr 2018 14:41:57 +0200 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFtrDLMWRWlGSWpSXmKPExsViZ8MxVXda/Ok og2sz+CxWLbvO6sDo8X7fVbYAxijWzLyk/IoE1oym90cYC+bzVlyY2s/awNjO3cXIxSEkcIBR 4ujaV4wQzhxGiSvnTrN0MXJwsAmYSXxbX9jFyMkhIiAlsejeAmaQMLOAicTT1X4gYWEBU4kn+ ++ygYRZBFQl9l5jBQnzCjhLnJ3exwhiSwjIS0zY0sQygZFzASPDKkaN4tSistQiXUNDvaSizP SMktzEzBxdQwNTvdzU4uLE9NScxKRiveT83E2MQF8xAMEOxpXtzocYJTmYlER5vV6fihLiS8p PqcxILM6ILyrNSS0+xCjDwaEkwVscdzpKSLAoNT21Ii0zBxg0MGkJDh4lEd7vsUBp3uKCxNzi zHSI1ClGRSlxXhOQPgGQREZpHlwbLFAvMcpKCfMyAh0ixFOQWpSbWYIq/4pRnINRSZhXFGQKT 2ZeCdz0V0CLmYAWf0o4AbK4JBEhJdXAuKrBb87/b58LVs/RiOqKMAh6dPDe04q70w8vyF3Il3 f53MYTaducdwSp1rzSWVliIa3zcr3bhxifJ3ukU04sVc89NHN5UIB9Rf6Sj8077AsaXftl+S3 fr+M3v/JumSUHp6qx+etpf7cu+6fOIr5PfZvtg5BXYrP4/nTtcfNba+Z/vFzb90NgkxJLcUai oRZzUXEiAB3ngtZPAgAA X-Env-Sender: thilo.cestonaro@ts.fujitsu.com X-Msg-Ref: server-8.tower-36.messagelabs.com!1523277718!121062405!1 X-Originating-IP: [62.60.8.149] X-SYMC-ESS-Client-Auth: outbound-route-from=pass X-StarScan-Received: X-StarScan-Version: 9.9.15; banners=-,-,- X-VirusChecked: Checked From: Thilo Cestonaro To: libvir-list@redhat.com Date: Mon, 9 Apr 2018 14:41:55 +0200 Message-Id: <20180409124155.21838-1-thilo.cestonaro@ts.fujitsu.com> X-Greylist: Sender passed SPF test, Sender IP whitelisted by DNSRBL, ACL 207 matched, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.31]); Mon, 09 Apr 2018 12:42:00 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.31]); Mon, 09 Apr 2018 12:42:00 +0000 (UTC) for IP:'195.245.231.153' DOMAIN:'mail1.bemta5.messagelabs.com' HELO:'mail1.bemta5.messagelabs.com' FROM:'thilo.cestonaro@ts.fujitsu.com' RCPT:'' X-RedHat-Spam-Score: -0.013 (RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2, SPF_HELO_PASS, SPF_PASS) 195.245.231.153 mail1.bemta5.messagelabs.com 195.245.231.153 mail1.bemta5.messagelabs.com X-Scanned-By: MIMEDefang 2.78 on 10.5.110.31 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-loop: libvir-list@redhat.com Cc: Thilo Cestonaro Subject: [libvirt] [PATCH] qemu: use target.port for isa-serial X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.26]); Mon, 09 Apr 2018 12:42:08 +0000 (UTC) X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" A configured target.port is currently totaly ignored, while contsructing qemu commandline, for all types of serial devices. This patch adds a -device parameter "index" for the target model isa-serial. This enables the user to specify which serial device will end in which ttySX device. Signed-off-by: Thilo Cestonaro --- Forgot to sign off! Here with Signed-off-by. src/qemu/qemu_command.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c index 514c3ab2e..5f770404b 100644 --- a/src/qemu/qemu_command.c +++ b/src/qemu/qemu_command.c @@ -10291,6 +10291,22 @@ qemuBuildSerialChrDeviceStr(char **deviceStr, virDomainChrSerialTargetModelTypeToString(serial->ta= rgetModel), serial->info.alias, serial->info.alias); =20 + switch ((virDomainChrSerialTargetModel) serial->targetModel) { + case VIR_DOMAIN_CHR_SERIAL_TARGET_MODEL_ISA_SERIAL: + if (serial->target.port !=3D -1) + virBufferAsprintf(&cmd, ",index=3D%d", serial->target.port); + break; + case VIR_DOMAIN_CHR_SERIAL_TARGET_MODEL_NONE: + case VIR_DOMAIN_CHR_SERIAL_TARGET_MODEL_USB_SERIAL: + case VIR_DOMAIN_CHR_SERIAL_TARGET_MODEL_PCI_SERIAL: + case VIR_DOMAIN_CHR_SERIAL_TARGET_MODEL_SPAPR_VTY: + case VIR_DOMAIN_CHR_SERIAL_TARGET_MODEL_PL011: + case VIR_DOMAIN_CHR_SERIAL_TARGET_MODEL_SCLPCONSOLE: + case VIR_DOMAIN_CHR_SERIAL_TARGET_MODEL_SCLPLMCONSOLE: + case VIR_DOMAIN_CHR_SERIAL_TARGET_MODEL_LAST: + break; + } + if (qemuBuildDeviceAddressStr(&cmd, def, &serial->info, qemuCaps) < 0) goto error; =20 --=20 2.15.1 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list