From nobody Tue Feb 10 00:59:05 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=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 1531488534991622.0222943215856;
Fri, 13 Jul 2018 06:28:54 -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 68250308A956;
Fri, 13 Jul 2018 13:28:53 +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 23616608F0;
Fri, 13 Jul 2018 13:28:53 +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 BB08B1841C4B;
Fri, 13 Jul 2018 13:28:52 +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 w6DDScfH032501 for ;
Fri, 13 Jul 2018 09:28:38 -0400
Received: by smtp.corp.redhat.com (Postfix)
id BF0C221565E2; Fri, 13 Jul 2018 13:28:38 +0000 (UTC)
Received: from localhost (unknown [10.36.112.12])
by smtp.corp.redhat.com (Postfix) with ESMTP id 5A28321565E1;
Fri, 13 Jul 2018 13:28:38 +0000 (UTC)
From: marcandre.lureau@redhat.com
To: libvir-list@redhat.com
Date: Fri, 13 Jul 2018 15:28:12 +0200
Message-Id: <20180713132824.8655-6-marcandre.lureau@redhat.com>
In-Reply-To: <20180713132824.8655-1-marcandre.lureau@redhat.com>
References: <20180713132824.8655-1-marcandre.lureau@redhat.com>
MIME-Version: 1.0
X-Scanned-By: MIMEDefang 2.78 on 10.11.54.6
X-loop: libvir-list@redhat.com
Cc: =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?=
Subject: [libvirt] [RFC PATCH 05/17] domain: add "vhost-user" video type
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.41]);
Fri, 13 Jul 2018 13:28:54 +0000 (UTC)
X-ZohoMail: RSF_0 Z_629925259 SPT_0
From: Marc-Andr=C3=A9 Lureau
Learn to accept "vhost-user" model type:
(fill the required enum and switches to compile successfully)
Signed-off-by: Marc-Andr=C3=A9 Lureau
---
docs/formatdomain.html.in | 5 +++--
docs/schemas/domaincommon.rng | 1 +
src/conf/domain_conf.c | 4 +++-
src/conf/domain_conf.h | 1 +
src/qemu/qemu_command.c | 9 ++++++---
src/qemu/qemu_domain.c | 1 +
src/qemu/qemu_domain_address.c | 1 +
tests/domaincapsschemadata/full.xml | 1 +
8 files changed, 17 insertions(+), 6 deletions(-)
diff --git a/docs/formatdomain.html.in b/docs/formatdomain.html.in
index a3afe137bf..8bd0d81dbd 100644
--- a/docs/formatdomain.html.in
+++ b/docs/formatdomain.html.in
@@ -6620,8 +6620,9 @@ qemu-kvm -net nic,model=3D? /dev/null
The model element has a mandatory type
attribute which takes the value "vga", "cirrus", "vmvga", "xen",
"vbox", "qxl" (since 0.8.6),
- "virtio" (since 1.3.0)
- or "gop" (since 3.2.0)
+ "virtio" (since 1.3.0),
+ "gop" (since 3.2.0) or
+ "vhost-user" (since 4.6.0)
depending on the hypervisor features available.
diff --git a/docs/schemas/domaincommon.rng b/docs/schemas/domaincommon.rng
index f24a56392a..88dcc5404d 100644
--- a/docs/schemas/domaincommon.rng
+++ b/docs/schemas/domaincommon.rng
@@ -3451,6 +3451,7 @@
vbox
virtio
gop
+ vhost-user
diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c
index 7396616eda..93c33263ad 100644
--- a/src/conf/domain_conf.c
+++ b/src/conf/domain_conf.c
@@ -590,7 +590,8 @@ VIR_ENUM_IMPL(virDomainVideo, VIR_DOMAIN_VIDEO_TYPE_LAS=
T,
"qxl",
"parallels",
"virtio",
- "gop")
+ "gop",
+ "vhost-user")
=20
VIR_ENUM_IMPL(virDomainVideoVGAConf, VIR_DOMAIN_VIDEO_VGACONF_LAST,
"io",
@@ -15022,6 +15023,7 @@ virDomainVideoDefaultRAM(const virDomainDef *def,
case VIR_DOMAIN_VIDEO_TYPE_VBOX:
case VIR_DOMAIN_VIDEO_TYPE_PARALLELS:
case VIR_DOMAIN_VIDEO_TYPE_VIRTIO:
+ case VIR_DOMAIN_VIDEO_TYPE_VHOST_USER:
case VIR_DOMAIN_VIDEO_TYPE_GOP:
case VIR_DOMAIN_VIDEO_TYPE_LAST:
default:
diff --git a/src/conf/domain_conf.h b/src/conf/domain_conf.h
index 0f10e242fd..4e608b6ae2 100644
--- a/src/conf/domain_conf.h
+++ b/src/conf/domain_conf.h
@@ -1423,6 +1423,7 @@ typedef enum {
VIR_DOMAIN_VIDEO_TYPE_PARALLELS, /* pseudo device for VNC in container=
s */
VIR_DOMAIN_VIDEO_TYPE_VIRTIO,
VIR_DOMAIN_VIDEO_TYPE_GOP,
+ VIR_DOMAIN_VIDEO_TYPE_VHOST_USER,
=20
VIR_DOMAIN_VIDEO_TYPE_LAST
} virDomainVideoType;
diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c
index 45ab1f85ae..e78a534628 100644
--- a/src/qemu/qemu_command.c
+++ b/src/qemu/qemu_command.c
@@ -105,7 +105,8 @@ VIR_ENUM_IMPL(qemuVideo, VIR_DOMAIN_VIDEO_TYPE_LAST,
"qxl",
"", /* don't support parallels */
"", /* no need for virtio */
- "" /* don't support gop */);
+ "", /* don't support gop */
+ "", /* no need for virtio */);
=20
VIR_ENUM_DECL(qemuDeviceVideo)
=20
@@ -119,7 +120,8 @@ VIR_ENUM_IMPL(qemuDeviceVideo, VIR_DOMAIN_VIDEO_TYPE_LA=
ST,
"qxl-vga",
"", /* don't support parallels */
"virtio-vga",
- "" /* don't support gop */);
+ "", /* don't support gop */
+ "vhost-user-vga");
=20
VIR_ENUM_DECL(qemuDeviceVideoSecondary)
=20
@@ -133,7 +135,8 @@ VIR_ENUM_IMPL(qemuDeviceVideoSecondary, VIR_DOMAIN_VIDE=
O_TYPE_LAST,
"qxl",
"", /* don't support parallels */
"virtio-gpu",
- "" /* don't support gop */);
+ "", /* don't support gop */
+ "vhost-user-gpu");
=20
VIR_ENUM_DECL(qemuSoundCodec)
=20
diff --git a/src/qemu/qemu_domain.c b/src/qemu/qemu_domain.c
index ed76495309..b8b5919795 100644
--- a/src/qemu/qemu_domain.c
+++ b/src/qemu/qemu_domain.c
@@ -4485,6 +4485,7 @@ qemuDomainDeviceDefValidateVideo(const virDomainVideo=
Def *video)
case VIR_DOMAIN_VIDEO_TYPE_VMVGA:
case VIR_DOMAIN_VIDEO_TYPE_QXL:
case VIR_DOMAIN_VIDEO_TYPE_VIRTIO:
+ case VIR_DOMAIN_VIDEO_TYPE_VHOST_USER:
case VIR_DOMAIN_VIDEO_TYPE_LAST:
break;
}
diff --git a/src/qemu/qemu_domain_address.c b/src/qemu/qemu_domain_address.c
index 6ea80616af..df98d7384f 100644
--- a/src/qemu/qemu_domain_address.c
+++ b/src/qemu/qemu_domain_address.c
@@ -786,6 +786,7 @@ qemuDomainDeviceCalculatePCIConnectFlags(virDomainDevic=
eDefPtr dev,
case VIR_DOMAIN_DEVICE_VIDEO:
switch ((virDomainVideoType)dev->data.video->type) {
case VIR_DOMAIN_VIDEO_TYPE_VIRTIO:
+ case VIR_DOMAIN_VIDEO_TYPE_VHOST_USER:
return virtioFlags;
=20
case VIR_DOMAIN_VIDEO_TYPE_VGA:
diff --git a/tests/domaincapsschemadata/full.xml b/tests/domaincapsschemada=
ta/full.xml
index d3faf38da0..2038fad272 100644
--- a/tests/domaincapsschemadata/full.xml
+++ b/tests/domaincapsschemadata/full.xml
@@ -73,6 +73,7 @@
parallels
virtio
gop
+ vhost-user
--=20
2.18.0.129.ge3331758f1
--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list