From nobody Mon Feb 9 20:59:10 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=1559730740; cv=none; d=zoho.com; s=zohoarc; b=SnTZrinQ2gXqUsFxmGiRdavc7NRTby1J2Ma42HuPDhTm0qbx3HOlAlVTH96AZ4Yy2dHFABBWBRFQ5+ZH61VXTAbT3DBHPlcGvxTiksNiNnooebl9UJYM8NO7/yl3gsLxiP4qGODhKzQ0VpaAaM2HBs0DIkdsXkEvidDFf4WtoNg= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1559730740; 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=peXrJ2isHtL25d+CFY7Wb2qHGlzu86+QGu127szx4OE=; b=f/k3ZM52LWq/Y8RXuBTxv43ZbmXIZ0360FR7DTrpALSIk9AQvBsnTrtplEjFA892rQvMihO3qHVdkxRsczX6d7yTV9nPy/AmNyJxz21/lzEhKIY1JGUWhWUj1aFYWKPNYqbS32KEuMadF/nGrE12Xi/QKngBqYyt6YZSK4UeA+g= 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 1559730740175911.8678157271172; Wed, 5 Jun 2019 03:32:20 -0700 (PDT) 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 50CC285363; Wed, 5 Jun 2019 10:32:02 +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 044B25D9CD; Wed, 5 Jun 2019 10:32:00 +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 DCE0B1806B16; Wed, 5 Jun 2019 10:31:52 +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 x55AVpSL019959 for ; Wed, 5 Jun 2019 06:31:51 -0400 Received: by smtp.corp.redhat.com (Postfix) id B473C22710; Wed, 5 Jun 2019 10:31:51 +0000 (UTC) Received: from localhost (ovpn-112-54.ams2.redhat.com [10.36.112.54]) by smtp.corp.redhat.com (Postfix) with ESMTP id 067AA5F7C0; Wed, 5 Jun 2019 10:31:46 +0000 (UTC) From: marcandre.lureau@redhat.com To: libvir-list@redhat.com Date: Wed, 5 Jun 2019 12:31:03 +0200 Message-Id: <20190605103117.19047-6-marcandre.lureau@redhat.com> In-Reply-To: <20190605103117.19047-1-marcandre.lureau@redhat.com> References: <20190605103117.19047-1-marcandre.lureau@redhat.com> 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 05/19] 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.14 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.25]); Wed, 05 Jun 2019 10:32:16 +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 --- 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 22ddcb71d3..d2cc8c00b5 100644 --- a/docs/formatdomain.html.in +++ b/docs/formatdomain.html.in @@ -7018,6 +7018,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 4bd75e3055..e249d5f8f0 100644 --- a/docs/schemas/domaincommon.rng +++ b/docs/schemas/domaincommon.rng @@ -3573,7 +3573,6 @@ vmvga xen vbox - virtio gop none @@ -3598,6 +3597,16 @@ + + + virtio + + + + + + + diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index 97ba8bd53a..916440256a 100644 --- a/src/conf/domain_conf.c +++ b/src/conf/domain_conf.c @@ -15311,6 +15311,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; @@ -15329,6 +15330,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"); @@ -15361,6 +15363,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", @@ -26364,6 +26376,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 4c3ab07062..a62b35b092 100644 --- a/src/conf/domain_conf.h +++ b/src/conf/domain_conf.h @@ -1419,6 +1419,7 @@ struct _virDomainVideoDef { virDomainVideoDriverDefPtr driver; virDomainDeviceInfo info; virDomainVirtioOptionsPtr virtio; + bool vhostuser; }; =20 /* graphics console modes */ --=20 2.22.0.rc2.384.g1a9a72ea1d -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list