render / rpms / libvirt

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