Skip to contentSkip to conversation

Fixes 31 20181116 patches

GIT PULL Applied Gerd Hoffmann 4 participants 7 messages Nov 16, 2018 – Nov 19, 2018

lore
Share & tools
lore
#0 lore raw

The following changes since commit cb968d275c145467c8b385a3618a207ec111eab1:

Update version for v3.1.0-rc1 release (2018-11-13 18:16:14 +0000)

are available in the git repository at:

git://git.kraxel.org/qemu tags/fixes-31-20181116-pull-request

for you to fetch changes up to 144aaa990e0d54d08865c4d98ba2138a89689530:

help: Provide help for egl-headless (2018-11-16 11:44:22 +0100)

----------------------------------------------------------------
ui: add rendernode arg for egl-headless (fixes permission issues with libvirt)

----------------------------------------------------------------

Erik Skultety (3):
qapi: Add "rendernode" display option for egl-headless
ui: Allow specifying 'rendernode' display option for egl-headless
help: Provide help for egl-headless

 ui/egl-headless.c |  2 +-
 qapi/ui.json      | 17 ++++++++++++++++-
 qemu-options.hx   |  6 +++++-
 3 files changed, 22 insertions(+), 3 deletions(-)
Signature · 1 line
2.9.3
#1 lore raw

[Qemu-devel] [PULL 1/3] qapi: Add "rendernode" display option for egl-headless

From: Erik Skultety <[email protected]>

Unlike SPICE, egl-headless doesn't offer a way of specifying the DRM node used for OpenGL, hence QEMU always selecting the first one that is available. Thus, add the 'rendernode' option for egl-headless to QAPI.

Message-id: 7658e15eca72d520e7a5fb1c2e724702d83d4f7f.1542362949.git.eskultet@redhat.com

---
 qapi/ui.json | 17 ++++++++++++++++-
 1 file changed, 16 insertions(+), 1 deletion(-)
qapi/ui.json +16 -1
index bf9e157d5a..e0000248d3 100644
@@ -1037,6 +1037,20 @@
   'data'    : { '*grab-on-hover' : 'bool',
                 '*zoom-to-fit'   : 'bool'  } }
 
+##
+# @DisplayEGLHeadless:
+#
+# EGL headless display options.
+#
+# @rendernode: Which DRM render node should be used. Default is the first
+#              available node on the host.
+#
+# Since: 3.1
+#
+##
+{ 'struct'  : 'DisplayEGLHeadless',
+  'data'    : { '*rendernode' : 'str' } }
+
  ##
  # @DisplayGLMode:
  #
@@ -1086,4 +1100,5 @@
                 '*window-close'  : 'bool',
                 '*gl'            : 'DisplayGLMode' },
   'discriminator' : 'type',
-  'data'    : { 'gtk'            : 'DisplayGTK' } }
+  'data'    : { 'gtk'            : 'DisplayGTK',
+                'egl-headless'   : 'DisplayEGLHeadless'} }
Signature · 1 line
2.9.3
#2 lore raw

Re: [Qemu-devel] [PULL 1/3] qapi: Add "rendernode" display option for egl-headless

Quoted 6 lines · Gerd Hoffmann

From: Erik Skultety <[email protected]>

Unlike SPICE, egl-headless doesn't offer a way of specifying the DRM node used for OpenGL, hence QEMU always selecting the first one that is available. Thus, add the 'rendernode' option for egl-headless to QAPI.

Quoted 6 lines

Message-id: 7658e15eca72d520e7a5fb1c2e724702d83d4f7f.1542362949.git.eskultet@redhat.com

---
  qapi/ui.json | 17 ++++++++++++++++-
  1 file changed, 16 insertions(+), 1 deletion(-)

This has already landed, but I noticed via an off-list discussion that it is not introspectible through query-qmp-schema, because DisplayOptions is currently used only for command line handling. I don't know off-hand whether query-command-line-options even exposes the existence of DisplayOptions (not all of our command line options can be queried), but even if it does, I also know that our current command line queries are not detailed enough to readily expose the addition of a new optional member. I think it would be appropriate for the 3.1 timeframe to add a new QMP command that exposes the display configuration set up at runtime, if only so that the DisplayOptions becomes visible through query-qmp-commands as a bug fix for making this change easier to use.

Signature · 3 lines
Eric Blake, Principal Software Engineer
Red Hat, Inc.           +1-919-301-3266
Virtualization:  qemu.org | libvirt.org
#3 lore raw

Re: [Qemu-devel] [PULL 1/3] qapi: Add "rendernode" display option for egl-headless

Quoted 14 lines · Eric Blake
Quoted 6 lines · Gerd Hoffmann

From: Erik Skultety <[email protected]>

Unlike SPICE, egl-headless doesn't offer a way of specifying the DRM node used for OpenGL, hence QEMU always selecting the first one that is available. Thus, add the 'rendernode' option for egl-headless to QAPI.

