render / rpms / libvirt

Forked from rpms/libvirt 9 months ago
Clone
0a7476
From 2dbe8c5a7106596ae03e265adb3ba1bb49feeeda Mon Sep 17 00:00:00 2001
0a7476
Message-Id: <2dbe8c5a7106596ae03e265adb3ba1bb49feeeda@dist-git>
0a7476
From: Erik Skultety <eskultet@redhat.com>
0a7476
Date: Tue, 9 Apr 2019 08:34:33 +0200
0a7476
Subject: [PATCH] qemu: cgroup: gfx: egl-headless: Add the DRI device into the
0a7476
 cgroup list
0a7476
MIME-Version: 1.0
0a7476
Content-Type: text/plain; charset=UTF-8
0a7476
Content-Transfer-Encoding: 8bit
0a7476
0a7476
Just like for SPICE, we need to put the render node DRI device into the
0a7476
device cgroup list so that users don't need to add it manually via
0a7476
qemu.conf file.
0a7476
0a7476
Signed-off-by: Erik Skultety <eskultet@redhat.com>
0a7476
Reviewed-by: Ján Tomko <jtomko@redhat.com>
0a7476
(cherry picked from commit dc87ee0f3e9cb7982d66230cd2d83b3577275564)
0a7476
0a7476
https: //bugzilla.redhat.com/show_bug.cgi?id=1628892
0a7476
Signed-off-by: Erik Skultety <eskultet@redhat.com>
0a7476
Message-Id: <0f769bd757581c2204c8db960699ed36fab26cef.1554791287.git.eskultet@redhat.com>
0a7476
Reviewed-by: Jiri Denemark <jdenemar@redhat.com>
0a7476
---
0a7476
 src/qemu/qemu_cgroup.c | 10 +++-------
0a7476
 1 file changed, 3 insertions(+), 7 deletions(-)
0a7476
0a7476
diff --git a/src/qemu/qemu_cgroup.c b/src/qemu/qemu_cgroup.c
0a7476
index c8fba7f9e6..b679238bfc 100644
0a7476
--- a/src/qemu/qemu_cgroup.c
0a7476
+++ b/src/qemu/qemu_cgroup.c
0a7476
@@ -489,15 +489,11 @@ qemuSetupGraphicsCgroup(virDomainObjPtr vm,
0a7476
                         virDomainGraphicsDefPtr gfx)
0a7476
 {
0a7476
     qemuDomainObjPrivatePtr priv = vm->privateData;
0a7476
-    const char *rendernode = gfx->data.spice.rendernode;
0a7476
+    const char *rendernode = virDomainGraphicsGetRenderNode(gfx);
0a7476
     int ret;
0a7476
 
0a7476
-    if (!virCgroupHasController(priv->cgroup, VIR_CGROUP_CONTROLLER_DEVICES))
0a7476
-        return 0;
0a7476
-
0a7476
-    if (gfx->type != VIR_DOMAIN_GRAPHICS_TYPE_SPICE ||
0a7476
-        gfx->data.spice.gl != VIR_TRISTATE_BOOL_YES ||
0a7476
-        !rendernode)
0a7476
+    if (!rendernode ||
0a7476
+        !virCgroupHasController(priv->cgroup, VIR_CGROUP_CONTROLLER_DEVICES))
0a7476
         return 0;
0a7476
 
0a7476
     ret = virCgroupAllowDevicePath(priv->cgroup, rendernode,
0a7476
-- 
0a7476
2.21.0
0a7476