mirror of https://gitee.com/openkylin/libvirt.git
qemu: cgroup: gfx: egl-headless: Add the DRI device into the cgroup list
Just like for SPICE, we need to put the render node DRI device into the device cgroup list so that users don't need to add it manually via qemu.conf file. Signed-off-by: Erik Skultety <eskultet@redhat.com> Reviewed-by: Ján Tomko <jtomko@redhat.com>
This commit is contained in:
parent
53ca6fa4ea
commit
dc87ee0f3e
|
@ -491,15 +491,11 @@ qemuSetupGraphicsCgroup(virDomainObjPtr vm,
|
|||
virDomainGraphicsDefPtr gfx)
|
||||
{
|
||||
qemuDomainObjPrivatePtr priv = vm->privateData;
|
||||
const char *rendernode = gfx->data.spice.rendernode;
|
||||
const char *rendernode = virDomainGraphicsGetRenderNode(gfx);
|
||||
int ret;
|
||||
|
||||
if (!virCgroupHasController(priv->cgroup, VIR_CGROUP_CONTROLLER_DEVICES))
|
||||
return 0;
|
||||
|
||||
if (gfx->type != VIR_DOMAIN_GRAPHICS_TYPE_SPICE ||
|
||||
gfx->data.spice.gl != VIR_TRISTATE_BOOL_YES ||
|
||||
!rendernode)
|
||||
if (!rendernode ||
|
||||
!virCgroupHasController(priv->cgroup, VIR_CGROUP_CONTROLLER_DEVICES))
|
||||
return 0;
|
||||
|
||||
ret = virCgroupAllowDevicePath(priv->cgroup, rendernode,
|
||||
|
|
Loading…
Reference in New Issue