From nobody Sun May 5 16:00:50 2024
Delivered-To: importer@patchew.org
Received-SPF: pass (zohomail.com: domain of redhat.com designates
207.211.31.81 as permitted sender) client-ip=207.211.31.81;
envelope-from=libvir-list-bounces@redhat.com;
helo=us-smtp-delivery-1.mimecast.com;
Authentication-Results: mx.zohomail.com;
dkim=pass;
spf=pass (zohomail.com: domain of redhat.com designates 207.211.31.81 as
permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com
ARC-Seal: i=1; a=rsa-sha256; t=1588772224; cv=none;
d=zohomail.com; s=zohoarc;
b=ZGm4rtUe61T1RdazbSDWye1VjKCZD/fq3HxWM+CdYnCpDpLhOynAMWuRMy+wsOHCq9M+YVAgbPthG9nLB5hT7ddyyUD14H5cHZUIDEQl45ZSJjun7FeOi0tfa77kIYVvyEGiqMTCcxXL3zeDyraPsFclfwf/8FijW0RhRtqBfLY=
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com;
s=zohoarc;
t=1588772224;
h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To;
bh=L89knwvMDqknzszsexrIjyIYZaJXoU0MHC+jnXApxps=;
b=J2AIY+92VgjBj9mPSdOe/7ydCAxhOLDb8ilgmMnL0ZiGEKv6YrxmPlEutrOGMBGH0PM6SOQpQbgiNkrA0gYUqtFWzs3xOGrtJVPdlX0pxetVsit4s/ZpbT0IS3NZ2JOy7jGGTQlUIUJbcM2dUqWGtWsttTffyR5g47wsT5wjfPI=
ARC-Authentication-Results: i=1; mx.zohomail.com;
dkim=pass;
spf=pass (zohomail.com: domain of redhat.com designates 207.211.31.81 as
permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com
Return-Path:
Received: from us-smtp-delivery-1.mimecast.com (us-smtp-2.mimecast.com
[207.211.31.81]) by mx.zohomail.com
with SMTPS id 1588772224164633.0589118030133;
Wed, 6 May 2020 06:37:04 -0700 (PDT)
Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com
[209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id
us-mta-505-poo4p4mkOy-P2867Xwd1yQ-1; Wed, 06 May 2020 09:36:36 -0400
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 mimecast-mx01.redhat.com (Postfix) with ESMTPS id A1FBD464;
Wed, 6 May 2020 13:36:30 +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 74DA45C1D4;
Wed, 6 May 2020 13:36: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 287D74CAA8;
Wed, 6 May 2020 13:36:30 +0000 (UTC)
Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.rdu2.redhat.com
[10.11.54.6])
by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP
id 046DaDgv004749 for ;
Wed, 6 May 2020 09:36:13 -0400
Received: by smtp.corp.redhat.com (Postfix)
id 633B02156A23; Wed, 6 May 2020 13:36:13 +0000 (UTC)
Received: from mimecast-mx02.redhat.com
(mimecast03.extmail.prod.ext.rdu2.redhat.com [10.11.55.19])
by smtp.corp.redhat.com (Postfix) with ESMTPS id 5F0E32166B28
for ; Wed, 6 May 2020 13:36:10 +0000 (UTC)
Received: from us-smtp-1.mimecast.com (us-smtp-1.mimecast.com [207.211.31.81])
(using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits))
(No client certificate requested)
by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 749F680A0B6
for ; Wed, 6 May 2020 13:36:10 +0000 (UTC)
Received: from mail2.physik.tu-berlin.de (mail2.physik.tu-berlin.de
[130.149.50.125]) (Using TLS) by relay.mimecast.com with ESMTP id
us-mta-369-UaSRvXDYMsCVbmYt_mjX8Q-1; Wed, 06 May 2020 09:36:07 -0400
Received: from mail.physik.tu-berlin.de (mail.physik.tu-berlin.de
[130.149.50.25])
(using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits))
(No client certificate requested)
by mail2.physik.tu-berlin.de (Postfix) with ESMTPS id 3F42861F9A
for ; Wed, 6 May 2020 13:36:04 +0000 (UTC)
Received: from fnord.biz (static.19.87.4.46.clients.your-server.de
[46.4.87.19])
(using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits))
(No client certificate requested)
by mail.physik.tu-berlin.de (Postfix) with ESMTPSA id 1B2B761F92;
Wed, 6 May 2020 13:36:04 +0000 (UTC)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com;
s=mimecast20190719; t=1588772222;
h=from:from:sender:sender:reply-to:subject:subject:date:date:
message-id:message-id:to:to:cc:cc:mime-version:mime-version:
content-type:content-type:
content-transfer-encoding:content-transfer-encoding:
in-reply-to:in-reply-to:references:references:list-id:list-help:
list-unsubscribe:list-subscribe:list-post;
bh=L89knwvMDqknzszsexrIjyIYZaJXoU0MHC+jnXApxps=;
b=gyzMs6zn0Mx81dPbjbO8ncHYmaZg9rY9l3FlmftgerT/9eANQbnkrQGfggT95Nsg7XNNZP
vx9PzTGbHdWdIX6uecaMUDJ5m7eipo1AY3AyCh5xGrO7lVTUK5nbr7FFdXFQPn40NLe/Va
46Yo0Lqr+yAQ9Xg4bj11OtLXveoKZCM=
X-MC-Unique: poo4p4mkOy-P2867Xwd1yQ-1
X-MC-Unique: UaSRvXDYMsCVbmYt_mjX8Q-1
From: Fabian Freyer
To: libvir-list@redhat.com
Subject: [PATCH 1/4] bhyve: support parsing fbuf PCI device
Date: Wed, 6 May 2020 13:35:52 +0000
Message-Id: <20200506133555.40102-2-fabian.freyer@physik.tu-berlin.de>
In-Reply-To: <20200506133555.40102-1-fabian.freyer@physik.tu-berlin.de>
References: <20200506133555.40102-1-fabian.freyer@physik.tu-berlin.de>
MIME-Version: 1.0
X-Scanned-By: MIMEDefang 2.78 on 10.11.54.6
X-MIME-Autoconverted: from quoted-printable to 8bit by
lists01.pubmisc.prod.ext.phx2.redhat.com id 046DaDgv004749
X-loop: libvir-list@redhat.com
Cc: Fabian Freyer
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: ,
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-Mimecast-Spam-Score: 0
X-Mimecast-Originator: redhat.com
Content-Transfer-Encoding: quoted-printable
X-ZohoMail-DKIM: pass (identity @redhat.com)
Content-Type: text/plain; charset="utf-8"
Add a new helper function, bhyveParsePCIFbuf, to parse the bhyve-argv
parameters for a frame-buffer device to and
definitions.
For now, only the listen address, port, and vga mode are detected.
Unsupported parameters are silently skipped.
This involves upgrading the private API to expose the
virDomainGraphicsDefNew helper function, which is used by
bhyveParsePCIFbuf.
Signed-off-by: Fabian Freyer
---
src/bhyve/bhyve_parse_command.c | 91 ++++++++++++++++++-
src/libvirt_private.syms | 1 +
.../bhyveargv2xml-vnc-listen.args | 10 ++
.../bhyveargv2xml-vnc-listen.xml | 22 +++++
.../bhyveargv2xml-vnc-vga-io.args | 10 ++
.../bhyveargv2xml-vnc-vga-io.xml | 22 +++++
.../bhyveargv2xml-vnc-vga-off.args | 10 ++
.../bhyveargv2xml-vnc-vga-off.xml | 23 +++++
.../bhyveargv2xml-vnc-vga-on.args | 10 ++
.../bhyveargv2xml-vnc-vga-on.xml | 23 +++++
.../bhyveargv2xmldata/bhyveargv2xml-vnc.args | 10 ++
tests/bhyveargv2xmldata/bhyveargv2xml-vnc.xml | 22 +++++
tests/bhyveargv2xmltest.c | 5 +
13 files changed, 258 insertions(+), 1 deletion(-)
create mode 100644 tests/bhyveargv2xmldata/bhyveargv2xml-vnc-listen.args
create mode 100644 tests/bhyveargv2xmldata/bhyveargv2xml-vnc-listen.xml
create mode 100644 tests/bhyveargv2xmldata/bhyveargv2xml-vnc-vga-io.args
create mode 100644 tests/bhyveargv2xmldata/bhyveargv2xml-vnc-vga-io.xml
create mode 100644 tests/bhyveargv2xmldata/bhyveargv2xml-vnc-vga-off.args
create mode 100644 tests/bhyveargv2xmldata/bhyveargv2xml-vnc-vga-off.xml
create mode 100644 tests/bhyveargv2xmldata/bhyveargv2xml-vnc-vga-on.args
create mode 100644 tests/bhyveargv2xmldata/bhyveargv2xml-vnc-vga-on.xml
create mode 100644 tests/bhyveargv2xmldata/bhyveargv2xml-vnc.args
create mode 100644 tests/bhyveargv2xmldata/bhyveargv2xml-vnc.xml
diff --git a/src/bhyve/bhyve_parse_command.c b/src/bhyve/bhyve_parse_comman=
d.c
index 76423730d9..39cce67ea9 100644
--- a/src/bhyve/bhyve_parse_command.c
+++ b/src/bhyve/bhyve_parse_command.c
@@ -4,7 +4,7 @@
* Copyright (C) 2006-2016 Red Hat, Inc.
* Copyright (C) 2006 Daniel P. Berrange
* Copyright (c) 2011 NetApp, Inc.
- * Copyright (C) 2016 Fabian Freyer
+ * Copyright (C) 2020 Fabian Freyer
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
@@ -552,6 +552,93 @@ bhyveParsePCINet(virDomainDefPtr def,
return -1;
}
=20
+static int
+bhyveParsePCIFbuf(virDomainDefPtr def,
+ virDomainXMLOptionPtr xmlopt,
+ unsigned caps G_GNUC_UNUSED,
+ unsigned bus,
+ unsigned slot,
+ unsigned function,
+ const char *config)
+{
+ /* -s slot,fbuf,wait,vga=3Don|io|off,rfb=3D:port,w=3Dwidth,h=3Dhei=
ght */
+
+ virDomainVideoDefPtr video =3D NULL;
+ virDomainGraphicsDefPtr graphics =3D NULL;
+ char **params =3D NULL;
+ char *param =3D NULL, *separator =3D NULL;
+ size_t nparams =3D 0;
+ unsigned int i =3D 0;
+
+ if (!(video =3D virDomainVideoDefNew(xmlopt)))
+ goto cleanup;
+
+ if (!(graphics =3D virDomainGraphicsDefNew(xmlopt)))
+ goto cleanup;
+
+ graphics->type =3D VIR_DOMAIN_GRAPHICS_TYPE_VNC;
+ video->info.addr.pci.bus =3D bus;
+ video->info.addr.pci.slot =3D slot;
+ video->info.addr.pci.function =3D function;
+
+ if (!config)
+ goto error;
+
+ if (!(params =3D virStringSplitCount(config, ",", 0, &nparams)))
+ goto error;
+
+ for (i =3D 0; i < nparams; i++) {
+ param =3D params[i];
+ if (!video->driver && VIR_ALLOC(video->driver) < 0)
+ goto error;
+
+ if (STREQ(param, "vga=3Don"))
+ video->driver->vgaconf =3D VIR_DOMAIN_VIDEO_VGACONF_ON;
+
+ if (STREQ(param, "vga=3Dio"))
+ video->driver->vgaconf =3D VIR_DOMAIN_VIDEO_VGACONF_IO;
+
+ if (STREQ(param, "vga=3Doff"))
+ video->driver->vgaconf =3D VIR_DOMAIN_VIDEO_VGACONF_OFF;
+
+ if (STRPREFIX(param, "rfb=3D") || STRPREFIX(param, "tcp=3D")) {
+ /* fortunately, this is the same length as "tcp=3D" */
+ param +=3D strlen("rfb=3D");
+
+ if (!(separator =3D strchr(param, ':')))
+ goto error;
+
+ *separator =3D '\0';
+
+ if (separator !=3D param)
+ virDomainGraphicsListenAppendAddress(graphics, param);
+ else
+ /* Default to 127.0.0.1, just like bhyve does */
+ virDomainGraphicsListenAppendAddress(graphics, "127.0.0.1"=
);
+
+ param =3D ++separator;
+ if (virStrToLong_i(param, NULL, 10, &graphics->data.vnc.port))
+ goto error;
+ }
+ }
+
+ cleanup:
+ if (VIR_APPEND_ELEMENT(def->videos, def->nvideos, video) < 0)
+ goto error;
+
+ if (VIR_APPEND_ELEMENT(def->graphics, def->ngraphics, graphics) < 0)
+ goto error;
+
+ virStringListFree(params);
+ return 0;
+
+ error:
+ virDomainVideoDefFree(video);
+ virDomainGraphicsDefFree(graphics);
+ virStringListFree(params);
+ return -1;
+}
+
static int
bhyveParseBhyvePCIArg(virDomainDefPtr def,
virDomainXMLOptionPtr xmlopt,
@@ -614,6 +701,8 @@ bhyveParseBhyvePCIArg(virDomainDefPtr def,
else if (STREQ(emulation, "e1000"))
bhyveParsePCINet(def, xmlopt, caps, bus, slot, function,
VIR_DOMAIN_NET_MODEL_E1000, conf);
+ else if (STREQ(emulation, "fbuf"))
+ bhyveParsePCIFbuf(def, xmlopt, caps, bus, slot, function, conf);
=20
VIR_FREE(emulation);
VIR_FREE(slotdef);
diff --git a/src/libvirt_private.syms b/src/libvirt_private.syms
index 935ef7303b..6fed32bfb9 100644
--- a/src/libvirt_private.syms
+++ b/src/libvirt_private.syms
@@ -414,6 +414,7 @@ virDomainGraphicsAuthConnectedTypeFromString;
virDomainGraphicsAuthConnectedTypeToString;
virDomainGraphicsDefFree;
virDomainGraphicsDefHasOpenGL;
+virDomainGraphicsDefNew;
virDomainGraphicsGetListen;
virDomainGraphicsGetRenderNode;
virDomainGraphicsListenAppendAddress;
diff --git a/tests/bhyveargv2xmldata/bhyveargv2xml-vnc-listen.args b/tests/=
bhyveargv2xmldata/bhyveargv2xml-vnc-listen.args
new file mode 100644
index 0000000000..b97b64a0dc
--- /dev/null
+++ b/tests/bhyveargv2xmldata/bhyveargv2xml-vnc-listen.args
@@ -0,0 +1,10 @@
+/usr/sbin/bhyve \
+-c 1 \
+-m 214 \
+-u \
+-H \
+-P \
+-s 0:0,hostbridge \
+-l bootrom,/path/to/test.fd \
+-s 2:0,fbuf,tcp=3D1.2.3.4:5900 \
+-s 1,lpc bhyve
diff --git a/tests/bhyveargv2xmldata/bhyveargv2xml-vnc-listen.xml b/tests/b=
hyveargv2xmldata/bhyveargv2xml-vnc-listen.xml
new file mode 100644
index 0000000000..4ab17aef81
--- /dev/null
+++ b/tests/bhyveargv2xmldata/bhyveargv2xml-vnc-listen.xml
@@ -0,0 +1,22 @@
+
+ bhyve
+ c7a5fdbd-edaf-9455-926a-d65c16db1809
+ 219136
+ 219136
+ 1
+
+ hvm
+
+
+ destroy
+ destroy
+ destroy
+
+
+
+
+
+
+
diff --git a/tests/bhyveargv2xmldata/bhyveargv2xml-vnc-vga-io.args b/tests/=
bhyveargv2xmldata/bhyveargv2xml-vnc-vga-io.args
new file mode 100644
index 0000000000..f4c0067b79
--- /dev/null
+++ b/tests/bhyveargv2xmldata/bhyveargv2xml-vnc-vga-io.args
@@ -0,0 +1,10 @@
+/usr/sbin/bhyve \
+-c 1 \
+-m 214 \
+-u \
+-H \
+-P \
+-s 0:0,hostbridge \
+-l bootrom,/path/to/test.fd \
+-s 2:0,fbuf,tcp=3D:5900,vga=3Dio \
+-s 1,lpc bhyve
diff --git a/tests/bhyveargv2xmldata/bhyveargv2xml-vnc-vga-io.xml b/tests/b=
hyveargv2xmldata/bhyveargv2xml-vnc-vga-io.xml
new file mode 100644
index 0000000000..1e2f3d6938
--- /dev/null
+++ b/tests/bhyveargv2xmldata/bhyveargv2xml-vnc-vga-io.xml
@@ -0,0 +1,22 @@
+
+ bhyve
+ c7a5fdbd-edaf-9455-926a-d65c16db1809
+ 219136
+ 219136
+ 1
+
+ hvm
+
+
+ destroy
+ destroy
+ destroy
+
+
+
+
+
+
+
diff --git a/tests/bhyveargv2xmldata/bhyveargv2xml-vnc-vga-off.args b/tests=
/bhyveargv2xmldata/bhyveargv2xml-vnc-vga-off.args
new file mode 100644
index 0000000000..4bd5ed1027
--- /dev/null
+++ b/tests/bhyveargv2xmldata/bhyveargv2xml-vnc-vga-off.args
@@ -0,0 +1,10 @@
+/usr/sbin/bhyve \
+-c 1 \
+-m 214 \
+-u \
+-H \
+-P \
+-s 0:0,hostbridge \
+-l bootrom,/path/to/test.fd \
+-s 2:0,fbuf,tcp=3D:5900,vga=3Doff \
+-s 1,lpc bhyve
diff --git a/tests/bhyveargv2xmldata/bhyveargv2xml-vnc-vga-off.xml b/tests/=
bhyveargv2xmldata/bhyveargv2xml-vnc-vga-off.xml
new file mode 100644
index 0000000000..3c9c76e5aa
--- /dev/null
+++ b/tests/bhyveargv2xmldata/bhyveargv2xml-vnc-vga-off.xml
@@ -0,0 +1,23 @@
+
+ bhyve
+ c7a5fdbd-edaf-9455-926a-d65c16db1809
+ 219136
+ 219136
+ 1
+
+ hvm
+
+
+ destroy
+ destroy
+ destroy
+
+
+
+
+
+
+
diff --git a/tests/bhyveargv2xmldata/bhyveargv2xml-vnc-vga-on.args b/tests/=
bhyveargv2xmldata/bhyveargv2xml-vnc-vga-on.args
new file mode 100644
index 0000000000..d17f347a39
--- /dev/null
+++ b/tests/bhyveargv2xmldata/bhyveargv2xml-vnc-vga-on.args
@@ -0,0 +1,10 @@
+/usr/sbin/bhyve \
+-c 1 \
+-m 214 \
+-u \
+-H \
+-P \
+-s 0:0,hostbridge \
+-l bootrom,/path/to/test.fd \
+-s 2:0,fbuf,tcp=3D:5900,vga=3Don \
+-s 1,lpc bhyve
diff --git a/tests/bhyveargv2xmldata/bhyveargv2xml-vnc-vga-on.xml b/tests/b=
hyveargv2xmldata/bhyveargv2xml-vnc-vga-on.xml
new file mode 100644
index 0000000000..b83772c47a
--- /dev/null
+++ b/tests/bhyveargv2xmldata/bhyveargv2xml-vnc-vga-on.xml
@@ -0,0 +1,23 @@
+
+ bhyve
+ c7a5fdbd-edaf-9455-926a-d65c16db1809
+ 219136
+ 219136
+ 1
+
+ hvm
+
+
+ destroy
+ destroy
+ destroy
+
+
+
+
+
+
+
diff --git a/tests/bhyveargv2xmldata/bhyveargv2xml-vnc.args b/tests/bhyvear=
gv2xmldata/bhyveargv2xml-vnc.args
new file mode 100644
index 0000000000..fd4178f0a8
--- /dev/null
+++ b/tests/bhyveargv2xmldata/bhyveargv2xml-vnc.args
@@ -0,0 +1,10 @@
+/usr/sbin/bhyve \
+-c 1 \
+-m 214 \
+-u \
+-H \
+-P \
+-s 0:0,hostbridge \
+-l bootrom,/path/to/test.fd \
+-s 2:0,fbuf,tcp=3D:5900 \
+-s 1,lpc bhyve
diff --git a/tests/bhyveargv2xmldata/bhyveargv2xml-vnc.xml b/tests/bhyvearg=
v2xmldata/bhyveargv2xml-vnc.xml
new file mode 100644
index 0000000000..1e2f3d6938
--- /dev/null
+++ b/tests/bhyveargv2xmldata/bhyveargv2xml-vnc.xml
@@ -0,0 +1,22 @@
+
+ bhyve
+ c7a5fdbd-edaf-9455-926a-d65c16db1809
+ 219136
+ 219136
+ 1
+
+ hvm
+
+
+ destroy
+ destroy
+ destroy
+
+
+
+
+
+
+
diff --git a/tests/bhyveargv2xmltest.c b/tests/bhyveargv2xmltest.c
index 735cc4b338..88690ba304 100644
--- a/tests/bhyveargv2xmltest.c
+++ b/tests/bhyveargv2xmltest.c
@@ -194,6 +194,11 @@ mymain(void)
DO_TEST_FAIL("bhyveload-memsize-fail");
DO_TEST("bhyveload-bootorder");
DO_TEST_FAIL("extraargs");
+ DO_TEST("vnc");
+ DO_TEST("vnc-listen");
+ DO_TEST("vnc-vga-on");
+ DO_TEST("vnc-vga-off");
+ DO_TEST("vnc-vga-io");
=20
virObjectUnref(driver.caps);
virObjectUnref(driver.xmlopt);
--=20
2.19.2
From nobody Sun May 5 16:00:50 2024
Delivered-To: importer@patchew.org
Received-SPF: pass (zohomail.com: domain of redhat.com designates
205.139.110.120 as permitted sender) client-ip=205.139.110.120;
envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-1.mimecast.com;
Authentication-Results: mx.zohomail.com;
dkim=pass;
spf=pass (zohomail.com: domain of redhat.com designates 205.139.110.120 as
permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com
ARC-Seal: i=1; a=rsa-sha256; t=1588772187; cv=none;
d=zohomail.com; s=zohoarc;
b=J56j2FpsiajRNXTiJQ+DwEH0OAeVLWi5k+zSH/WKpzj5S/+d7pGay4J0YLsNQ8j9ndJdq2JTmOANSHibrfrAcOPkGv7Ws5UUQwvlVvWH/oVfllsccBRJ4RyfbpeSGnV+ExK4cKL/DLTWJE+X7jfzFke1yXQFXbHSf3jC8V4AURI=
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com;
s=zohoarc;
t=1588772187;
h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To;
bh=ZiQA251e9uGSI8MOhmZLxePQasi9XqRWfNpnXBFu0Kw=;
b=e07knuOrdjXB9K90sw8sJ9335AZYIIBPNPCa7zQjOvz+bvYdRc59nXCOHFVMl98I96h6jQnSsGy7k/NGXdmjgF5oYp3HONiC/D8yOl6F79vQCA7iKojhM76UjH7JGJeFtmWDf6NodzvVAM4HQmX//DfkCVyKHjio6y8ps+ePB1I=
ARC-Authentication-Results: i=1; mx.zohomail.com;
dkim=pass;
spf=pass (zohomail.com: domain of redhat.com designates 205.139.110.120 as
permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com
Return-Path:
Received: from us-smtp-1.mimecast.com (us-smtp-delivery-1.mimecast.com
[205.139.110.120]) by mx.zohomail.com
with SMTPS id 1588772186661418.29179020488573;
Wed, 6 May 2020 06:36:26 -0700 (PDT)
Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com
[209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id
us-mta-464-z4QokF7PNP-N6G84v6dlOg-1; Wed, 06 May 2020 09:36:22 -0400
Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com
[10.5.11.23])
(using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits))
(No client certificate requested)
by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 5BA52107B273;
Wed, 6 May 2020 13:36:17 +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 2D36127C39;
Wed, 6 May 2020 13:36:17 +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 411491809557;
Wed, 6 May 2020 13:36:13 +0000 (UTC)
Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.rdu2.redhat.com
[10.11.54.4])
by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP
id 046DaBBh004709 for ;
Wed, 6 May 2020 09:36:11 -0400
Received: by smtp.corp.redhat.com (Postfix)
id 600462028CD3; Wed, 6 May 2020 13:36:11 +0000 (UTC)
Received: from mimecast-mx02.redhat.com
(mimecast01.extmail.prod.ext.rdu2.redhat.com [10.11.55.17])
by smtp.corp.redhat.com (Postfix) with ESMTPS id 59FC02026D69
for ; Wed, 6 May 2020 13:36:09 +0000 (UTC)
Received: from us-smtp-1.mimecast.com (us-smtp-2.mimecast.com
[205.139.110.61])
(using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits))
(No client certificate requested)
by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 1351188855F
for ; Wed, 6 May 2020 13:36:09 +0000 (UTC)
Received: from mail2.physik.tu-berlin.de (mail2.physik.tu-berlin.de
[130.149.50.125]) (Using TLS) by relay.mimecast.com with ESMTP id
us-mta-180-l9iBqgQUMHSzgMv_MJwGaQ-1; Wed, 06 May 2020 09:36:06 -0400
Received: from mail.physik.tu-berlin.de (mail.physik.tu-berlin.de
[130.149.50.25])
(using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits))
(No client certificate requested)
by mail2.physik.tu-berlin.de (Postfix) with ESMTPS id 7862061F9E
for ; Wed, 6 May 2020 13:36:04 +0000 (UTC)
Received: from fnord.biz (static.19.87.4.46.clients.your-server.de
[46.4.87.19])
(using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits))
(No client certificate requested)
by mail.physik.tu-berlin.de (Postfix) with ESMTPSA id 4796661FA0;
Wed, 6 May 2020 13:36:04 +0000 (UTC)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com;
s=mimecast20190719; t=1588772185;
h=from:from:sender:sender:reply-to:subject:subject:date:date:
message-id:message-id:to:to:cc:cc:mime-version:mime-version:
content-type:content-type:
content-transfer-encoding:content-transfer-encoding:
in-reply-to:in-reply-to:references:references:list-id:list-help:
list-unsubscribe:list-subscribe:list-post;
bh=ZiQA251e9uGSI8MOhmZLxePQasi9XqRWfNpnXBFu0Kw=;
b=Dm6N88dn2KJstjMwRDGA7+HQw9Uv+d82ptZIwEPMiulprn4gGmyxby5BEFBmGxOjN3U2Pg
jwuH3Gu49MQpFuW723NxvbH8lNbmZtmiFmoKo/8CDDncn37Ly5oq+6ggqWvKQuhXWj5CmG
wtKSnChVXYzl2IuCgp6tG6olTfGgsg0=
X-MC-Unique: z4QokF7PNP-N6G84v6dlOg-1
X-MC-Unique: l9iBqgQUMHSzgMv_MJwGaQ-1
From: Fabian Freyer
To: libvir-list@redhat.com
Subject: [PATCH 2/4] bhyve: add support for setting fbuf resolution
Date: Wed, 6 May 2020 13:35:53 +0000
Message-Id: <20200506133555.40102-3-fabian.freyer@physik.tu-berlin.de>
In-Reply-To: <20200506133555.40102-1-fabian.freyer@physik.tu-berlin.de>
References: <20200506133555.40102-1-fabian.freyer@physik.tu-berlin.de>
MIME-Version: 1.0
X-Scanned-By: MIMEDefang 2.78 on 10.11.54.4
X-MIME-Autoconverted: from quoted-printable to 8bit by
lists01.pubmisc.prod.ext.phx2.redhat.com id 046DaBBh004709
X-loop: libvir-list@redhat.com
Cc: Fabian Freyer
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: ,
Sender: libvir-list-bounces@redhat.com
Errors-To: libvir-list-bounces@redhat.com
X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23
X-Mimecast-Spam-Score: 0
X-Mimecast-Originator: redhat.com
Content-Transfer-Encoding: quoted-printable
X-ZohoMail-DKIM: pass (identity @redhat.com)
Content-Type: text/plain; charset="utf-8"
The resolution of the VNC framebuffer can now be set via the resolution
definition introduced in 5.9.0.
Also, add "gop" to the list of model types the
sub-element is valid for.
Signed-off-by: Fabian Freyer
---
docs/formatdomain.html.in | 2 +-
docs/news.xml | 9 ++++++
src/bhyve/bhyve_command.c | 3 ++
src/bhyve/bhyve_parse_command.c | 20 +++++++++++++
.../bhyveargv2xml-vnc-resolution.args | 10 +++++++
.../bhyveargv2xml-vnc-resolution.xml | 24 ++++++++++++++++
tests/bhyveargv2xmltest.c | 1 +
.../bhyvexml2argv-vnc-resolution.args | 10 +++++++
.../bhyvexml2argv-vnc-resolution.ldargs | 1 +
.../bhyvexml2argv-vnc-resolution.xml | 20 +++++++++++++
tests/bhyvexml2argvtest.c | 1 +
.../bhyvexml2xmlout-vnc-resolution.xml | 28 +++++++++++++++++++
tests/bhyvexml2xmltest.c | 1 +
13 files changed, 129 insertions(+), 1 deletion(-)
create mode 100644 tests/bhyveargv2xmldata/bhyveargv2xml-vnc-resolution.ar=
gs
create mode 100644 tests/bhyveargv2xmldata/bhyveargv2xml-vnc-resolution.xml
create mode 100644 tests/bhyvexml2argvdata/bhyvexml2argv-vnc-resolution.ar=
gs
create mode 100644 tests/bhyvexml2argvdata/bhyvexml2argv-vnc-resolution.ld=
args
create mode 100644 tests/bhyvexml2argvdata/bhyvexml2argv-vnc-resolution.xml
create mode 100644 tests/bhyvexml2xmloutdata/bhyvexml2xmlout-vnc-resolutio=
n.xml
diff --git a/docs/formatdomain.html.in b/docs/formatdomain.html.in
index 23eb029234..06bbbf7fea 100644
--- a/docs/formatdomain.html.in
+++ b/docs/formatdomain.html.in
@@ -7543,7 +7543,7 @@ qemu-kvm -net nic,model=3D? /dev/null
element may also have an optional resolution
sub-elem=
ent.
The resolution
element has attributes x
=
and
y
to set the minimum resolution for the video device.=
This
- sub-element is valid for model types "vga", "qxl", "bochs", and
+ sub-element is valid for model types "vga", "qxl", "bochs", "gop",=
and
"virtio".
diff --git a/docs/news.xml b/docs/news.xml
index 4cef804aac..d728dfa93c 100644
--- a/docs/news.xml
+++ b/docs/news.xml
@@ -44,6 +44,15 @@
+
+
+ bhyve: support setting the framebuffer resolution
+
+
+ libvirt can now set the framebuffer's "w" and "h" parameters
+ using the resolution
element.
+
+
diff --git a/src/bhyve/bhyve_command.c b/src/bhyve/bhyve_command.c
index 5b1d80083a..db35cb9bd8 100644
--- a/src/bhyve/bhyve_command.c
+++ b/src/bhyve/bhyve_command.c
@@ -469,6 +469,9 @@ bhyveBuildGraphicsArgStr(const virDomainDef *def,
goto error;
}
=20
+ if (video->res)
+ virBufferAsprintf(&opt, ",w=3D%d,h=3D%d", video->res->x, video->re=
s->y);
+
if (video->driver)
virBufferAsprintf(&opt, ",vga=3D%s",
virDomainVideoVGAConfTypeToString(video->driver-=
>vgaconf));
diff --git a/src/bhyve/bhyve_parse_command.c b/src/bhyve/bhyve_parse_comman=
d.c
index 39cce67ea9..0414cb1ef1 100644
--- a/src/bhyve/bhyve_parse_command.c
+++ b/src/bhyve/bhyve_parse_command.c
@@ -620,6 +620,26 @@ bhyveParsePCIFbuf(virDomainDefPtr def,
if (virStrToLong_i(param, NULL, 10, &graphics->data.vnc.port))
goto error;
}
+
+ if (STRPREFIX(param, "w=3D")) {
+ param +=3D strlen("w=3D");
+
+ if (video->res =3D=3D NULL)
+ video->res =3D g_new0(virDomainVideoResolutionDef, 1);
+
+ if (virStrToLong_uip(param, NULL, 10, &video->res->x))
+ goto error;
+ }
+
+ if (STRPREFIX(param, "h=3D")) {
+ param +=3D strlen("h=3D");
+
+ if (video->res =3D=3D NULL)
+ video->res =3D g_new0(virDomainVideoResolutionDef, 1);
+
+ if (virStrToLong_uip(param, NULL, 10, &video->res->y))
+ goto error;
+ }
}
=20
cleanup:
diff --git a/tests/bhyveargv2xmldata/bhyveargv2xml-vnc-resolution.args b/te=
sts/bhyveargv2xmldata/bhyveargv2xml-vnc-resolution.args
new file mode 100644
index 0000000000..e5e2c0f2e8
--- /dev/null
+++ b/tests/bhyveargv2xmldata/bhyveargv2xml-vnc-resolution.args
@@ -0,0 +1,10 @@
+/usr/sbin/bhyve \
+-c 1 \
+-m 214 \
+-u \
+-H \
+-P \
+-s 0:0,hostbridge \
+-l bootrom,/path/to/test.fd \
+-s 2:0,fbuf,tcp=3D127.0.0.1:5904,w=3D1920,h=3D1080 \
+-s 1,lpc bhyve
diff --git a/tests/bhyveargv2xmldata/bhyveargv2xml-vnc-resolution.xml b/tes=
ts/bhyveargv2xmldata/bhyveargv2xml-vnc-resolution.xml
new file mode 100644
index 0000000000..f8fa0ed1ce
--- /dev/null
+++ b/tests/bhyveargv2xmldata/bhyveargv2xml-vnc-resolution.xml
@@ -0,0 +1,24 @@
+
+ bhyve
+ c7a5fdbd-edaf-9455-926a-d65c16db1809
+ 219136
+ 219136
+ 1
+
+ hvm
+
+
+ destroy
+ destroy
+ destroy
+
+
+
+
+
+
+
diff --git a/tests/bhyveargv2xmltest.c b/tests/bhyveargv2xmltest.c
index 88690ba304..09d14e3fd0 100644
--- a/tests/bhyveargv2xmltest.c
+++ b/tests/bhyveargv2xmltest.c
@@ -199,6 +199,7 @@ mymain(void)
DO_TEST("vnc-vga-on");
DO_TEST("vnc-vga-off");
DO_TEST("vnc-vga-io");
+ DO_TEST("vnc-resolution");
=20
virObjectUnref(driver.caps);
virObjectUnref(driver.xmlopt);
diff --git a/tests/bhyvexml2argvdata/bhyvexml2argv-vnc-resolution.args b/te=
sts/bhyvexml2argvdata/bhyvexml2argv-vnc-resolution.args
new file mode 100644
index 0000000000..e5e2c0f2e8
--- /dev/null
+++ b/tests/bhyvexml2argvdata/bhyvexml2argv-vnc-resolution.args
@@ -0,0 +1,10 @@
+/usr/sbin/bhyve \
+-c 1 \
+-m 214 \
+-u \
+-H \
+-P \
+-s 0:0,hostbridge \
+-l bootrom,/path/to/test.fd \
+-s 2:0,fbuf,tcp=3D127.0.0.1:5904,w=3D1920,h=3D1080 \
+-s 1,lpc bhyve
diff --git a/tests/bhyvexml2argvdata/bhyvexml2argv-vnc-resolution.ldargs b/=
tests/bhyvexml2argvdata/bhyvexml2argv-vnc-resolution.ldargs
new file mode 100644
index 0000000000..421376db9e
--- /dev/null
+++ b/tests/bhyvexml2argvdata/bhyvexml2argv-vnc-resolution.ldargs
@@ -0,0 +1 @@
+dummy
diff --git a/tests/bhyvexml2argvdata/bhyvexml2argv-vnc-resolution.xml b/tes=
ts/bhyvexml2argvdata/bhyvexml2argv-vnc-resolution.xml
new file mode 100644
index 0000000000..637a121fb7
--- /dev/null
+++ b/tests/bhyvexml2argvdata/bhyvexml2argv-vnc-resolution.xml
@@ -0,0 +1,20 @@
+
+ bhyve
+ df3be7e7-a104-11e3-aeb0-50e5492bd3dc
+ 219136
+ 1
+
+ hvm
+ /path/to/test.fd
+
+
+
+
+
+
+
+
diff --git a/tests/bhyvexml2argvtest.c b/tests/bhyvexml2argvtest.c
index 9e7eb218b8..b948f740bd 100644
--- a/tests/bhyvexml2argvtest.c
+++ b/tests/bhyvexml2argvtest.c
@@ -206,6 +206,7 @@ mymain(void)
DO_TEST("vnc-vgaconf-off");
DO_TEST("vnc-vgaconf-io");
DO_TEST("vnc-autoport");
+ DO_TEST("vnc-resolution");
DO_TEST("cputopology");
DO_TEST_FAILURE("cputopology-nvcpu-mismatch");
DO_TEST("commandline");
diff --git a/tests/bhyvexml2xmloutdata/bhyvexml2xmlout-vnc-resolution.xml b=
/tests/bhyvexml2xmloutdata/bhyvexml2xmlout-vnc-resolution.xml
new file mode 100644
index 0000000000..958da4f82c
--- /dev/null
+++ b/tests/bhyvexml2xmloutdata/bhyvexml2xmlout-vnc-resolution.xml
@@ -0,0 +1,28 @@
+
+ bhyve
+ df3be7e7-a104-11e3-aeb0-50e5492bd3dc
+ 219136
+ 219136
+ 1
+
+ hvm
+ /path/to/test.fd
+
+
+
+ destroy
+ restart
+ destroy
+
+
+
+
+
+
+
+
diff --git a/tests/bhyvexml2xmltest.c b/tests/bhyvexml2xmltest.c
index a0c20a14c1..f6e4d44b8a 100644
--- a/tests/bhyvexml2xmltest.c
+++ b/tests/bhyvexml2xmltest.c
@@ -108,6 +108,7 @@ mymain(void)
DO_TEST_DIFFERENT("vnc-vgaconf-off");
DO_TEST_DIFFERENT("vnc-vgaconf-io");
DO_TEST_DIFFERENT("vnc-autoport");
+ DO_TEST_DIFFERENT("vnc-resolution");
DO_TEST_DIFFERENT("commandline");
DO_TEST_DIFFERENT("msrs");
=20
--=20
2.19.2
From nobody Sun May 5 16:00:50 2024
Delivered-To: importer@patchew.org
Received-SPF: pass (zohomail.com: domain of redhat.com designates
205.139.110.61 as permitted sender) client-ip=205.139.110.61;
envelope-from=libvir-list-bounces@redhat.com;
helo=us-smtp-delivery-1.mimecast.com;
Authentication-Results: mx.zohomail.com;
dkim=pass;
spf=pass (zohomail.com: domain of redhat.com designates 205.139.110.61 as
permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com
ARC-Seal: i=1; a=rsa-sha256; t=1588772187; cv=none;
d=zohomail.com; s=zohoarc;
b=YqpP12dozLlTsg7viUpm09ePOVTbHfuLiSt/U2LcXQ0DsLRLFuzy0lnUDxg8Ia0jo113QH3sZSXU7wdmJhClbybjhf+/ByUH1Tf2hIv21dD2oUhckEOPN6I0vIynfxmE9Ycc5kDdIRDhuALUsGh3CRQ+uxBe6GO86zL2ommg1RQ=
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com;
s=zohoarc;
t=1588772187;
h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To;
bh=Vt5HWT/VomLFRonC5lo+kFJoAVsHoIugKOMc7fzBz+0=;
b=JTSjeVLZEtVDyfSj/yigF3dQdpJGstkgDEV6VO8i6d7q0bhBYB0eOoNrawqW2Yrc182pwdEJow+KgnnD+7910Q+Kh88ZtMX0li15Cdj0xmuLh+BpPP3vLgug8fJDU6ITNw/6Xfp3Zs9OWhECA9vIG9FhH9tcolFJKj1o4zK40RI=
ARC-Authentication-Results: i=1; mx.zohomail.com;
dkim=pass;
spf=pass (zohomail.com: domain of redhat.com designates 205.139.110.61 as
permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com
Return-Path:
Received: from us-smtp-delivery-1.mimecast.com (us-smtp-2.mimecast.com
[205.139.110.61]) by mx.zohomail.com
with SMTPS id 1588772187132915.9601500924434;
Wed, 6 May 2020 06:36:27 -0700 (PDT)
Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com
[209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id
us-mta-224-qRZjR9IBOxSxy80YIuy_GA-1; Wed, 06 May 2020 09:36:22 -0400
Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com
[10.5.11.22])
(using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits))
(No client certificate requested)
by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 5A6FD1895A33;
Wed, 6 May 2020 13:36:17 +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 24AC41001925;
Wed, 6 May 2020 13:36:16 +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 353A41809554;
Wed, 6 May 2020 13:36:13 +0000 (UTC)
Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.rdu2.redhat.com
[10.11.54.4])
by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP
id 046DaBRV004711 for ;
Wed, 6 May 2020 09:36:11 -0400
Received: by smtp.corp.redhat.com (Postfix)
id 88DAE2029F6F; Wed, 6 May 2020 13:36:11 +0000 (UTC)
Received: from mimecast-mx02.redhat.com
(mimecast04.extmail.prod.ext.rdu2.redhat.com [10.11.55.20])
by smtp.corp.redhat.com (Postfix) with ESMTPS id 856C92026D69
for ; Wed, 6 May 2020 13:36:09 +0000 (UTC)
Received: from us-smtp-1.mimecast.com (us-smtp-1.mimecast.com
[205.139.110.61])
(using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits))
(No client certificate requested)
by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 63637108C26D
for ; Wed, 6 May 2020 13:36:09 +0000 (UTC)
Received: from mail2.physik.tu-berlin.de (mail2.physik.tu-berlin.de
[130.149.50.125]) (Using TLS) by relay.mimecast.com with ESMTP id
us-mta-88-cf6T_UZcNnKA2gT7O_VloA-1; Wed, 06 May 2020 09:36:06 -0400
Received: from mail.physik.tu-berlin.de (mail.physik.tu-berlin.de
[130.149.50.25])
(using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits))
(No client certificate requested)
by mail2.physik.tu-berlin.de (Postfix) with ESMTPS id B2D0161F9F
for ; Wed, 6 May 2020 13:36:04 +0000 (UTC)
Received: from fnord.biz (static.19.87.4.46.clients.your-server.de
[46.4.87.19])
(using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits))
(No client certificate requested)
by mail.physik.tu-berlin.de (Postfix) with ESMTPSA id 8226E61FA1;
Wed, 6 May 2020 13:36:04 +0000 (UTC)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com;
s=mimecast20190719; t=1588772185;
h=from:from:sender:sender:reply-to:subject:subject:date:date:
message-id:message-id:to:to:cc:cc:mime-version:mime-version:
content-type:content-type:
content-transfer-encoding:content-transfer-encoding:
in-reply-to:in-reply-to:references:references:list-id:list-help:
list-unsubscribe:list-subscribe:list-post;
bh=Vt5HWT/VomLFRonC5lo+kFJoAVsHoIugKOMc7fzBz+0=;
b=XZgldvRJgh7K8W4I6cjcRfcy3PGifd7JVOGvArleIVGANUW/I9Plm9cjGHSr8q8t/BHSZm
MSoo80aAM7/aO4uUYqJt56y7w7P0TFriwnY+Ngg2YH7qPT/3yT4BgdEcckDhACvA02tS8C
nUi+tbJzNncxBGv0Rsp3F3VaKNciQm0=
X-MC-Unique: qRZjR9IBOxSxy80YIuy_GA-1
X-MC-Unique: cf6T_UZcNnKA2gT7O_VloA-1
From: Fabian Freyer
To: libvir-list@redhat.com
Subject: [PATCH 3/4] bhyve: probe for VNC password capability
Date: Wed, 6 May 2020 13:35:54 +0000
Message-Id: <20200506133555.40102-4-fabian.freyer@physik.tu-berlin.de>
In-Reply-To: <20200506133555.40102-1-fabian.freyer@physik.tu-berlin.de>
References: <20200506133555.40102-1-fabian.freyer@physik.tu-berlin.de>
MIME-Version: 1.0
X-Scanned-By: MIMEDefang 2.78 on 10.11.54.4
X-MIME-Autoconverted: from quoted-printable to 8bit by
lists01.pubmisc.prod.ext.phx2.redhat.com id 046DaBRV004711
X-loop: libvir-list@redhat.com
Cc: Fabian Freyer
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: ,
Sender: libvir-list-bounces@redhat.com
Errors-To: libvir-list-bounces@redhat.com
X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22
X-Mimecast-Spam-Score: 0
X-Mimecast-Originator: redhat.com
Content-Transfer-Encoding: quoted-printable
X-ZohoMail-DKIM: pass (identity @redhat.com)
Content-Type: text/plain; charset="utf-8"
Introduces the BHYVE_CAP_VNC_PASSWORD capability, which is probed by
parsing the error message from the bhyve command. When it is not
supported, bhyve -s 0,fbuf,password=3D will return an error message.
Signed-off-by: Fabian Freyer
---
src/bhyve/bhyve_capabilities.c | 16 +++++++++++++++-
src/bhyve/bhyve_capabilities.h | 1 +
2 files changed, 16 insertions(+), 1 deletion(-)
diff --git a/src/bhyve/bhyve_capabilities.c b/src/bhyve/bhyve_capabilities.c
index fb8829d571..59783f8576 100644
--- a/src/bhyve/bhyve_capabilities.c
+++ b/src/bhyve/bhyve_capabilities.c
@@ -3,7 +3,7 @@
*
* Copyright (C) 2014 Roman Bogorodskiy
* Copyright (C) 2014 Semihalf
- * Copyright (C) 2016 Fabian Freyer
+ * Copyright (C) 2020 Fabian Freyer
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
@@ -323,6 +323,17 @@ bhyveProbeCapsXHCIController(unsigned int *caps, char =
*binary)
}
=20
=20
+static int
+bhyveProbeCapsVNCPassword(unsigned int *caps, char *binary)
+{
+ return bhyveProbeCapsDeviceHelper(caps, binary,
+ "-s",
+ "0,fbuf,password=3D",
+ "Invalid fbuf emulation \"password\"=
",
+ BHYVE_CAP_VNC_PASSWORD);
+}
+
+
int
virBhyveProbeCaps(unsigned int *caps)
{
@@ -351,6 +362,9 @@ virBhyveProbeCaps(unsigned int *caps)
if ((ret =3D bhyveProbeCapsXHCIController(caps, binary)))
goto out;
=20
+ if ((ret =3D bhyveProbeCapsVNCPassword(caps, binary)))
+ goto out;
+
out:
VIR_FREE(binary);
return ret;
diff --git a/src/bhyve/bhyve_capabilities.h b/src/bhyve/bhyve_capabilities.h
index 12926cf423..89f4b0308e 100644
--- a/src/bhyve/bhyve_capabilities.h
+++ b/src/bhyve/bhyve_capabilities.h
@@ -49,6 +49,7 @@ typedef enum {
BHYVE_CAP_FBUF =3D 1 << 4,
BHYVE_CAP_XHCI =3D 1 << 5,
BHYVE_CAP_CPUTOPOLOGY =3D 1 << 6,
+ BHYVE_CAP_VNC_PASSWORD =3D 1 << 7,
} virBhyveCapsFlags;
=20
int virBhyveProbeGrubCaps(virBhyveGrubCapsFlags *caps);
--=20
2.19.2
From nobody Sun May 5 16:00:50 2024
Delivered-To: importer@patchew.org
Received-SPF: pass (zohomail.com: domain of redhat.com designates
207.211.31.81 as permitted sender) client-ip=207.211.31.81;
envelope-from=libvir-list-bounces@redhat.com;
helo=us-smtp-delivery-1.mimecast.com;
Authentication-Results: mx.zohomail.com;
dkim=pass;
spf=pass (zohomail.com: domain of redhat.com designates 207.211.31.81 as
permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com
ARC-Seal: i=1; a=rsa-sha256; t=1588772198; cv=none;
d=zohomail.com; s=zohoarc;
b=ABWRbbbcdiXHXS9gWU6ckumysDWe9+nM5YzU1xPH/gs6UNpuTF4gCrmNIx6I9RajM10crnTDUktgJjbZYlYqs3xBzYPUB3edRZyAP3uPE5efasIOjHTE4aXXwrkz2m18WobsjhLOGIY02y7aBa0U+x2cdocYr3jQ9NAWRHmXzXo=
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com;
s=zohoarc;
t=1588772198;
h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To;
bh=mv4n2iPsHNc2soNfqFxW4Xg5T3kOtdvDJFDX4XOBLgg=;
b=VICWEuLQSHuMd5bRgPp1aNpOd1K9hdh3qnBlrlAqrpFGrmR6JeA5OyYfaLiBw4FS/BRKcps3V9AdXNb5vuMdbrPmDHNey9qAEGUxc9dnNPTBDL15kPRNPDZLsGUyCcSdzjVtAgLgbTvRCB23JkWs+eeqs7G+69+mJsivZutXwU0=
ARC-Authentication-Results: i=1; mx.zohomail.com;
dkim=pass;
spf=pass (zohomail.com: domain of redhat.com designates 207.211.31.81 as
permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com
Return-Path:
Received: from us-smtp-delivery-1.mimecast.com (us-smtp-2.mimecast.com
[207.211.31.81]) by mx.zohomail.com
with SMTPS id 1588772198413582.3363198142064;
Wed, 6 May 2020 06:36:38 -0700 (PDT)
Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com
[209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id
us-mta-197-YyJHGgLwNXqTh7sMFcylng-1; Wed, 06 May 2020 09:36:34 -0400
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 mimecast-mx01.redhat.com (Postfix) with ESMTPS id 0DD24108597F;
Wed, 6 May 2020 13:36: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 D25316918A;
Wed, 6 May 2020 13:36:28 +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 763EE18095FF;
Wed, 6 May 2020 13:36:28 +0000 (UTC)
Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.rdu2.redhat.com
[10.11.54.5])
by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP
id 046DaBtN004710 for ;
Wed, 6 May 2020 09:36:11 -0400
Received: by smtp.corp.redhat.com (Postfix)
id 704B3F18BD; Wed, 6 May 2020 13:36:11 +0000 (UTC)
Received: from mimecast-mx02.redhat.com
(mimecast01.extmail.prod.ext.rdu2.redhat.com [10.11.55.17])
by smtp.corp.redhat.com (Postfix) with ESMTPS id 6BFE7F18D2
for ; Wed, 6 May 2020 13:36:09 +0000 (UTC)
Received: from us-smtp-1.mimecast.com (us-smtp-2.mimecast.com [207.211.31.81])
(using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits))
(No client certificate requested)
by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 5F895888560
for ; Wed, 6 May 2020 13:36:09 +0000 (UTC)
Received: from mail2.physik.tu-berlin.de (mail2.physik.tu-berlin.de
[130.149.50.125]) (Using TLS) by relay.mimecast.com with ESMTP id
us-mta-141-Oqy-rRABOZycOFwEyPb5iw-1; Wed, 06 May 2020 09:36:07 -0400
Received: from mail.physik.tu-berlin.de (mail.physik.tu-berlin.de
[130.149.50.25])
(using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits))
(No client certificate requested)
by mail2.physik.tu-berlin.de (Postfix) with ESMTPS id 86E4E61F9C
for ; Wed, 6 May 2020 13:36:05 +0000 (UTC)
Received: from fnord.biz (static.19.87.4.46.clients.your-server.de
[46.4.87.19])
(using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits))
(No client certificate requested)
by mail.physik.tu-berlin.de (Postfix) with ESMTPSA id 694B361F9D;
Wed, 6 May 2020 13:36:04 +0000 (UTC)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com;
s=mimecast20190719; t=1588772197;
h=from:from:sender:sender:reply-to:subject:subject:date:date:
message-id:message-id:to:to:cc:cc:mime-version:mime-version:
content-type:content-type:
content-transfer-encoding:content-transfer-encoding:
in-reply-to:in-reply-to:references:references:list-id:list-help:
list-unsubscribe:list-subscribe:list-post;
bh=mv4n2iPsHNc2soNfqFxW4Xg5T3kOtdvDJFDX4XOBLgg=;
b=GMzsVdzqjhEmYPo6y/6ey2F+oizNHt/UNnZaabQeRB63/TdrwP8NutHvxZzhDPh7Wl5InG
J4FQFekTCk0XWTIyKHbRUeDXPoUlt7Z02SQujA0rCj9v9/3rC3zszFvWnCUo0eHvhoLyRl
ngd0DB6+iMmQfZgrdkxYuYaqcAlneNg=
X-MC-Unique: YyJHGgLwNXqTh7sMFcylng-1
X-MC-Unique: Oqy-rRABOZycOFwEyPb5iw-1
From: Fabian Freyer
To: libvir-list@redhat.com
Subject: [PATCH 4/4] bhyve: add VNC password support
Date: Wed, 6 May 2020 13:35:55 +0000
Message-Id: <20200506133555.40102-5-fabian.freyer@physik.tu-berlin.de>
In-Reply-To: <20200506133555.40102-1-fabian.freyer@physik.tu-berlin.de>
References: <20200506133555.40102-1-fabian.freyer@physik.tu-berlin.de>
MIME-Version: 1.0
X-Scanned-By: MIMEDefang 2.79 on 10.11.54.5
X-MIME-Autoconverted: from quoted-printable to 8bit by
lists01.pubmisc.prod.ext.phx2.redhat.com id 046DaBtN004710
X-loop: libvir-list@redhat.com
Cc: Fabian Freyer
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: ,
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-Mimecast-Spam-Score: 0
X-Mimecast-Originator: redhat.com
Content-Transfer-Encoding: quoted-printable
X-ZohoMail-DKIM: pass (identity @redhat.com)
Content-Type: text/plain; charset="utf-8"
Support setting a password for the VNC framebuffer using the passwd
attribute on the element, if the driver has the
BHYVE_CAP_VNC_PASSWORD capability.
Note that virsh domxml-from-native does not output the password in the
generated XML, as VIR_DOMAIN_DEF_FORMAT_SECURE is not set when
formatting the domain definition.
Signed-off-by: Fabian Freyer
---
docs/news.xml | 11 +++++
src/bhyve/bhyve_command.c | 33 ++++++++++-----
src/bhyve/bhyve_parse_command.c | 5 +++
.../bhyveargv2xml-vnc-password.args | 10 +++++
.../bhyveargv2xml-vnc-password.xml | 22 ++++++++++
tests/bhyveargv2xmltest.c | 3 +-
.../bhyvexml2argv-vnc-password-comma.xml | 26 ++++++++++++
.../bhyvexml2argv-vnc-password.args | 12 ++++++
.../bhyvexml2argv-vnc-password.ldargs | 1 +
.../bhyvexml2argv-vnc-password.xml | 26 ++++++++++++
tests/bhyvexml2argvtest.c | 7 +++-
.../bhyvexml2xmlout-vnc-password.xml | 41 +++++++++++++++++++
tests/bhyvexml2xmltest.c | 1 +
13 files changed, 185 insertions(+), 13 deletions(-)
create mode 100644 tests/bhyveargv2xmldata/bhyveargv2xml-vnc-password.args
create mode 100644 tests/bhyveargv2xmldata/bhyveargv2xml-vnc-password.xml
create mode 100644 tests/bhyvexml2argvdata/bhyvexml2argv-vnc-password-comm=
a.xml
create mode 100644 tests/bhyvexml2argvdata/bhyvexml2argv-vnc-password.args
create mode 100644 tests/bhyvexml2argvdata/bhyvexml2argv-vnc-password.ldar=
gs
create mode 100644 tests/bhyvexml2argvdata/bhyvexml2argv-vnc-password.xml
create mode 100644 tests/bhyvexml2xmloutdata/bhyvexml2xmlout-vnc-password.=
xml
diff --git a/docs/news.xml b/docs/news.xml
index d728dfa93c..bd951c2e04 100644
--- a/docs/news.xml
+++ b/docs/news.xml
@@ -44,6 +44,17 @@
+
+
+ bhyve: support VNC password authentication
+
+
+ libvirt can now probe whether the bhyve binary supports
+ VNC password authentication. In case it does, a VNC password
+ can now be passed using the passwd
attribute on
+ the graphics
element.
+
+
bhyve: support setting the framebuffer resolution
diff --git a/src/bhyve/bhyve_command.c b/src/bhyve/bhyve_command.c
index db35cb9bd8..369278214c 100644
--- a/src/bhyve/bhyve_command.c
+++ b/src/bhyve/bhyve_command.c
@@ -425,17 +425,6 @@ bhyveBuildGraphicsArgStr(const virDomainDef *def,
goto error;
}
=20
- if (graphics->data.vnc.auth.passwd) {
- virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
- _("vnc password auth not supported"));
- goto error;
- } else {
- /* Bhyve doesn't support VNC Auth yet, so print a warning abo=
ut
- * unauthenticated VNC sessions */
- VIR_WARN("%s", _("Security warning: currently VNC auth is not"
- " supported."));
- }
-
if (glisten->address) {
escapeAddr =3D strchr(glisten->address, ':') !=3D NULL;
if (escapeAddr)
@@ -469,6 +458,28 @@ bhyveBuildGraphicsArgStr(const virDomainDef *def,
goto error;
}
=20
+ if (graphics->data.vnc.auth.passwd) {
+ if (!(bhyveDriverGetBhyveCaps(driver) & BHYVE_CAP_VNC_PASSWORD)) {
+ virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
+ _("VNC Passwort authentication not supported "
+ "by bhyve"));
+ goto error;
+ }
+
+ if (strchr(graphics->data.vnc.auth.passwd, ',')) {
+ virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
+ _("Password may not contain ',' character"));
+ goto error;
+ }
+
+ virBufferAsprintf(&opt, ",password=3D%s", graphics->data.vnc.auth.=
passwd);
+ } else {
+ if (!(bhyveDriverGetBhyveCaps(driver) & BHYVE_CAP_VNC_PASSWORD))
+ VIR_WARN("%s", _("Security warning: VNC auth is not supported.=
"));
+ else
+ VIR_WARN("%s", _("Security warning: VNC is used without authen=
tication."));
+ }
+
if (video->res)
virBufferAsprintf(&opt, ",w=3D%d,h=3D%d", video->res->x, video->re=
s->y);
=20
diff --git a/src/bhyve/bhyve_parse_command.c b/src/bhyve/bhyve_parse_comman=
d.c
index 0414cb1ef1..af990f8e51 100644
--- a/src/bhyve/bhyve_parse_command.c
+++ b/src/bhyve/bhyve_parse_command.c
@@ -640,6 +640,11 @@ bhyveParsePCIFbuf(virDomainDefPtr def,
if (virStrToLong_uip(param, NULL, 10, &video->res->y))
goto error;
}
+
+ if (STRPREFIX(param, "password=3D")) {
+ param +=3D strlen("password=3D");
+ graphics->data.vnc.auth.passwd =3D g_strdup(param);
+ }
}
=20
cleanup:
diff --git a/tests/bhyveargv2xmldata/bhyveargv2xml-vnc-password.args b/test=
s/bhyveargv2xmldata/bhyveargv2xml-vnc-password.args
new file mode 100644
index 0000000000..c16e970795
--- /dev/null
+++ b/tests/bhyveargv2xmldata/bhyveargv2xml-vnc-password.args
@@ -0,0 +1,10 @@
+/usr/sbin/bhyve \
+-c 1 \
+-m 214 \
+-u \
+-H \
+-P \
+-s 0:0,hostbridge \
+-l bootrom,/path/to/test.fd \
+-s 4:0,fbuf,tcp=3D127.0.0.1:5904,password=3Ds3cr3t \
+-s 1,lpc bhyve
diff --git a/tests/bhyveargv2xmldata/bhyveargv2xml-vnc-password.xml b/tests=
/bhyveargv2xmldata/bhyveargv2xml-vnc-password.xml
new file mode 100644
index 0000000000..456a1ee9e3
--- /dev/null
+++ b/tests/bhyveargv2xmldata/bhyveargv2xml-vnc-password.xml
@@ -0,0 +1,22 @@
+
+ bhyve
+ c7a5fdbd-edaf-9455-926a-d65c16db1809
+ 219136
+ 219136
+ 1
+
+ hvm
+
+
+ destroy
+ destroy
+ destroy
+
+
+
+
+
+
+
diff --git a/tests/bhyveargv2xmltest.c b/tests/bhyveargv2xmltest.c
index 09d14e3fd0..5ec8c7f22a 100644
--- a/tests/bhyveargv2xmltest.c
+++ b/tests/bhyveargv2xmltest.c
@@ -77,7 +77,7 @@ testCompareXMLToArgvFiles(const char *xmlfile,
goto fail;
}
=20
- if (vmdef && !(actualxml =3D virDomainDefFormat(vmdef, driver.xmlopt, =
0)))
+ if (vmdef && !(actualxml =3D virDomainDefFormat(vmdef, driver.xmlopt, =
VIR_DOMAIN_DEF_FORMAT_SECURE)))
goto fail;
=20
if (vmdef && virTestCompareToFile(actualxml, xmlfile) < 0)
@@ -200,6 +200,7 @@ mymain(void)
DO_TEST("vnc-vga-off");
DO_TEST("vnc-vga-io");
DO_TEST("vnc-resolution");
+ DO_TEST("vnc-password");
=20
virObjectUnref(driver.caps);
virObjectUnref(driver.xmlopt);
diff --git a/tests/bhyvexml2argvdata/bhyvexml2argv-vnc-password-comma.xml b=
/tests/bhyvexml2argvdata/bhyvexml2argv-vnc-password-comma.xml
new file mode 100644
index 0000000000..76dd36f72a
--- /dev/null
+++ b/tests/bhyvexml2argvdata/bhyvexml2argv-vnc-password-comma.xml
@@ -0,0 +1,26 @@
+
+ bhyve
+ df3be7e7-a104-11e3-aeb0-50e5492bd3dc
+ 219136
+ 1
+
+ hvm
+ /path/to/test.fd
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/tests/bhyvexml2argvdata/bhyvexml2argv-vnc-password.args b/test=
s/bhyvexml2argvdata/bhyvexml2argv-vnc-password.args
new file mode 100644
index 0000000000..41b679b51f
--- /dev/null
+++ b/tests/bhyvexml2argvdata/bhyvexml2argv-vnc-password.args
@@ -0,0 +1,12 @@
+/usr/sbin/bhyve \
+-c 1 \
+-m 214 \
+-u \
+-H \
+-P \
+-s 0:0,hostbridge \
+-l bootrom,/path/to/test.fd \
+-s 2:0,ahci,hd:/tmp/freebsd.img \
+-s 3:0,virtio-net,faketapdev,mac=3D52:54:00:00:00:00 \
+-s 4:0,fbuf,tcp=3D127.0.0.1:5904,password=3Ds3cr3t \
+-s 1,lpc bhyve
diff --git a/tests/bhyvexml2argvdata/bhyvexml2argv-vnc-password.ldargs b/te=
sts/bhyvexml2argvdata/bhyvexml2argv-vnc-password.ldargs
new file mode 100644
index 0000000000..421376db9e
--- /dev/null
+++ b/tests/bhyvexml2argvdata/bhyvexml2argv-vnc-password.ldargs
@@ -0,0 +1 @@
+dummy
diff --git a/tests/bhyvexml2argvdata/bhyvexml2argv-vnc-password.xml b/tests=
/bhyvexml2argvdata/bhyvexml2argv-vnc-password.xml
new file mode 100644
index 0000000000..97925a74fc
--- /dev/null
+++ b/tests/bhyvexml2argvdata/bhyvexml2argv-vnc-password.xml
@@ -0,0 +1,26 @@
+
+ bhyve
+ df3be7e7-a104-11e3-aeb0-50e5492bd3dc
+ 219136
+ 1
+
+ hvm
+ /path/to/test.fd
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/tests/bhyvexml2argvtest.c b/tests/bhyvexml2argvtest.c
index b948f740bd..914aa0e54f 100644
--- a/tests/bhyvexml2argvtest.c
+++ b/tests/bhyvexml2argvtest.c
@@ -175,7 +175,7 @@ mymain(void)
driver.bhyvecaps =3D BHYVE_CAP_RTC_UTC | BHYVE_CAP_AHCI32SLOT | \
BHYVE_CAP_NET_E1000 | BHYVE_CAP_LPC_BOOTROM | \
BHYVE_CAP_FBUF | BHYVE_CAP_XHCI | \
- BHYVE_CAP_CPUTOPOLOGY;
+ BHYVE_CAP_CPUTOPOLOGY | BHYVE_CAP_VNC_PASSWORD;
=20
DO_TEST("base");
DO_TEST("wired");
@@ -207,6 +207,8 @@ mymain(void)
DO_TEST("vnc-vgaconf-io");
DO_TEST("vnc-autoport");
DO_TEST("vnc-resolution");
+ DO_TEST("vnc-password");
+ DO_TEST_FAILURE("vnc-password-comma");
DO_TEST("cputopology");
DO_TEST_FAILURE("cputopology-nvcpu-mismatch");
DO_TEST("commandline");
@@ -250,6 +252,9 @@ mymain(void)
driver.bhyvecaps &=3D ~BHYVE_CAP_CPUTOPOLOGY;
DO_TEST_FAILURE("cputopology");
=20
+ driver.bhyvecaps &=3D ~BHYVE_CAP_VNC_PASSWORD;
+ DO_TEST_FAILURE("vnc-password");
+
virObjectUnref(driver.caps);
virObjectUnref(driver.xmlopt);
virPortAllocatorRangeFree(driver.remotePorts);
diff --git a/tests/bhyvexml2xmloutdata/bhyvexml2xmlout-vnc-password.xml b/t=
ests/bhyvexml2xmloutdata/bhyvexml2xmlout-vnc-password.xml
new file mode 100644
index 0000000000..4bacc94e94
--- /dev/null
+++ b/tests/bhyvexml2xmloutdata/bhyvexml2xmlout-vnc-password.xml
@@ -0,0 +1,41 @@
+
+ bhyve
+ df3be7e7-a104-11e3-aeb0-50e5492bd3dc
+ 219136
+ 219136
+ 1
+
+ hvm
+ /path/to/test.fd
+
+
+
+ destroy
+ restart
+ destroy
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/tests/bhyvexml2xmltest.c b/tests/bhyvexml2xmltest.c
index f6e4d44b8a..4514fccf20 100644
--- a/tests/bhyvexml2xmltest.c
+++ b/tests/bhyvexml2xmltest.c
@@ -109,6 +109,7 @@ mymain(void)
DO_TEST_DIFFERENT("vnc-vgaconf-io");
DO_TEST_DIFFERENT("vnc-autoport");
DO_TEST_DIFFERENT("vnc-resolution");
+ DO_TEST_DIFFERENT("vnc-password");
DO_TEST_DIFFERENT("commandline");
DO_TEST_DIFFERENT("msrs");
=20
--=20
2.19.2