From nobody Mon Feb 9 04:31:12 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 ARC-Seal: i=1; a=rsa-sha256; t=1566577331; cv=none; d=zoho.com; s=zohoarc; b=lA/M0O9hWNvwzahVn8L2WBAEE5XjCwuUgtBZaW70+zVIyB0bnsrVQSshbeG/sdtzDu5gBq24nNECd59aCJ9fTTwoNE3NvFx4UH8waQtelLENU12m6vp2Sh8PoM8Sz+H89WTMyH6j8yARz5uq6xexhQY7Hk3WoKsWyVfosThFzlk= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1566577331; 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:ARC-Authentication-Results; bh=AU1kwMhv3k0LIn3YvkuXKA6Cwtzzl6l0+lWUOTPKBfs=; b=XnIv42eEEUX0JeTXFmiIi5GL1RVAyXKVAZrRHha/1DibmKfPYxc6JfMTPGx2chPdBlRwSp2YKw+VjlMMvQDFB+Qvwdv5UpXmA+mGXtSZQkr+vaVdeRIVWbt9IvSLtncQ0/F3WfGhWsDVIwSOMEvMTMan/V7L8NWb/VWhUbf7bL4= ARC-Authentication-Results: i=1; mx.zoho.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 header.from= (p=none dis=none) header.from= Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1566577331256269.2696087921813; Fri, 23 Aug 2019 09:22:11 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 9492618DE768; Fri, 23 Aug 2019 16:22:09 +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 171A24142; Fri, 23 Aug 2019 16:22:09 +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 5137324F35; Fri, 23 Aug 2019 16:22:07 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id x7NGM51R005984 for ; Fri, 23 Aug 2019 12:22:05 -0400 Received: by smtp.corp.redhat.com (Postfix) id 0724C60605; Fri, 23 Aug 2019 16:22:05 +0000 (UTC) Received: from worklaptop.redhat.com (ovpn-122-169.rdu2.redhat.com [10.10.122.169]) by smtp.corp.redhat.com (Postfix) with ESMTP id 89E0F6092D; Fri, 23 Aug 2019 16:22:04 +0000 (UTC) From: Cole Robinson To: libvirt-list@redhat.com Date: Fri, 23 Aug 2019 12:21:46 -0400 Message-Id: <76dadadc00b9c519e4b25f321776347672781cb9.1566576129.git.crobinso@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-loop: libvir-list@redhat.com Cc: =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= Subject: [libvirt] [PATCH v2 02/16] domain: add "vhostuser" attribute to virtio video model 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.12 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.6.2 (mx1.redhat.com [10.5.110.63]); Fri, 23 Aug 2019 16:22:10 +0000 (UTC) From: Marc-Andr=C3=A9 Lureau Accept a new attribute to specify usage of helper process, ex: Signed-off-by: Marc-Andr=C3=A9 Lureau Signed-off-by: Cole Robinson --- docs/formatdomain.html.in | 6 ++++++ docs/schemas/domaincommon.rng | 11 ++++++++++- src/conf/domain_conf.c | 14 ++++++++++++++ src/conf/domain_conf.h | 1 + 4 files changed, 31 insertions(+), 1 deletion(-) diff --git a/docs/formatdomain.html.in b/docs/formatdomain.html.in index fcb7c59c00..ec650fbe17 100644 --- a/docs/formatdomain.html.in +++ b/docs/formatdomain.html.in @@ -7039,6 +7039,12 @@ qemu-kvm -net nic,model=3D? /dev/null Attribute vram64 (since 1.3.3= ) extends secondary bar and makes it addressable as 64bit memory.

+

+ For guest type "kvm" and model type "virtio" there are + optional attributes. Attribute vhost-user + (since 5.5.0) specify that a + vhost-user helper process should be associated with the GPU. +

=20
acceleration
diff --git a/docs/schemas/domaincommon.rng b/docs/schemas/domaincommon.rng index c48f8c4f56..bac566855d 100644 --- a/docs/schemas/domaincommon.rng +++ b/docs/schemas/domaincommon.rng @@ -3581,7 +3581,6 @@ vmvga xen vbox - virtio gop none bochs @@ -3607,6 +3606,16 @@ + + + virtio + + + + + + + diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index b7a342bb91..f51575d57d 100644 --- a/src/conf/domain_conf.c +++ b/src/conf/domain_conf.c @@ -15358,6 +15358,7 @@ virDomainVideoDefParseXML(virDomainXMLOptionPtr xml= opt, xmlNodePtr cur; VIR_XPATH_NODE_AUTORESTORE(ctxt); VIR_AUTOFREE(char *) type =3D NULL; + VIR_AUTOFREE(char *) vhostuser =3D NULL; VIR_AUTOFREE(char *) heads =3D NULL; VIR_AUTOFREE(char *) vram =3D NULL; VIR_AUTOFREE(char *) vram64 =3D NULL; @@ -15376,6 +15377,7 @@ virDomainVideoDefParseXML(virDomainXMLOptionPtr xml= opt, if (!type && !vram && !ram && !heads && virXMLNodeNameEqual(cur, "model")) { type =3D virXMLPropString(cur, "type"); + vhostuser =3D virXMLPropString(cur, "vhostuser"); ram =3D virXMLPropString(cur, "ram"); vram =3D virXMLPropString(cur, "vram"); vram64 =3D virXMLPropString(cur, "vram64"); @@ -15408,6 +15410,16 @@ virDomainVideoDefParseXML(virDomainXMLOptionPtr xm= lopt, def->type =3D virDomainVideoDefaultType(dom); } =20 + if (vhostuser !=3D NULL) { + if (virStringParseYesNo(vhostuser, &def->vhostuser) < 0) { + virReportError(VIR_ERR_INTERNAL_ERROR, + _("unknown vhostuser value '%s'"), vhostuser); + goto cleanup; + } + } else { + def->vhostuser =3D false; + } + if (ram) { if (def->type !=3D VIR_DOMAIN_VIDEO_TYPE_QXL) { virReportError(VIR_ERR_XML_ERROR, "%s", @@ -26486,6 +26498,8 @@ virDomainVideoDefFormat(virBufferPtr buf, virBufferAsprintf(buf, " heads=3D'%u'", def->heads); if (def->primary) virBufferAddLit(buf, " primary=3D'yes'"); + if (def->vhostuser) + virBufferAddLit(buf, " vhostuser=3D'yes'"); if (def->accel) { virBufferAddLit(buf, ">\n"); virBufferAdjustIndent(buf, 2); diff --git a/src/conf/domain_conf.h b/src/conf/domain_conf.h index 33cef5b75c..bc2450f25e 100644 --- a/src/conf/domain_conf.h +++ b/src/conf/domain_conf.h @@ -1424,6 +1424,7 @@ struct _virDomainVideoDef { virDomainVideoDriverDefPtr driver; virDomainDeviceInfo info; virDomainVirtioOptionsPtr virtio; + bool vhostuser; }; =20 /* graphics console modes */ --=20 2.21.0 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list