[libvirt] [PATCH 07/12] qemu: domain: Put the egl-headless' rendernode device into the namespace
Ján Tomko
jtomko at redhat.com
Thu Nov 22 17:33:23 UTC 2018
On Thu, Nov 22, 2018 at 05:36:05PM +0100, Erik Skultety wrote:
>Just like for SPICE, we need to put the DRI device into the namespace,
>otherwise it will be left out from the DAC relabeling process.
>
>Signed-off-by: Erik Skultety <eskultet at redhat.com>
>---
> src/qemu/qemu_domain.c | 15 +++++++++++----
> 1 file changed, 11 insertions(+), 4 deletions(-)
>
>diff --git a/src/qemu/qemu_domain.c b/src/qemu/qemu_domain.c
>index 2f65bbe34e..569b35bcd0 100644
>--- a/src/qemu/qemu_domain.c
>+++ b/src/qemu/qemu_domain.c
>@@ -11877,11 +11877,18 @@ qemuDomainSetupGraphics(virQEMUDriverConfigPtr cfg ATTRIBUTE_UNUSED,
> virDomainGraphicsDefPtr gfx,
> const struct qemuDomainCreateDeviceData *data)
> {
>- const char *rendernode = gfx->data.spice.rendernode;
>+ const char *rendernode = NULL;
>
>- if (gfx->type != VIR_DOMAIN_GRAPHICS_TYPE_SPICE ||
>- gfx->data.spice.gl != VIR_TRISTATE_BOOL_YES ||
>- !rendernode)
>+ if (gfx->type != VIR_DOMAIN_GRAPHICS_TYPE_SPICE &&
>+ gfx->type != VIR_DOMAIN_GRAPHICS_TYPE_EGL_HEADLESS)
>+ return 0;
>+
>+ if (gfx->type == VIR_DOMAIN_GRAPHICS_TYPE_SPICE)
>+ rendernode = gfx->data.spice.rendernode;
>+ else
>+ rendernode = gfx->data.egl_headless.rendernode;
>+
These changes are repetitive, consider a helper like virDomainInputDefGetPath
Jano
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20181122/b9cf04b1/attachment-0001.sig>
More information about the libvir-list
mailing list