From nobody Mon Feb 9 00:38:49 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 1531917174593794.3494482903807;
Wed, 18 Jul 2018 05:32:54 -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 2776A81DE6;
Wed, 18 Jul 2018 12:32:52 +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 D20DA60C4E;
Wed, 18 Jul 2018 12:32:51 +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 7A18C14B09;
Wed, 18 Jul 2018 12:32:51 +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 w6ICVsCT005342 for ;
Wed, 18 Jul 2018 08:31:54 -0400
Received: by smtp.corp.redhat.com (Postfix)
id 683B72027047; Wed, 18 Jul 2018 12:31:54 +0000 (UTC)
Received: from beluga.usersys.redhat.com (unknown [10.43.2.166])
by smtp.corp.redhat.com (Postfix) with ESMTP id BFE662026D69;
Wed, 18 Jul 2018 12:31:53 +0000 (UTC)
From: Erik Skultety
To: libvir-list@redhat.com
Date: Wed, 18 Jul 2018 14:31:40 +0200
Message-Id:
<320803fccf120df4136ba6d6d95a058ab2911c95.1531916860.git.eskultet@redhat.com>
In-Reply-To:
References:
In-Reply-To:
References:
X-Scanned-By: MIMEDefang 2.78 on 10.11.54.4
X-loop: libvir-list@redhat.com
Cc: Erik Skultety
Subject: [libvirt] [PATCH v4 04/10] qemu: Introduce a new graphics display
type 'headless'
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: ,
MIME-Version: 1.0
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.5.16 (mx1.redhat.com [10.5.110.25]);
Wed, 18 Jul 2018 12:32:53 +0000 (UTC)
X-ZohoMail: RSF_0 Z_629925259 SPT_0
Content-Type: text/plain; charset="utf-8"
Since 2.10 QEMU supports a new display type egl-headless which uses the
drm nodes for OpenGL rendering copying back the rendered bits back to
QEMU into a dma-buf which can be accessed by standard "display" apps
like VNC or SPICE. Although this display type can be used on its own,
for any practical use case it makes sense to pair it with either VNC or
SPICE display. The clear benefit of this display is that VNC gains
OpenGL support, which it natively doesn't have, and SPICE gains remote
OpenGL support (native OpenGL support only works locally through a UNIX
socket, i.e. listen type=3Dsocket/none)
Signed-off-by: Erik Skultety
Reviewed-by: J=EF=BF=BDn Tomko
---
docs/formatdomain.html.in | 33 +++++++++++-
docs/schemas/domaincommon.rng | 3 ++
src/conf/domain_conf.c | 6 ++-
src/conf/domain_conf.h | 1 +
src/libxl/libxl_conf.c | 1 +
src/qemu/qemu_command.c | 14 ++++-
src/qemu/qemu_domain.c | 60 ++++++++++++++++++=
+++-
src/qemu/qemu_driver.c | 2 +
src/qemu/qemu_hotplug.c | 1 +
src/qemu/qemu_process.c | 4 ++
src/vmx/vmx.c | 1 +
tests/domaincapsschemadata/full.xml | 1 +
tests/qemuxml2argvdata/graphics-egl-headless.args | 26 ++++++++++
tests/qemuxml2argvdata/graphics-egl-headless.xml | 31 +++++++++++
.../qemuxml2argvdata/graphics-sdl-egl-headless.xml | 35 +++++++++++++
.../graphics-spice-egl-headless.args | 31 +++++++++++
.../graphics-spice-egl-headless.xml | 36 +++++++++++++
.../graphics-spice-invalid-egl-headless.xml | 37 +++++++++++++
.../graphics-vnc-egl-headless.args | 28 ++++++++++
.../qemuxml2argvdata/graphics-vnc-egl-headless.xml | 37 +++++++++++++
tests/qemuxml2argvtest.c | 17 ++++++
.../graphics-spice-egl-headless.xml | 44 ++++++++++++++++
.../graphics-vnc-egl-headless.xml | 42 +++++++++++++++
tests/qemuxml2xmltest.c | 2 +
24 files changed, 488 insertions(+), 5 deletions(-)
create mode 100644 tests/qemuxml2argvdata/graphics-egl-headless.args
create mode 100644 tests/qemuxml2argvdata/graphics-egl-headless.xml
create mode 100644 tests/qemuxml2argvdata/graphics-sdl-egl-headless.xml
create mode 100644 tests/qemuxml2argvdata/graphics-spice-egl-headless.args
create mode 100644 tests/qemuxml2argvdata/graphics-spice-egl-headless.xml
create mode 100644 tests/qemuxml2argvdata/graphics-spice-invalid-egl-headl=
ess.xml
create mode 100644 tests/qemuxml2argvdata/graphics-vnc-egl-headless.args
create mode 100644 tests/qemuxml2argvdata/graphics-vnc-egl-headless.xml
create mode 100644 tests/qemuxml2xmloutdata/graphics-spice-egl-headless.xml
create mode 100644 tests/qemuxml2xmloutdata/graphics-vnc-egl-headless.xml
diff --git a/docs/formatdomain.html.in b/docs/formatdomain.html.in
index d08ede9ab5..091888c879 100644
--- a/docs/formatdomain.html.in
+++ b/docs/formatdomain.html.in
@@ -6321,7 +6321,8 @@ qemu-kvm -net nic,model=3D? /dev/null
The graphics element has a mandatory type
attribute which takes the value sdl, vnc,
- spice, rdp or desktop:
+ spice, rdp, desktop or
+ egl-headless:
sdl
@@ -6380,6 +6381,11 @@ qemu-kvm -net nic,model=3D? /dev/null
auto-allocation and autoport having no effect d=
ue to
security reasons) Since 1.0.6.
+
+ Although VNC doesn't support OpenGL natively, it can be pair=
ed
+ with graphics type egl-headless (see below) whi=
ch
+ will instruct QEMU to open and use drm nodes for OpenGL rend=
ering.
+
spiceSince 0.8.6<=
/dt>
@@ -6485,6 +6491,12 @@ qemu-kvm -net nic,model=3D? /dev/null
You can enable or disable OpenGL support explicitly with
the gl element, by setting the enable
property. (QEMU only, since 1.3.3).
+ Note that this only works locally, since this requires usage=
of
+ UNIX sockets, i.e. using listen types 'socket' =
or
+ 'none'. For accelerated OpenGL with remote support, consider
+ pairing this element with type egl-headless
+ (see below). However, this will deliver weaker performance
+ compared to native Spice OpenGL support.
By default, QEMU will pick the first available GPU DRM rende=
r node.
@@ -6520,6 +6532,25 @@ qemu-kvm -net nic,model=3D? /dev/null
fullscreen.
+
egl-headlessSince 4.6.0=
span>
+
+
+ This display type provides support for an OpenGL accelerated
+ display accessible both locally and remotely (for comparison,
+ Spice's native OpenGL support only works locally using UNIX
+ sockets at the moment, but has better performance). Since th=
is
+ display type doesn't provide any window or graphical console=
like
+ the other types, for practical reasons it should be paired w=
ith
+ either vnc or spice graphics types.
+ This display type is only supported by QEMU domains
+ (needs QEMU 2.10 or newer) and =
doesn't
+ accept any attributes.
+