[libvirt] [PATCH v2 00/13] Autoselect a DRM node for egl-headless and add it to cmdline

Erik Skultety posted 13 patches 2 weeks ago
Test syntax-check passed
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/libvirt tags/patchew/cover.1543411815.git.eskultet@redhat.com
docs/formatdomain.html.in                     |    11 +-
docs/schemas/domaincommon.rng                 |    17 +-
src/conf/domain_conf.c                        |    84 +
src/conf/domain_conf.h                        |    12 +
src/libvirt_private.syms                      |     4 +
src/qemu/qemu_capabilities.c                  |     2 +
src/qemu/qemu_capabilities.h                  |     1 +
src/qemu/qemu_cgroup.c                        |    10 +-
src/qemu/qemu_command.c                       |    39 +-
src/qemu/qemu_domain.c                        |     9 +-
src/qemu/qemu_process.c                       |    21 +
src/security/security_dac.c                   |    15 +-
src/util/virutil.c                            |    53 +
src/util/virutil.h                            |     2 +
.../caps_3.1.0.x86_64.replies                 | 22911 ++++++++++++++++
.../caps_3.1.0.x86_64.xml                     |  1376 +
tests/qemucapabilitiestest.c                  |     1 +
...graphics-egl-headless-rendernode-auto.args |    26 +
.../graphics-egl-headless-rendernode-auto.xml |     1 +
.../graphics-egl-headless-rendernode.xml      |    33 +
.../graphics-egl-headless.args                |     2 +-
.../graphics-spice-egl-headless.args          |     2 +-
.../graphics-spice-gl-no-rendernode.args      |    25 +
.../graphics-spice-gl-no-rendernode.xml       |    24 +
.../graphics-vnc-egl-headless.args            |     2 +-
...play-spice-egl-headless.x86_64-latest.args |     2 +-
...isplay-vnc-egl-headless.x86_64-latest.args |     2 +-
tests/qemuxml2argvmock.c                      |     9 +
tests/qemuxml2argvtest.c                      |     7 +
.../graphics-egl-headless-rendernode.xml      |    41 +
tests/qemuxml2xmltest.c                       |     2 +
31 files changed, 24711 insertions(+), 35 deletions(-)
create mode 100644 tests/qemucapabilitiesdata/caps_3.1.0.x86_64.replies
create mode 100644 tests/qemucapabilitiesdata/caps_3.1.0.x86_64.xml
create mode 100644 tests/qemuxml2argvdata/graphics-egl-headless-rendernode-auto.args
create mode 120000 tests/qemuxml2argvdata/graphics-egl-headless-rendernode-auto.xml
create mode 100644 tests/qemuxml2argvdata/graphics-egl-headless-rendernode.xml
create mode 100644 tests/qemuxml2argvdata/graphics-spice-gl-no-rendernode.args
create mode 100644 tests/qemuxml2argvdata/graphics-spice-gl-no-rendernode.xml
create mode 100644 tests/qemuxml2xmloutdata/graphics-egl-headless-rendernode.xml

[libvirt] [PATCH v2 00/13] Autoselect a DRM node for egl-headless and add it to cmdline

Posted by Erik Skultety 2 weeks ago
Fixes https://bugzilla.redhat.com/show_bug.cgi?id=1628892.
The problem is that we didn't put the DRI device into the namespace for QEMU to
access, but that was only a part of the issue. The other part of the issue is
that QEMU doesn't support specifying 'rendernode' for egl-headless yet (patches
are already merged upstream for 3.1) Instead, QEMU's been autoselecting the
DRI device on its own. There's no compelling reason for libvirt not doing that
instead and thus prevent any permission-related issues.

Since v1:
- updated capabilities to 3.1.0-rc2 containing the necessary QEMU patches
- provided more test cases as requested
- added a new XML sub-element <gl> for egl-headless graphics type