Quoted 6 lines

Message-id: 7658e15eca72d520e7a5fb1c2e724702d83d4f7f.1542362949.git.eskultet@redhat.com

---
  qapi/ui.json | 17 ++++++++++++++++-
  1 file changed, 16 insertions(+), 1 deletion(-)
Quoted 4 lines

This has already landed, but I noticed via an off-list discussion that it is not introspectible through query-qmp-schema, because DisplayOptions is currently used only for command line handling. I don't know off-hand whether query-command-line-options even exposes the existence of DisplayOptions (not

It does not...

Quoted 7 lines

all of our command line options can be queried), but even if it does, I also know that our current command line queries are not detailed enough to readily expose the addition of a new optional member. I think it would be appropriate for the 3.1 timeframe to add a new QMP command that exposes the display configuration set up at runtime, if only so that the DisplayOptions becomes visible through query-qmp-commands as a bug fix for making this change easier to use.

That would be awesome

Erik

#4 lore raw

[Qemu-devel] [PULL 3/3] help: Provide help for egl-headless

In reply to Gerd Hoffmann

From: Erik Skultety <[email protected]>

EGL headless has been missing from QEMU's help or man page, we should mention that such a thing exists, especially since projects like libvirt might rely on that. This patch also adds the newly introduced option for egl-headless 'rendernode'.

Message-id: 87ef678b0934d3abba66c46c9e65b57119d29295.1542362949.git.eskultet@redhat.com

---
 qemu-options.hx | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)
qemu-options.hx +5 -1
index ee379b32e3..f7df472f43 100644
@@ -1216,7 +1216,8 @@ DEF("display", HAS_ARG, QEMU_OPTION_display,
     "-display gtk[,grab_on_hover=on|off][,gl=on|off]|\n"
     "-display vnc=<display>[,<optargs>]\n"
     "-display curses\n"
-    "-display none"
+    "-display none\n"
+    "-display egl-headless[,rendernode=<file>]"
     "                select display type\n"
     "The default display is equivalent to\n"
 #if defined(CONFIG_GTK)
@@ -1258,6 +1259,9 @@ menus and other UI elements to configure and control the VM during
 runtime.
 @item vnc
 Start a VNC server on display <arg>
+@item egl-headless
+Offload all OpenGL operations to a local DRI device. For any graphical display,
+this display needs to be paired with either VNC or SPICE displays.
 @end table
 ETEXI
 
Signature · 1 line
2.9.3
#5 lore raw

[Qemu-devel] [PULL 2/3] ui: Allow specifying 'rendernode' display option for egl-headless

In reply to Gerd Hoffmann

From: Erik Skultety <[email protected]>

As libvirt can't predict which rendernode QEMU would pick, it won't adjust the permissions on the device, hence QEMU getting "Permission denied" when opening the DRI device. Therefore, enable 'rendernode' option for egl-headless display type.

Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1648236

Message-id: 27f4617f19aa1072114f10f1aa9dd199735ef982.1542362949.git.eskultet@redhat.com

---
 ui/egl-headless.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
ui/egl-headless.c +1 -1
index 42a41310b0..4cf3bbc0e4 100644
@@ -176,7 +176,7 @@ static void egl_headless_init(DisplayState *ds, DisplayOptions *opts)
     egl_dpy *edpy;
     int idx;
 
-    if (egl_rendernode_init(NULL, mode) < 0) {
+    if (egl_rendernode_init(opts->u.egl_headless.rendernode, mode) < 0) {
         error_report("egl: render node init failed");
         exit(1);
     }
Signature · 1 line
2.9.3
#6 lore raw
In reply to Gerd Hoffmann
Quoted 22 lines · Gerd Hoffmann

The following changes since commit cb968d275c145467c8b385a3618a207ec111eab1:

Update version for v3.1.0-rc1 release (2018-11-13 18:16:14 +0000)

are available in the git repository at:

git://git.kraxel.org/qemu tags/fixes-31-20181116-pull-request

for you to fetch changes up to 144aaa990e0d54d08865c4d98ba2138a89689530:

help: Provide help for egl-headless (2018-11-16 11:44:22 +0100)

----------------------------------------------------------------
ui: add rendernode arg for egl-headless (fixes permission issues with libvirt)

----------------------------------------------------------------

Erik Skultety (3):
qapi: Add "rendernode" display option for egl-headless
ui: Allow specifying 'rendernode' display option for egl-headless
help: Provide help for egl-headless

Quoted 4 lines
 ui/egl-headless.c |  2 +-
 qapi/ui.json      | 17 ++++++++++++++++-
 qemu-options.hx   |  6 +++++-
 3 files changed, 22 insertions(+), 3 deletions(-)

Applied, thanks.

-- PMM