From nobody Mon Feb 9 14:38:17 2026 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=fail(p=none dis=none) header.from=virtuozzo.com Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 154834111200296.8697311695164; Thu, 24 Jan 2019 06:45:12 -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 89BBBA0902; Thu, 24 Jan 2019 14:45:08 +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 31F016E3E6; Thu, 24 Jan 2019 14:45:08 +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 B3EC13F5D9; Thu, 24 Jan 2019 14:45:07 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id x0OETLIE023344 for ; Thu, 24 Jan 2019 09:29:21 -0500 Received: by smtp.corp.redhat.com (Postfix) id 6F8D05D738; Thu, 24 Jan 2019 14:29:21 +0000 (UTC) Received: from mx1.redhat.com (ext-mx04.extmail.prod.ext.phx2.redhat.com [10.5.110.28]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 66EA95D6A9 for ; Thu, 24 Jan 2019 14:29:17 +0000 (UTC) Received: from relay.sw.ru (relay.sw.ru [185.231.240.75]) (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 8A6DBDDB43 for ; Thu, 24 Jan 2019 14:29:14 +0000 (UTC) Received: from [10.94.3.220] (helo=dim-vz7.qa.sw.ru) by relay.sw.ru with esmtp (Exim 4.91) (envelope-from ) id 1gmg0G-0008Sq-2u for libvir-list@redhat.com; Thu, 24 Jan 2019 17:29:12 +0300 From: Nikolay Shirokovskiy To: libvir-list@redhat.com Date: Thu, 24 Jan 2019 17:28:59 +0300 Message-Id: <1548340140-561457-2-git-send-email-nshirokovskiy@virtuozzo.com> In-Reply-To: <1548340140-561457-1-git-send-email-nshirokovskiy@virtuozzo.com> References: <1548340140-561457-1-git-send-email-nshirokovskiy@virtuozzo.com> X-Greylist: Sender passed SPF test, ACL 242 matched, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.28]); Thu, 24 Jan 2019 14:29:15 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.28]); Thu, 24 Jan 2019 14:29:15 +0000 (UTC) for IP:'185.231.240.75' DOMAIN:'relay.sw.ru' HELO:'relay.sw.ru' FROM:'nshirokovskiy@virtuozzo.com' RCPT:'' X-RedHat-Spam-Score: -0.001 (SPF_PASS) 185.231.240.75 relay.sw.ru 185.231.240.75 relay.sw.ru X-Scanned-By: MIMEDefang 2.78 on 10.5.110.28 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH 1/2] conf: add debugcon-isa 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: , 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.39]); Thu, 24 Jan 2019 14:45:10 +0000 (UTC) Content-Type: text/plain; charset="utf-8" This interface can be used for example by firmware to print debug messages. Here is domain xml example:
Signed-off-by: Nikolay Shirokovskiy --- docs/formatdomain.html.in | 11 ++++++ docs/schemas/domaincommon.rng | 8 +++++ src/conf/domain_conf.c | 6 +++- src/conf/domain_conf.h | 1 + src/qemu/qemu_command.c | 3 ++ tests/qemuxml2argvdata/channel-debugcon-isa.xml | 34 +++++++++++++++++++ tests/qemuxml2xmloutdata/channel-debugcon-isa.xml | 41 +++++++++++++++++++= ++++ tests/qemuxml2xmltest.c | 1 + 8 files changed, 104 insertions(+), 1 deletion(-) create mode 100644 tests/qemuxml2argvdata/channel-debugcon-isa.xml create mode 100644 tests/qemuxml2xmloutdata/channel-debugcon-isa.xml diff --git a/docs/formatdomain.html.in b/docs/formatdomain.html.in index 7f07bb7..b760a9a 100644 --- a/docs/formatdomain.html.in +++ b/docs/formatdomain.html.in @@ -7305,6 +7305,12 @@ qemu-kvm -net nic,model=3D? /dev/null <channel type=3D'spicevmc'> <target type=3D'virtio' name=3D'com.redhat.spice.0'/> </channel> + + <channel type=3D'file'> + <source path=3D'/var/log/libvirt/qemu/VM.firmware.log'/> + <target type=3D'debugcon-isa'/> + <address type=3D'isa' iobase=3D'0x402'/> + </channel> </devices> ... =20 @@ -7369,6 +7375,11 @@ qemu-kvm -net nic,model=3D? /dev/null optional address element can tie the channel to a particular type=3D'virtio-serial' controller. Since 0.8.8 +
debugcon-isa
+
+ Debug console on isa bus. Address on bus is given by optional + address element. + Since 5.1.0
=20
Host interface
diff --git a/docs/schemas/domaincommon.rng b/docs/schemas/domaincommon.rng index aa50eac..595f073 100644 --- a/docs/schemas/domaincommon.rng +++ b/docs/schemas/domaincommon.rng @@ -4150,6 +4150,13 @@ + + + + debugcon-isa + + + @@ -4159,6 +4166,7 @@ + diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index f3d541b..af41e4e 100644 --- a/src/conf/domain_conf.c +++ b/src/conf/domain_conf.c @@ -458,7 +458,8 @@ VIR_ENUM_IMPL(virDomainChrChannelTarget, "none", "guestfwd", "virtio", - "xen") + "xen", + "debugcon-isa") =20 VIR_ENUM_IMPL(virDomainChrConsoleTarget, VIR_DOMAIN_CHR_CONSOLE_TARGET_TYPE_LAST, @@ -17230,6 +17231,9 @@ virDomainChrEquals(virDomainChrDefPtr src, sizeof(*src->target.addr)) =3D=3D 0; break; =20 + case VIR_DOMAIN_CHR_CHANNEL_TARGET_TYPE_DEBUGCON_ISA: + break; + case VIR_DOMAIN_CHR_CHANNEL_TARGET_TYPE_NONE: case VIR_DOMAIN_CHR_CHANNEL_TARGET_TYPE_LAST: /* shouldn't happen */ diff --git a/src/conf/domain_conf.h b/src/conf/domain_conf.h index 7776a3a..7319494 100644 --- a/src/conf/domain_conf.h +++ b/src/conf/domain_conf.h @@ -1106,6 +1106,7 @@ typedef enum { VIR_DOMAIN_CHR_CHANNEL_TARGET_TYPE_GUESTFWD, VIR_DOMAIN_CHR_CHANNEL_TARGET_TYPE_VIRTIO, VIR_DOMAIN_CHR_CHANNEL_TARGET_TYPE_XEN, + VIR_DOMAIN_CHR_CHANNEL_TARGET_TYPE_DEBUGCON_ISA, =20 VIR_DOMAIN_CHR_CHANNEL_TARGET_TYPE_LAST } virDomainChrChannelTargetType; diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c index 2fb7d32..e96b1a0 100644 --- a/src/qemu/qemu_command.c +++ b/src/qemu/qemu_command.c @@ -10787,6 +10787,9 @@ qemuBuildChannelChrDeviceStr(char **deviceStr, goto cleanup; break; =20 + case VIR_DOMAIN_CHR_CHANNEL_TARGET_TYPE_DEBUGCON_ISA: + break; + case VIR_DOMAIN_CHR_CHANNEL_TARGET_TYPE_XEN: case VIR_DOMAIN_CHR_CHANNEL_TARGET_TYPE_NONE: case VIR_DOMAIN_CHR_CHANNEL_TARGET_TYPE_LAST: diff --git a/tests/qemuxml2argvdata/channel-debugcon-isa.xml b/tests/qemuxm= l2argvdata/channel-debugcon-isa.xml new file mode 100644 index 0000000..d2d4904 --- /dev/null +++ b/tests/qemuxml2argvdata/channel-debugcon-isa.xml @@ -0,0 +1,34 @@ + + QEMUGuest1 + c7a5fdbd-edaf-9455-926a-d65c16db1809 + 219100 + 219100 + 1 + + hvm + + + + destroy + restart + destroy + + /usr/bin/qemu-system-i686 + + + +
+ + + + + + + +
+ + + + + + diff --git a/tests/qemuxml2xmloutdata/channel-debugcon-isa.xml b/tests/qemu= xml2xmloutdata/channel-debugcon-isa.xml new file mode 100644 index 0000000..bff97f5 --- /dev/null +++ b/tests/qemuxml2xmloutdata/channel-debugcon-isa.xml @@ -0,0 +1,41 @@ + + 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 82e2c0e..dde2332 100644 --- a/tests/qemuxml2xmltest.c +++ b/tests/qemuxml2xmltest.c @@ -464,6 +464,7 @@ mymain(void) DO_TEST("channel-guestfwd", NONE); DO_TEST("channel-virtio", NONE); DO_TEST("channel-virtio-state", NONE); + DO_TEST("channel-debugcon-isa", NONE); =20 DO_TEST_FULL("channel-unix-source-path", WHEN_INACTIVE, GIC_NONE, NONE= ); =20 --=20 1.8.3.1 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list