From nobody Fri May 3 19:56:33 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; dmarc=pass(p=none dis=none) header.from=redhat.com Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1550143947404700.2361237444478; Thu, 14 Feb 2019 03:32:27 -0800 (PST) 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 6611C89AF0; Thu, 14 Feb 2019 11:32:25 +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 18EAF608A4; Thu, 14 Feb 2019 11:32:25 +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 C86F7181A048; Thu, 14 Feb 2019 11:32:24 +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 x1EBWLkJ001308 for ; Thu, 14 Feb 2019 06:32:21 -0500 Received: by smtp.corp.redhat.com (Postfix) id B96BF5C70C; Thu, 14 Feb 2019 11:32:21 +0000 (UTC) Received: from icr.brq.redhat.com (unknown [10.43.2.100]) by smtp.corp.redhat.com (Postfix) with ESMTP id 3C02E5C737 for ; Thu, 14 Feb 2019 11:32:21 +0000 (UTC) From: =?UTF-8?q?J=C3=A1n=20Tomko?= To: libvir-list@redhat.com Date: Thu, 14 Feb 2019 12:32:09 +0100 Message-Id: In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCHv3 1/5] qemu: introduce qemuDomainChrSerialTargetModel 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: , Content-Type: text/plain; charset="utf-8" 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.26]); Thu, 14 Feb 2019 11:32:26 +0000 (UTC) Allow adding serial device models that deviate from the perceived semantics of our model attributes blindly copying the hypervisor-specific device name strings. Signed-off-by: J=C3=A1n Tomko Reviewed-by: Nikolay Shirokovskiy --- src/qemu/qemu_command.c | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c index 572d3bc20f..94de6b9061 100644 --- a/src/qemu/qemu_command.c +++ b/src/qemu/qemu_command.c @@ -185,6 +185,20 @@ VIR_ENUM_IMPL(qemuNumaPolicy, VIR_DOMAIN_NUMATUNE_MEM_= LAST, "interleave", ); =20 +VIR_ENUM_DECL(qemuDomainChrSerialTargetModel); +VIR_ENUM_IMPL(qemuDomainChrSerialTargetModel, + VIR_DOMAIN_CHR_SERIAL_TARGET_MODEL_LAST, + "none", + "isa-serial", + "usb-serial", + "pci-serial", + "spapr-vty", + "", /* pl011 is not user-insantiable */ + "sclpconsole", + "sclplmconsole", + "", /* 16550a is not user-instantiable */ +); + =20 /** * qemuBuildMasterKeyCommandLine: @@ -10812,7 +10826,7 @@ qemuBuildSerialChrDeviceStr(char **deviceStr, } =20 virBufferAsprintf(&cmd, "%s,chardev=3Dchar%s,id=3D%s", - virDomainChrSerialTargetModelTypeToString(serial->ta= rgetModel), + qemuDomainChrSerialTargetModelTypeToString(serial->t= argetModel), serial->info.alias, serial->info.alias); =20 if (qemuBuildDeviceAddressStr(&cmd, def, &serial->info, qemuCaps) < 0) --=20 2.19.2 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list From nobody Fri May 3 19:56:33 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; dmarc=pass(p=none dis=none) header.from=redhat.com Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1550143949724770.660781721332; Thu, 14 Feb 2019 03:32:29 -0800 (PST) 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 8D1DF81F1B; Thu, 14 Feb 2019 11:32:27 +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 4ECB1608D6; Thu, 14 Feb 2019 11:32:27 +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 062D8181A12C; Thu, 14 Feb 2019 11:32:27 +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 x1EBWMDN001319 for ; Thu, 14 Feb 2019 06:32:22 -0500 Received: by smtp.corp.redhat.com (Postfix) id B134F5C25D; Thu, 14 Feb 2019 11:32:22 +0000 (UTC) Received: from icr.brq.redhat.com (unknown [10.43.2.100]) by smtp.corp.redhat.com (Postfix) with ESMTP id 112CB5C880 for ; Thu, 14 Feb 2019 11:32:21 +0000 (UTC) From: =?UTF-8?q?J=C3=A1n=20Tomko?= To: libvir-list@redhat.com Date: Thu, 14 Feb 2019 12:32:10 +0100 Message-Id: In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCHv3 2/5] conf: add debugcon chardev guest interface 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: , Content-Type: text/plain; charset="utf-8" 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.27]); Thu, 14 Feb 2019 11:32:28 +0000 (UTC) From: Nikolay Shirokovskiy This interface can be used for example by firmware to print debug messages. Here is domain xml example:
Add checks to make sure this new serial type won't be reported as back-compat console. Signed-off-by: Nikolay Shirokovskiy Signed-off-by: J=C3=A1n Tomko Reviewed-by: Nikolay Shirokovskiy --- docs/formatdomain.html.in | 3 +- docs/schemas/domaincommon.rng | 1 + src/conf/domain_conf.c | 5 ++++ src/conf/domain_conf.h | 1 + src/qemu/qemu_command.c | 3 ++ src/qemu/qemu_domain.c | 3 ++ .../qemuxml2argvdata/isa-serial-debugcon.xml | 22 ++++++++++++++ .../isa-serial-debugcon.xml | 30 +++++++++++++++++++ tests/qemuxml2xmltest.c | 2 ++ 9 files changed, 69 insertions(+), 1 deletion(-) create mode 100644 tests/qemuxml2argvdata/isa-serial-debugcon.xml create mode 100644 tests/qemuxml2xmloutdata/isa-serial-debugcon.xml diff --git a/docs/formatdomain.html.in b/docs/formatdomain.html.in index 2ae5006849..a6d5346d46 100644 --- a/docs/formatdomain.html.in +++ b/docs/formatdomain.html.in @@ -7089,7 +7089,8 @@ qemu-kvm -net nic,model=3D? /dev/null Since 3.10.0, the target element can have an optional model subelement; valid values for its name attribute are: - isa-serial (usable with the isa-serial tar= get + isa-serial and since 5.1.0, + debugcon(usable with the isa-serial target type); usb-serial (usable with the usb-serial target type); pci-serial (usable with the pci-serial target type); diff --git a/docs/schemas/domaincommon.rng b/docs/schemas/domaincommon.rng index ba80440c72..ca0dd3b7c2 100644 --- a/docs/schemas/domaincommon.rng +++ b/docs/schemas/domaincommon.rng @@ -3763,6 +3763,7 @@ 16550a sclpconsole sclplmconsole + debugcon diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index 5d49f4388c..24b002847c 100644 --- a/src/conf/domain_conf.c +++ b/src/conf/domain_conf.c @@ -516,6 +516,7 @@ VIR_ENUM_IMPL(virDomainChrSerialTargetModel, "sclpconsole", "sclplmconsole", "16550a", + "debugcon", ); =20 VIR_ENUM_IMPL(virDomainChrDevice, VIR_DOMAIN_CHR_DEVICE_TYPE_LAST, @@ -4392,6 +4393,10 @@ virDomainDefAddConsoleCompat(virDomainDefPtr def) =20 switch ((virDomainChrSerialTargetType) def->serials[0]->targetType= ) { case VIR_DOMAIN_CHR_SERIAL_TARGET_TYPE_ISA: + if (def->serials[0]->targetModel =3D=3D VIR_DOMAIN_CHR_SERIAL_= TARGET_MODEL_DEBUGCON) + break; + ATTRIBUTE_FALLTHROUGH; + case VIR_DOMAIN_CHR_SERIAL_TARGET_TYPE_SPAPR_VIO: case VIR_DOMAIN_CHR_SERIAL_TARGET_TYPE_SYSTEM: case VIR_DOMAIN_CHR_SERIAL_TARGET_TYPE_SCLP: diff --git a/src/conf/domain_conf.h b/src/conf/domain_conf.h index 2bc3f879f7..9565f065df 100644 --- a/src/conf/domain_conf.h +++ b/src/conf/domain_conf.h @@ -1134,6 +1134,7 @@ typedef enum { VIR_DOMAIN_CHR_SERIAL_TARGET_MODEL_SCLPCONSOLE, VIR_DOMAIN_CHR_SERIAL_TARGET_MODEL_SCLPLMCONSOLE, VIR_DOMAIN_CHR_SERIAL_TARGET_MODEL_16550A, + VIR_DOMAIN_CHR_SERIAL_TARGET_MODEL_DEBUGCON, =20 VIR_DOMAIN_CHR_SERIAL_TARGET_MODEL_LAST } virDomainChrSerialTargetModel; diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c index 94de6b9061..c28ced6919 100644 --- a/src/qemu/qemu_command.c +++ b/src/qemu/qemu_command.c @@ -197,6 +197,7 @@ VIR_ENUM_IMPL(qemuDomainChrSerialTargetModel, "sclpconsole", "sclplmconsole", "", /* 16550a is not user-instantiable */ + "", /* debugcon */ ); =20 =20 @@ -9370,6 +9371,7 @@ qemuChrSerialTargetModelToCaps(virDomainChrSerialTarg= etModel targetModel) case VIR_DOMAIN_CHR_SERIAL_TARGET_MODEL_PL011: return QEMU_CAPS_DEVICE_PL011; case VIR_DOMAIN_CHR_SERIAL_TARGET_MODEL_16550A: + case VIR_DOMAIN_CHR_SERIAL_TARGET_MODEL_DEBUGCON: case VIR_DOMAIN_CHR_SERIAL_TARGET_MODEL_NONE: case VIR_DOMAIN_CHR_SERIAL_TARGET_MODEL_LAST: break; @@ -10801,6 +10803,7 @@ qemuBuildSerialChrDeviceStr(char **deviceStr, case VIR_DOMAIN_CHR_SERIAL_TARGET_MODEL_SPAPR_VTY: case VIR_DOMAIN_CHR_SERIAL_TARGET_MODEL_SCLPCONSOLE: case VIR_DOMAIN_CHR_SERIAL_TARGET_MODEL_SCLPLMCONSOLE: + case VIR_DOMAIN_CHR_SERIAL_TARGET_MODEL_DEBUGCON: =20 caps =3D qemuChrSerialTargetModelToCaps(serial->targetModel); =20 diff --git a/src/qemu/qemu_domain.c b/src/qemu/qemu_domain.c index ac01e861f7..9c4aedb009 100644 --- a/src/qemu/qemu_domain.c +++ b/src/qemu/qemu_domain.c @@ -4375,6 +4375,8 @@ qemuDomainChrSerialTargetModelToTargetType(int target= Model) case VIR_DOMAIN_CHR_SERIAL_TARGET_MODEL_SCLPCONSOLE: case VIR_DOMAIN_CHR_SERIAL_TARGET_MODEL_SCLPLMCONSOLE: return VIR_DOMAIN_CHR_SERIAL_TARGET_TYPE_SCLP; + case VIR_DOMAIN_CHR_SERIAL_TARGET_MODEL_DEBUGCON: + return VIR_DOMAIN_CHR_SERIAL_TARGET_TYPE_ISA; case VIR_DOMAIN_CHR_SERIAL_TARGET_MODEL_NONE: case VIR_DOMAIN_CHR_SERIAL_TARGET_MODEL_LAST: break; @@ -4437,6 +4439,7 @@ qemuDomainChrTargetDefValidate(const virDomainChrDef = *chr) case VIR_DOMAIN_CHR_SERIAL_TARGET_MODEL_SCLPCONSOLE: case VIR_DOMAIN_CHR_SERIAL_TARGET_MODEL_SCLPLMCONSOLE: case VIR_DOMAIN_CHR_SERIAL_TARGET_MODEL_16550A: + case VIR_DOMAIN_CHR_SERIAL_TARGET_MODEL_DEBUGCON: =20 expected =3D qemuDomainChrSerialTargetModelToTargetType(chr->t= argetModel); =20 diff --git a/tests/qemuxml2argvdata/isa-serial-debugcon.xml b/tests/qemuxml= 2argvdata/isa-serial-debugcon.xml new file mode 100644 index 0000000000..6c5de52585 --- /dev/null +++ b/tests/qemuxml2argvdata/isa-serial-debugcon.xml @@ -0,0 +1,22 @@ + + QEMUGuest1 + c7a5fdbd-edaf-9455-926a-d65c16db1809 + 219100 + 1 + + hvm + + + /usr/bin/qemu-system-i686 + + + + + + + +
+ + + + diff --git a/tests/qemuxml2xmloutdata/isa-serial-debugcon.xml b/tests/qemux= ml2xmloutdata/isa-serial-debugcon.xml new file mode 100644 index 0000000000..6ad7c3917c --- /dev/null +++ b/tests/qemuxml2xmloutdata/isa-serial-debugcon.xml @@ -0,0 +1,30 @@ + + QEMUGuest1 + c7a5fdbd-edaf-9455-926a-d65c16db1809 + 219100 + 219100 + 1 + + hvm + + + + destroy + restart + destroy + + /usr/bin/qemu-system-i686 + + + + + + + +
+ + + + + + diff --git a/tests/qemuxml2xmltest.c b/tests/qemuxml2xmltest.c index b38cbd6994..952e98918d 100644 --- a/tests/qemuxml2xmltest.c +++ b/tests/qemuxml2xmltest.c @@ -477,6 +477,8 @@ mymain(void) DO_TEST("pci-rom-disabled-invalid", NONE); DO_TEST("pci-serial-dev-chardev", NONE); =20 + DO_TEST("isa-serial-debugcon", NONE); + DO_TEST("encrypted-disk", QEMU_CAPS_QCOW2_LUKS); DO_TEST("encrypted-disk-usage", QEMU_CAPS_QCOW2_LUKS); DO_TEST("luks-disks", NONE); --=20 2.19.2 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list From nobody Fri May 3 19:56:33 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; dmarc=pass(p=none dis=none) header.from=redhat.com Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1550143954823560.3196263322131; Thu, 14 Feb 2019 03:32:34 -0800 (PST) Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id B044F82A3; Thu, 14 Feb 2019 11:32:31 +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 8094D5DF4E; Thu, 14 Feb 2019 11:32:31 +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 36C2C181A13D; Thu, 14 Feb 2019 11:32:31 +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 x1EBWNFH001324 for ; Thu, 14 Feb 2019 06:32:23 -0500 Received: by smtp.corp.redhat.com (Postfix) id 861A25C729; Thu, 14 Feb 2019 11:32:23 +0000 (UTC) Received: from icr.brq.redhat.com (unknown [10.43.2.100]) by smtp.corp.redhat.com (Postfix) with ESMTP id 0CA675C70C for ; Thu, 14 Feb 2019 11:32:22 +0000 (UTC) From: =?UTF-8?q?J=C3=A1n=20Tomko?= To: libvir-list@redhat.com Date: Thu, 14 Feb 2019 12:32:11 +0100 Message-Id: <58fa281db071503169709854e3b2e632e72c40a3.1550143829.git.jtomko@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCHv3 3/5] qemu: make irq optional when formatting the ISA address 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: , Content-Type: text/plain; charset="utf-8" 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.14 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.38]); Thu, 14 Feb 2019 11:32:33 +0000 (UTC) Some devices (e.g. debugcon) only use the iobase. Signed-off-by: J=C3=A1n Tomko Reviewed-by: Nikolay Shirokovskiy --- src/qemu/qemu_command.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c index c28ced6919..17237e4fc6 100644 --- a/src/qemu/qemu_command.c +++ b/src/qemu/qemu_command.c @@ -408,9 +408,9 @@ qemuBuildDeviceAddressStr(virBufferPtr buf, info->addr.ccw.ssid, info->addr.ccw.devno); } else if (info->type =3D=3D VIR_DOMAIN_DEVICE_ADDRESS_TYPE_ISA) { - virBufferAsprintf(buf, ",iobase=3D0x%x,irq=3D0x%x", - info->addr.isa.iobase, - info->addr.isa.irq); + virBufferAsprintf(buf, ",iobase=3D0x%x", info->addr.isa.iobase); + if (info->addr.isa.irq) + virBufferAsprintf(buf, ",irq=3D0x%x", info->addr.isa.irq); } =20 ret =3D 0; --=20 2.19.2 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list From nobody Fri May 3 19:56:33 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; dmarc=pass(p=none dis=none) header.from=redhat.com Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 155014395142546.785212441758404; Thu, 14 Feb 2019 03:32:31 -0800 (PST) Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 4E27181DE5; Thu, 14 Feb 2019 11:32:29 +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 20148600CD; Thu, 14 Feb 2019 11:32:29 +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 C8086181A135; Thu, 14 Feb 2019 11:32:28 +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 x1EBWOGJ001330 for ; Thu, 14 Feb 2019 06:32:24 -0500 Received: by smtp.corp.redhat.com (Postfix) id 5C3315C6C1; Thu, 14 Feb 2019 11:32:24 +0000 (UTC) Received: from icr.brq.redhat.com (unknown [10.43.2.100]) by smtp.corp.redhat.com (Postfix) with ESMTP id D6A855C70C for ; Thu, 14 Feb 2019 11:32:23 +0000 (UTC) From: =?UTF-8?q?J=C3=A1n=20Tomko?= To: libvir-list@redhat.com Date: Thu, 14 Feb 2019 12:32:12 +0100 Message-Id: In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCHv3 4/5] qemu: implement debugcon chardev 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: , Content-Type: text/plain; charset="utf-8" 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.11 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.25]); Thu, 14 Feb 2019 11:32:30 +0000 (UTC) From: Nikolay Shirokovskiy Format the device on QEMU command line. Signed-off-by: Nikolay Shirokovskiy Signed-off-by: J=C3=A1n Tomko Reviewed-by: Nikolay Shirokovskiy --- src/qemu/qemu_command.c | 2 +- .../isa-serial-debugcon.x86_64-latest.args | 30 +++++++++++++++++++ tests/qemuxml2argvtest.c | 1 + 3 files changed, 32 insertions(+), 1 deletion(-) create mode 100644 tests/qemuxml2argvdata/isa-serial-debugcon.x86_64-lates= t.args diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c index 17237e4fc6..7b7abc7aed 100644 --- a/src/qemu/qemu_command.c +++ b/src/qemu/qemu_command.c @@ -197,7 +197,7 @@ VIR_ENUM_IMPL(qemuDomainChrSerialTargetModel, "sclpconsole", "sclplmconsole", "", /* 16550a is not user-instantiable */ - "", /* debugcon */ + "isa-debugcon", ); =20 =20 diff --git a/tests/qemuxml2argvdata/isa-serial-debugcon.x86_64-latest.args = b/tests/qemuxml2argvdata/isa-serial-debugcon.x86_64-latest.args new file mode 100644 index 0000000000..f6a68277c4 --- /dev/null +++ b/tests/qemuxml2argvdata/isa-serial-debugcon.x86_64-latest.args @@ -0,0 +1,30 @@ +LC_ALL=3DC \ +PATH=3D/bin \ +HOME=3D/home/test \ +USER=3Dtest \ +LOGNAME=3Dtest \ +QEMU_AUDIO_DRV=3Dnone \ +/usr/bin/qemu-system-i686 \ +-name guest=3DQEMUGuest1,debug-threads=3Don \ +-S \ +-object secret,id=3DmasterKey0,format=3Draw,\ +file=3D/tmp/lib/domain--1-QEMUGuest1/master-key.aes \ +-machine pc,accel=3Dtcg,usb=3Doff,dump-guest-core=3Doff \ +-m 214 \ +-realtime mlock=3Doff \ +-smp 1,sockets=3D1,cores=3D1,threads=3D1 \ +-uuid c7a5fdbd-edaf-9455-926a-d65c16db1809 \ +-display none \ +-no-user-config \ +-nodefaults \ +-chardev socket,id=3Dcharmonitor,fd=3D1729,server,nowait \ +-mon chardev=3Dcharmonitor,id=3Dmonitor,mode=3Dcontrol \ +-rtc base=3Dutc \ +-no-shutdown \ +-no-acpi \ +-boot strict=3Don \ +-chardev pipe,id=3Dcharserial0,path=3D/tmp/debugcon \ +-device isa-debugcon,chardev=3Dcharserial0,id=3Dserial0,iobase=3D0x402 \ +-sandbox on,obsolete=3Ddeny,elevateprivileges=3Ddeny,spawn=3Ddeny,\ +resourcecontrol=3Ddeny \ +-msg timestamp=3Don diff --git a/tests/qemuxml2argvtest.c b/tests/qemuxml2argvtest.c index dd4f73a5fb..178e36ad36 100644 --- a/tests/qemuxml2argvtest.c +++ b/tests/qemuxml2argvtest.c @@ -1419,6 +1419,7 @@ mymain(void) QEMU_CAPS_DEVICE_ISA_SERIAL); DO_TEST("pci-serial-dev-chardev", QEMU_CAPS_DEVICE_PCI_SERIAL); + DO_TEST_CAPS_LATEST("isa-serial-debugcon"); =20 DO_TEST("channel-guestfwd", NONE); DO_TEST_CAPS_VER("channel-unix-guestfwd", "2.5.0"); --=20 2.19.2 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list From nobody Fri May 3 19:56:33 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; dmarc=pass(p=none dis=none) header.from=redhat.com Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1550143952411460.0767434112936; Thu, 14 Feb 2019 03:32:32 -0800 (PST) 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 58084C070473; Thu, 14 Feb 2019 11:32:30 +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 2C3245C880; Thu, 14 Feb 2019 11:32:30 +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 D16D4181A137; Thu, 14 Feb 2019 11:32:29 +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 x1EBWPUl001342 for ; Thu, 14 Feb 2019 06:32:25 -0500 Received: by smtp.corp.redhat.com (Postfix) id 2EA015C729; Thu, 14 Feb 2019 11:32:25 +0000 (UTC) Received: from icr.brq.redhat.com (unknown [10.43.2.100]) by smtp.corp.redhat.com (Postfix) with ESMTP id A9BDB5C70C for ; Thu, 14 Feb 2019 11:32:24 +0000 (UTC) From: =?UTF-8?q?J=C3=A1n=20Tomko?= To: libvir-list@redhat.com Date: Thu, 14 Feb 2019 12:32:13 +0100 Message-Id: <14c4d8681e7fba2e992c1ca6e858eb52cb9782da.1550143829.git.jtomko@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCHv3 5/5] qemu: autoadd iobase to debugcon chardev 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: , Content-Type: text/plain; charset="utf-8" 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.32]); Thu, 14 Feb 2019 11:32:31 +0000 (UTC) If no address was provided, use QEMU's default of 0xE9 and reflect it in the domain XML. Signed-off-by: J=C3=A1n Tomko Reviewed-by: Nikolay Shirokovskiy --- src/qemu/qemu_domain.c | 9 +++++++++ .../isa-serial-debugcon.x86_64-latest.args | 2 +- tests/qemuxml2argvdata/isa-serial-debugcon.xml | 1 - tests/qemuxml2xmloutdata/isa-serial-debugcon.xml | 2 +- 4 files changed, 11 insertions(+), 3 deletions(-) diff --git a/src/qemu/qemu_domain.c b/src/qemu/qemu_domain.c index 9c4aedb009..7f8f8baa60 100644 --- a/src/qemu/qemu_domain.c +++ b/src/qemu/qemu_domain.c @@ -6554,6 +6554,15 @@ qemuDomainChrDefPostParse(virDomainChrDefPtr chr, } } =20 + if (chr->deviceType =3D=3D VIR_DOMAIN_CHR_DEVICE_TYPE_SERIAL && + chr->targetType =3D=3D VIR_DOMAIN_CHR_SERIAL_TARGET_TYPE_ISA && + chr->targetModel =3D=3D VIR_DOMAIN_CHR_SERIAL_TARGET_MODEL_DEBUGCO= N) { + if (chr->info.type =3D=3D VIR_DOMAIN_DEVICE_ADDRESS_TYPE_NONE) { + chr->info.type =3D VIR_DOMAIN_DEVICE_ADDRESS_TYPE_ISA; + chr->info.addr.isa.iobase =3D 0xE9; + } + } + return 0; } =20 diff --git a/tests/qemuxml2argvdata/isa-serial-debugcon.x86_64-latest.args = b/tests/qemuxml2argvdata/isa-serial-debugcon.x86_64-latest.args index f6a68277c4..c31c9910ff 100644 --- a/tests/qemuxml2argvdata/isa-serial-debugcon.x86_64-latest.args +++ b/tests/qemuxml2argvdata/isa-serial-debugcon.x86_64-latest.args @@ -24,7 +24,7 @@ file=3D/tmp/lib/domain--1-QEMUGuest1/master-key.aes \ -no-acpi \ -boot strict=3Don \ -chardev pipe,id=3Dcharserial0,path=3D/tmp/debugcon \ --device isa-debugcon,chardev=3Dcharserial0,id=3Dserial0,iobase=3D0x402 \ +-device isa-debugcon,chardev=3Dcharserial0,id=3Dserial0,iobase=3D0xe9 \ -sandbox on,obsolete=3Ddeny,elevateprivileges=3Ddeny,spawn=3Ddeny,\ resourcecontrol=3Ddeny \ -msg timestamp=3Don diff --git a/tests/qemuxml2argvdata/isa-serial-debugcon.xml b/tests/qemuxml= 2argvdata/isa-serial-debugcon.xml index 6c5de52585..2c66cd9915 100644 --- a/tests/qemuxml2argvdata/isa-serial-debugcon.xml +++ b/tests/qemuxml2argvdata/isa-serial-debugcon.xml @@ -15,7 +15,6 @@ -
diff --git a/tests/qemuxml2xmloutdata/isa-serial-debugcon.xml b/tests/qemux= ml2xmloutdata/isa-serial-debugcon.xml index 6ad7c3917c..4a575cac13 100644 --- a/tests/qemuxml2xmloutdata/isa-serial-debugcon.xml +++ b/tests/qemuxml2xmloutdata/isa-serial-debugcon.xml @@ -21,7 +21,7 @@ -
+
--=20 2.19.2 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list