Erik Skultety (13):
  util: Introduce virHostGetDRMRenderNode helper
  conf: Introduce virDomainGraphics-related helpers
  qemu: process: spice: Pick the first available DRM render node
  qemu: command: Introduce qemuBuildGraphicsEGLHeadlessCommandLine
    helper
  qemu: caps: Introduce QEMU_EGL_HEADLESS_RENDERNODE capability
  squash into rendernode capability patch
  conf: gfx: Add egl-headless as a member to virDomainGraphicsDef struct
  conf: gfx: egl-headless: Introduce a new <gl> subelement
  qemu: process: gfx: egl-headless: Pick the first available DRM node
  qemu: domain: egl-headless: Add the DRI device into the namespace
  qemu: cgroup: gfx: egl-headless: Add the DRI device into the cgroup
    list
  security: dac: gfx: egl-headless: Relabel the DRI device
  qemu: command: gfx: egl-headless: Add 'rendernode' option to the
    cmdline

 docs/formatdomain.html.in                     |    11 +-
 docs/schemas/domaincommon.rng                 |    17 +-
 src/conf/domain_conf.c                        |    84 +
 src/conf/domain_conf.h                        |    12 +
 src/libvirt_private.syms                      |     4 +
 src/qemu/qemu_capabilities.c                  |     2 +
 src/qemu/qemu_capabilities.h                  |     1 +
 src/qemu/qemu_cgroup.c                        |    10 +-
 src/qemu/qemu_command.c                       |    39 +-
 src/qemu/qemu_domain.c                        |     9 +-
 src/qemu/qemu_process.c                       |    21 +
 src/security/security_dac.c                   |    15 +-
 src/util/virutil.c                            |    53 +
 src/util/virutil.h                            |     2 +
 .../caps_3.1.0.x86_64.replies                 | 22911 ++++++++++++++++
 .../caps_3.1.0.x86_64.xml                     |  1376 +
 tests/qemucapabilitiestest.c                  |     1 +
 ...graphics-egl-headless-rendernode-auto.args |    26 +
 .../graphics-egl-headless-rendernode-auto.xml |     1 +
 .../graphics-egl-headless-rendernode.xml      |    33 +
 .../graphics-egl-headless.args                |     2 +-
 .../graphics-spice-egl-headless.args          |     2 +-
 .../graphics-spice-gl-no-rendernode.args      |    25 +
 .../graphics-spice-gl-no-rendernode.xml       |    24 +
 .../graphics-vnc-egl-headless.args            |     2 +-
 ...play-spice-egl-headless.x86_64-latest.args |     2 +-
 ...isplay-vnc-egl-headless.x86_64-latest.args |     2 +-
 tests/qemuxml2argvmock.c                      |     9 +
 tests/qemuxml2argvtest.c                      |     7 +
 .../graphics-egl-headless-rendernode.xml      |    41 +
 tests/qemuxml2xmltest.c                       |     2 +
 31 files changed, 24711 insertions(+), 35 deletions(-)
 create mode 100644 tests/qemucapabilitiesdata/caps_3.1.0.x86_64.replies
 create mode 100644 tests/qemucapabilitiesdata/caps_3.1.0.x86_64.xml
 create mode 100644 tests/qemuxml2argvdata/graphics-egl-headless-rendernode-auto.args
 create mode 120000 tests/qemuxml2argvdata/graphics-egl-headless-rendernode-auto.xml
 create mode 100644 tests/qemuxml2argvdata/graphics-egl-headless-rendernode.xml
 create mode 100644 tests/qemuxml2argvdata/graphics-spice-gl-no-rendernode.args
 create mode 100644 tests/qemuxml2argvdata/graphics-spice-gl-no-rendernode.xml
 create mode 100644 tests/qemuxml2xmloutdata/graphics-egl-headless-rendernode.xml

--
2.19.1

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list

Re: [libvirt] [PATCH v2 00/13] Autoselect a DRM node for egl-headless and add it to cmdline

Posted by Erik Skultety 2 weeks ago
On Wed, Nov 28, 2018 at 02:38:10PM +0100, Erik Skultety wrote:
> Fixes https://bugzilla.redhat.com/show_bug.cgi?id=1628892.
> The problem is that we didn't put the DRI device into the namespace for QEMU to
> access, but that was only a part of the issue. The other part of the issue is
> that QEMU doesn't support specifying 'rendernode' for egl-headless yet (patches
> are already merged upstream for 3.1) Instead, QEMU's been autoselecting the
> DRI device on its own. There's no compelling reason for libvirt not doing that
> instead and thus prevent any permission-related issues.
>
> Since v1:
> - updated capabilities to 3.1.0-rc2 containing the necessary QEMU patches
> - provided more test cases as requested
> - added a new XML sub-element <gl> for egl-headless graphics type
>
> Erik Skultety (13):
>   util: Introduce virHostGetDRMRenderNode helper
>   conf: Introduce virDomainGraphics-related helpers
>   qemu: process: spice: Pick the first available DRM render node
>   qemu: command: Introduce qemuBuildGraphicsEGLHeadlessCommandLine
>     helper
>   qemu: caps: Introduce QEMU_EGL_HEADLESS_RENDERNODE capability
>   squash into rendernode capability patch
>   conf: gfx: Add egl-headless as a member to virDomainGraphicsDef struct
>   conf: gfx: egl-headless: Introduce a new <gl> subelement
>   qemu: process: gfx: egl-headless: Pick the first available DRM node
>   qemu: domain: egl-headless: Add the DRI device into the namespace
>   qemu: cgroup: gfx: egl-headless: Add the DRI device into the cgroup
>     list
>   security: dac: gfx: egl-headless: Relabel the DRI device
>   qemu: command: gfx: egl-headless: Add 'rendernode' option to the
>     cmdline

You can ignore this version, I made a small changes in couple of the patches
and I need to rebase on to the 3.1.0 QEMU caps anyway and I also converted the
tests to use DO_TEST_CAPS_LATEST. I'll re-spin in a while.

Erik

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list