From nobody Sun Feb 8 09:41:15 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=1566577347; cv=none; d=zoho.com; s=zohoarc; b=IQQ0xAfn4OmnD67lQY24/0nP/Mv6CI7QriKQ8MB56vwMeKKBWAEpDr1n0DiTOGz90ePRtjVOnUFnqyjtH+ufd3ADHssP6cShxC57mDt8c9ruF0uStTNl4bufLHOmf8gLtLdRo/383Hn/Lu6IfB8RLl57i4TIEVPJrWVu/n65sqg= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1566577347; 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=UHRQzObOpVvU0jfgn71csAfJ83VE4aCGzVCZC2cdleI=; b=l05NU4cZfF6dPfSG3jXVt0yIsN6c05YXARCmaJyiPnFO7lZJor18p995ciZkuBkDV7mclJ6ZJDCC+Z52MO/kB+BDXEQrRTDJlAG9gZJj6vXbySvx3VqFe1d/MXmUyZ5g3KIiaNQrHX2ssdTOP3ILRoVt6NzQdUtYv9jT9UDpUgU= 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 1566577347073694.7252488634921; Fri, 23 Aug 2019 09:22:27 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id D61FC3CA16; Fri, 23 Aug 2019 16:22:25 +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 B56465D784; Fri, 23 Aug 2019 16:22:25 +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 790531802220; Fri, 23 Aug 2019 16:22:25 +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 x7NGM5tc005992 for ; Fri, 23 Aug 2019 12:22:05 -0400 Received: by smtp.corp.redhat.com (Postfix) id A3A7760605; 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 3045160872; Fri, 23 Aug 2019 16:22:05 +0000 (UTC) From: Cole Robinson To: libvirt-list@redhat.com Date: Fri, 23 Aug 2019 12:21:47 -0400 Message-Id: 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 03/16] domain: add rendernode attribute on 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.15 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.39]); Fri, 23 Aug 2019 16:22:26 +0000 (UTC) From: Marc-Andr=C3=A9 Lureau vhost-user-gpu helper may accept --render-node option to specify on which GPU should the renderning be done. (by comparison rendernode is the target/display rendering) Signed-off-by: Marc-Andr=C3=A9 Lureau Signed-off-by: Cole Robinson --- docs/formatdomain.html.in | 5 +++++ docs/schemas/domaincommon.rng | 5 +++++ src/conf/domain_conf.c | 18 +++++++++++++++++- src/conf/domain_conf.h | 1 + 4 files changed, 28 insertions(+), 1 deletion(-) diff --git a/docs/formatdomain.html.in b/docs/formatdomain.html.in index ec650fbe17..5a4807d937 100644 --- a/docs/formatdomain.html.in +++ b/docs/formatdomain.html.in @@ -7059,6 +7059,11 @@ qemu-kvm -net nic,model=3D? /dev/null
Enable 3D acceleration (for vbox driver since 0.7.1, qemu driver since 1.3.0)
+ +
rendernode
+
Absolute path to a host's DRI device to be used for + rendering (for vhost-user driver only, since 5.5.0)
=20 diff --git a/docs/schemas/domaincommon.rng b/docs/schemas/domaincommon.rng index bac566855d..6e91fe6cef 100644 --- a/docs/schemas/domaincommon.rng +++ b/docs/schemas/domaincommon.rng @@ -3644,6 +3644,11 @@ + + + + + diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index f51575d57d..2cc055491d 100644 --- a/src/conf/domain_conf.c +++ b/src/conf/domain_conf.c @@ -2832,6 +2832,8 @@ virDomainVideoDefClear(virDomainVideoDefPtr def) =20 virDomainDeviceInfoClear(&def->info); =20 + if (def->accel) + VIR_FREE(def->accel->rendernode); VIR_FREE(def->accel); VIR_FREE(def->virtio); VIR_FREE(def->driver); @@ -15270,6 +15272,7 @@ virDomainVideoAccelDefParseXML(xmlNodePtr node) int val; VIR_AUTOFREE(char *) accel2d =3D NULL; VIR_AUTOFREE(char *) accel3d =3D NULL; + VIR_AUTOFREE(char *) rendernode =3D NULL; =20 cur =3D node->children; while (cur !=3D NULL) { @@ -15278,12 +15281,13 @@ virDomainVideoAccelDefParseXML(xmlNodePtr node) virXMLNodeNameEqual(cur, "acceleration")) { accel3d =3D virXMLPropString(cur, "accel3d"); accel2d =3D virXMLPropString(cur, "accel2d"); + rendernode =3D virXMLPropString(cur, "rendernode"); } } cur =3D cur->next; } =20 - if (!accel3d && !accel2d) + if (!accel3d && !accel2d && !rendernode) return NULL; =20 if (VIR_ALLOC(def) < 0) @@ -15307,6 +15311,9 @@ virDomainVideoAccelDefParseXML(xmlNodePtr node) def->accel2d =3D val; } =20 + if (VIR_STRDUP(def->rendernode, rendernode) < 0) + goto cleanup; + cleanup: return def; } @@ -15474,6 +15481,11 @@ virDomainVideoDefParseXML(virDomainXMLOptionPtr xm= lopt, goto error; } } + if (!def->vhostuser && def->accel && def->accel->rendernode) { + virReportError(VIR_ERR_INTERNAL_ERROR, "%s", + _("unsupported rendernode accel attribute without '= vhost-user'")); + goto error; + } =20 if (virDomainDeviceInfoParseXML(xmlopt, node, &def->info, flags) < 0) goto error; @@ -26452,6 +26464,10 @@ virDomainVideoAccelDefFormat(virBufferPtr buf, virBufferAsprintf(buf, " accel2d=3D'%s'", virTristateBoolTypeToString(def->accel2d)); } + if (def->rendernode) { + virBufferAsprintf(buf, " rendernode=3D'%s'", + def->rendernode); + } virBufferAddLit(buf, "/>\n"); } =20 diff --git a/src/conf/domain_conf.h b/src/conf/domain_conf.h index bc2450f25e..707fbd1cd3 100644 --- a/src/conf/domain_conf.h +++ b/src/conf/domain_conf.h @@ -1405,6 +1405,7 @@ VIR_ENUM_DECL(virDomainVideoVGAConf); struct _virDomainVideoAccelDef { int accel2d; /* enum virTristateBool */ int accel3d; /* enum virTristateBool */ + char *rendernode; }; =20 =20 --=20 2.21.0 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list