From nobody Mon Apr 29 09:51:14 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 1522935298292857.5981153583915; Thu, 5 Apr 2018 06:34:58 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id F195E80479; Thu, 5 Apr 2018 13:34:56 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id C0B6860927; Thu, 5 Apr 2018 13:34:56 +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 849081806103; Thu, 5 Apr 2018 13:34:56 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id w35DOsEN008239 for ; Thu, 5 Apr 2018 09:24:54 -0400 Received: by smtp.corp.redhat.com (Postfix) id 71FDE89E95; Thu, 5 Apr 2018 13:24:54 +0000 (UTC) Received: from mx1.redhat.com (ext-mx08.extmail.prod.ext.phx2.redhat.com [10.5.110.32]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 669398DC00 for ; Thu, 5 Apr 2018 13:24:20 +0000 (UTC) Received: from mail1.bemta6.messagelabs.com (mail1.bemta6.messagelabs.com [193.109.254.112]) (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 5F2E1C0587E9 for ; Thu, 5 Apr 2018 13:24:19 +0000 (UTC) Received: from [193.109.254.3] (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256 bits)) by server-8.bemta-6.messagelabs.com id 96/B2-14001-28326CA5; Thu, 05 Apr 2018 13:24:18 +0000 Received: (qmail 17064 invoked from network); 5 Apr 2018 13:24:17 -0000 Received: from unknown (HELO mailhost4.uk.fujitsu.com) (62.60.8.85) by server-7.tower-184.messagelabs.com with DHE-RSA-AES256-GCM-SHA384 encrypted SMTP; 5 Apr 2018 13:24:17 -0000 Received: from abgdgate60u.abg.fsc.net ([172.25.138.90]) by mailhost4.uk.fujitsu.com (8.14.5/8.14.5) with ESMTP id w35DOH2o031624 for ; Thu, 5 Apr 2018 14:24:17 +0100 Received: from abg4858n-lnx.abg.fsc.net (HELO abg4858n-lnx.CSOD.local) ([172.26.71.109]) by abgdgate60u.abg.fsc.net with ESMTP; 05 Apr 2018 15:24:17 +0200 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFtrDLMWRWlGSWpSXmKPExsViZ8MRqtuofCz KYN52bYtVy66zOjB6vN93lS2AMYo1My8pvyKBNaNv6nKmgg08FbffGzYwLuXqYuTiEBI4wCix 8FwTK4Qzh1Fi24/1LF2MHBxsAmYS39YXdjFycogISEksureAGSTMLGAi8XS1H0hYWMBU4sn+u 2wgNouAqkTfnQesIDavgLPE97nHmUBsCQF5iQlbmlgmMHIuYGRYxahRnFpUllqka2Sol1SUmZ 5RkpuYmaNraGCml5taXJyYnpqTmFSsl5yfu4kR6CsGINjB+GdZwCFGSQ4mJVHeJ/ePRAnxJeW nVGYkFmfEF5XmpBYfYpTh4FCS4K1XOhYlJFiUmp5akZaZAwwamLQEB4+SCO92kDRvcUFibnFm OkTqFKOilDhvEUhCACSRUZoH1wYL1EuMslLCvIxAhwjxFKQW5WaWoMq/YhTnYFQShpjCk5lXA jf9FdBiJqDFExKPgCwuSURISTUwHjYLP3VxgpBw2+/NTjsCFotaLbv25KyNQMi2tvxTtW2Xue /ZsfrY7F7htvgx+7LUp3ev3xM81mt2NKHHRMub4dvUIyvDdpgYMtScS//+tvjMzjfn4k7HVzN duvg7/qf1HNmjm86+/Wfx4y4Pq29cp9O/WyXzXkYE+51Y/z9u9pxNP/7w67x/2KrEUpyRaKjF XFScCAB6smbITwIAAA== X-Env-Sender: thilo.cestonaro@ts.fujitsu.com X-Msg-Ref: server-7.tower-184.messagelabs.com!1522934657!143849112!1 X-Originating-IP: [62.60.8.85] 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: Thu, 5 Apr 2018 15:24:15 +0200 Message-Id: <20180405132415.14724-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.32]); Thu, 05 Apr 2018 13:24:19 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.32]); Thu, 05 Apr 2018 13:24:19 +0000 (UTC) for IP:'193.109.254.112' DOMAIN:'mail1.bemta6.messagelabs.com' HELO:'mail1.bemta6.messagelabs.com' FROM:'thilo.cestonaro@ts.fujitsu.com' RCPT:'' X-RedHat-Spam-Score: -2.302 (RCVD_IN_DNSWL_MED, RCVD_IN_MSPIKE_H2, SPF_PASS) 193.109.254.112 mail1.bemta6.messagelabs.com 193.109.254.112 mail1.bemta6.messagelabs.com X-Scanned-By: MIMEDefang 2.78 on 10.5.110.32 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-loop: libvir-list@redhat.com X-Mailman-Approved-At: Thu, 05 Apr 2018 09:28:38 -0400 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.13 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.28]); Thu, 05 Apr 2018 13:34:57 +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. --- 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 bbd3cd0a7..a685abec0 100644 --- a/src/qemu/qemu_command.c +++ b/src/qemu/qemu_command.c @@ -10290,6 +10290,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