From nobody Fri Apr 19 01:31:01 2024
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 1531153480417323.7122555509678;
Mon, 9 Jul 2018 09:24:40 -0700 (PDT)
Received: from smtp.corp.redhat.com (int-mx11.intmail.prod.int.phx2.redhat.com
[10.5.11.26])
(using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits))
(No client certificate requested)
by mx1.redhat.com (Postfix) with ESMTPS id D998F13AA1;
Mon, 9 Jul 2018 16:24:38 +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 A092A3001647;
Mon, 9 Jul 2018 16:24:38 +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 49B161800B68;
Mon, 9 Jul 2018 16:24:38 +0000 (UTC)
Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.rdu2.redhat.com
[10.11.54.5])
by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP
id w69GOYfa020373 for ;
Mon, 9 Jul 2018 12:24:35 -0400
Received: by smtp.corp.redhat.com (Postfix)
id D371F7C4A; Mon, 9 Jul 2018 16:24:34 +0000 (UTC)
Received: from beluga.usersys.redhat.com (unknown [10.43.2.166])
by smtp.corp.redhat.com (Postfix) with ESMTP id 5A88951DF;
Mon, 9 Jul 2018 16:24:34 +0000 (UTC)
From: Erik Skultety
To: libvir-list@redhat.com
Date: Mon, 9 Jul 2018 18:24:13 +0200
Message-Id:
<388b3c4e62c08db756e26d240f6fc752a3055f08.1531151383.git.eskultet@redhat.com>
In-Reply-To:
References:
In-Reply-To:
References:
X-Scanned-By: MIMEDefang 2.79 on 10.11.54.5
X-loop: libvir-list@redhat.com
Cc: Erik Skultety
Subject: [libvirt] [PATCH v2 1/7] qemu: caps: Introduce a capability for
egl-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.84 on 10.5.11.26
X-Greylist: Sender IP whitelisted,
not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.29]);
Mon, 09 Jul 2018 16:24:39 +0000 (UTC)
X-ZohoMail: RSF_0 Z_629925259 SPT_0
Content-Type: text/plain; charset="utf-8"
Since QEMU 2.10, it's possible to use a new type of display -
egl-headless which uses drm nodes to provide OpenGL support. This patch
adds a capability for that. However, since QEMU doesn't provide a QMP
command to probe it, this is only a libvirt version-based capability.
Signed-off-by: Erik Skultety
---
src/qemu/qemu_capabilities.c | 6 ++++++
src/qemu/qemu_capabilities.h | 1 +
tests/qemucapabilitiesdata/caps_2.10.0.aarch64.xml | 1 +
tests/qemucapabilitiesdata/caps_2.10.0.ppc64.xml | 1 +
tests/qemucapabilitiesdata/caps_2.10.0.s390x.xml | 1 +
tests/qemucapabilitiesdata/caps_2.10.0.x86_64.xml | 1 +
tests/qemucapabilitiesdata/caps_2.11.0.s390x.xml | 1 +
tests/qemucapabilitiesdata/caps_2.12.0.aarch64.xml | 1 +
tests/qemucapabilitiesdata/caps_2.12.0.ppc64.xml | 1 +
tests/qemucapabilitiesdata/caps_2.12.0.s390x.xml | 1 +
tests/qemucapabilitiesdata/caps_2.12.0.x86_64.xml | 1 +
tests/qemucapabilitiesdata/caps_3.0.0.ppc64.xml | 1 +
12 files changed, 17 insertions(+)
diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c
index c7da916f9a..8e23b78ba4 100644
--- a/src/qemu/qemu_capabilities.c
+++ b/src/qemu/qemu_capabilities.c
@@ -502,6 +502,7 @@ VIR_ENUM_IMPL(virQEMUCaps, QEMU_CAPS_LAST,
"sev-guest",
"machine.pseries.cap-hpt-max-page-size",
"machine.pseries.cap-htm",
+ "egl-headless",
);
=20
=20
@@ -4028,6 +4029,11 @@ virQEMUCapsInitQMPMonitor(virQEMUCapsPtr qemuCaps,
virQEMUCapsSet(qemuCaps, QEMU_CAPS_MACHINE_PSERIES_RESIZE_HPT);
}
=20
+ /* '-display egl-headless' cmdline option is supported since QEMU 2.10=
, but
+ * there's no way to probe it */
+ if (qemuCaps->version >=3D 2010000)
+ virQEMUCapsSet(qemuCaps, QEMU_CAPS_EGL_HEADLESS);
+
/* no way to query for -numa dist */
if (qemuCaps->version >=3D 2010000)
virQEMUCapsSet(qemuCaps, QEMU_CAPS_NUMA_DIST);
diff --git a/src/qemu/qemu_capabilities.h b/src/qemu/qemu_capabilities.h
index a048a1cf02..bb3594c172 100644
--- a/src/qemu/qemu_capabilities.h
+++ b/src/qemu/qemu_capabilities.h
@@ -486,6 +486,7 @@ typedef enum { /* virQEMUCapsFlags grouping marker for =
syntax-check */
QEMU_CAPS_SEV_GUEST, /* -object sev-guest,... */
QEMU_CAPS_MACHINE_PSERIES_CAP_HPT_MAX_PAGE_SIZE, /* -machine pseries.c=
ap-hpt-max-page-size */
QEMU_CAPS_MACHINE_PSERIES_CAP_HTM, /* -machine pseries.cap-htm */
+ QEMU_CAPS_EGL_HEADLESS, /* -display egl-headless */
=20
QEMU_CAPS_LAST /* this must always be the last item */
} virQEMUCapsFlags;
diff --git a/tests/qemucapabilitiesdata/caps_2.10.0.aarch64.xml b/tests/qem=
ucapabilitiesdata/caps_2.10.0.aarch64.xml
index 169641063c..a70e050765 100644
--- a/tests/qemucapabilitiesdata/caps_2.10.0.aarch64.xml
+++ b/tests/qemucapabilitiesdata/caps_2.10.0.aarch64.xml
@@ -159,6 +159,7 @@
+ 20100000307647
diff --git a/tests/qemucapabilitiesdata/caps_2.10.0.ppc64.xml b/tests/qemuc=
apabilitiesdata/caps_2.10.0.ppc64.xml
index 92c095abd2..72709905d8 100644
--- a/tests/qemucapabilitiesdata/caps_2.10.0.ppc64.xml
+++ b/tests/qemucapabilitiesdata/caps_2.10.0.ppc64.xml
@@ -158,6 +158,7 @@
+ 20100000386992
diff --git a/tests/qemucapabilitiesdata/caps_2.10.0.s390x.xml b/tests/qemuc=
apabilitiesdata/caps_2.10.0.s390x.xml
index 5e22e21224..7347f5683f 100644
--- a/tests/qemucapabilitiesdata/caps_2.10.0.s390x.xml
+++ b/tests/qemucapabilitiesdata/caps_2.10.0.s390x.xml
@@ -119,6 +119,7 @@
+ 20100000307899
diff --git a/tests/qemucapabilitiesdata/caps_2.10.0.x86_64.xml b/tests/qemu=
capabilitiesdata/caps_2.10.0.x86_64.xml
index 10b066bff1..d69a148cd2 100644
--- a/tests/qemucapabilitiesdata/caps_2.10.0.x86_64.xml
+++ b/tests/qemucapabilitiesdata/caps_2.10.0.x86_64.xml
@@ -203,6 +203,7 @@
+ 20100000367995
diff --git a/tests/qemucapabilitiesdata/caps_2.11.0.s390x.xml b/tests/qemuc=
apabilitiesdata/caps_2.11.0.s390x.xml
index 6ca2e57ef8..b359f9a049 100644
--- a/tests/qemucapabilitiesdata/caps_2.11.0.s390x.xml
+++ b/tests/qemucapabilitiesdata/caps_2.11.0.s390x.xml
@@ -126,6 +126,7 @@
+ 20110000346751
diff --git a/tests/qemucapabilitiesdata/caps_2.12.0.aarch64.xml b/tests/qem=
ucapabilitiesdata/caps_2.12.0.aarch64.xml
index ecc029f403..80e7afec04 100644
--- a/tests/qemucapabilitiesdata/caps_2.12.0.aarch64.xml
+++ b/tests/qemucapabilitiesdata/caps_2.12.0.aarch64.xml
@@ -169,6 +169,7 @@
+ 20110900347550
diff --git a/tests/qemucapabilitiesdata/caps_2.12.0.ppc64.xml b/tests/qemuc=
apabilitiesdata/caps_2.12.0.ppc64.xml
index 7139179304..c4b09c0003 100644
--- a/tests/qemucapabilitiesdata/caps_2.12.0.ppc64.xml
+++ b/tests/qemucapabilitiesdata/caps_2.12.0.ppc64.xml
@@ -167,6 +167,7 @@
+ 20110900428334
diff --git a/tests/qemucapabilitiesdata/caps_2.12.0.s390x.xml b/tests/qemuc=
apabilitiesdata/caps_2.12.0.s390x.xml
index 87d189e58d..1ff2fe45e1 100644
--- a/tests/qemucapabilitiesdata/caps_2.12.0.s390x.xml
+++ b/tests/qemucapabilitiesdata/caps_2.12.0.s390x.xml
@@ -133,6 +133,7 @@
+ 20120000375999
diff --git a/tests/qemucapabilitiesdata/caps_2.12.0.x86_64.xml b/tests/qemu=
capabilitiesdata/caps_2.12.0.x86_64.xml
index 9c1f6c327c..37d17786cf 100644
--- a/tests/qemucapabilitiesdata/caps_2.12.0.x86_64.xml
+++ b/tests/qemucapabilitiesdata/caps_2.12.0.x86_64.xml
@@ -211,6 +211,7 @@
+ 20110900416196
diff --git a/tests/qemucapabilitiesdata/caps_3.0.0.ppc64.xml b/tests/qemuca=
pabilitiesdata/caps_3.0.0.ppc64.xml
index 33cd00e613..57bf5dba11 100644
--- a/tests/qemucapabilitiesdata/caps_3.0.0.ppc64.xml
+++ b/tests/qemucapabilitiesdata/caps_3.0.0.ppc64.xml
@@ -167,6 +167,7 @@
+ 20120500446771
--=20
2.14.4
--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list
From nobody Fri Apr 19 01:31:01 2024
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 1531153487377492.50898429630695;
Mon, 9 Jul 2018 09:24:47 -0700 (PDT)
Received: from smtp.corp.redhat.com (int-mx12.intmail.prod.int.phx2.redhat.com
[10.5.11.27])
(using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits))
(No client certificate requested)
by mx1.redhat.com (Postfix) with ESMTPS id E871130820F4;
Mon, 9 Jul 2018 16:24:44 +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 AF29CBB907;
Mon, 9 Jul 2018 16:24:44 +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 5474413479;
Mon, 9 Jul 2018 16:24:44 +0000 (UTC)
Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.rdu2.redhat.com
[10.11.54.5])
by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP
id w69GOZbK020381 for ;
Mon, 9 Jul 2018 12:24:36 -0400
Received: by smtp.corp.redhat.com (Postfix)
id CD0427C4A; Mon, 9 Jul 2018 16:24:35 +0000 (UTC)
Received: from beluga.usersys.redhat.com (unknown [10.43.2.166])
by smtp.corp.redhat.com (Postfix) with ESMTP id 19DE551DF;
Mon, 9 Jul 2018 16:24:34 +0000 (UTC)
From: Erik Skultety
To: libvir-list@redhat.com
Date: Mon, 9 Jul 2018 18:24:14 +0200
Message-Id:
In-Reply-To:
References:
In-Reply-To:
References:
X-Scanned-By: MIMEDefang 2.79 on 10.11.54.5
X-loop: libvir-list@redhat.com
Cc: Erik Skultety
Subject: [libvirt] [PATCH v2 2/7] conf: 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.84 on 10.5.11.27
X-Greylist: Sender IP whitelisted,
not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.47]);
Mon, 09 Jul 2018 16:24:46 +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
---
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 | 35 +++++++++++++-
src/qemu/qemu_domain.c | 54 ++++++++++++++++++=
++++
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, 504 insertions(+), 4 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 a3afe137bf..9dd22554ad 100644
--- a/docs/formatdomain.html.in
+++ b/docs/formatdomain.html.in
@@ -6299,7 +6299,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
@@ -6358,6 +6359,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>
@@ -6463,6 +6469,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.
@@ -6498,6 +6510,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.
+