[PATCH 3/3] qemu: capabilities: Fill SDL graphics support only when it's really supported

Peter Krempa posted 3 patches 4 years, 7 months ago
[PATCH 3/3] qemu: capabilities: Fill SDL graphics support only when it's really supported
Posted by Peter Krempa 4 years, 7 months ago
virQEMUCapsFillDomainDeviceGraphicsCaps fills data needed both for
validation of the graphics type and also for correct display in the
(dom)capablities XML.

Signal the support for SDL only when qemu has the capability.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
---
 src/qemu/qemu_capabilities.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c
index a1f1a2b23e..d1cd8f11ac 100644
--- a/src/qemu/qemu_capabilities.c
+++ b/src/qemu/qemu_capabilities.c
@@ -6066,7 +6066,8 @@ virQEMUCapsFillDomainDeviceGraphicsCaps(virQEMUCaps *qemuCaps,
         VIR_DOMAIN_CAPS_ENUM_SET(dev->type, VIR_DOMAIN_GRAPHICS_TYPE_VNC);
     if (virQEMUCapsGet(qemuCaps, QEMU_CAPS_SPICE))
         VIR_DOMAIN_CAPS_ENUM_SET(dev->type, VIR_DOMAIN_GRAPHICS_TYPE_SPICE);
-    VIR_DOMAIN_CAPS_ENUM_SET(dev->type, VIR_DOMAIN_GRAPHICS_TYPE_EGL_HEADLESS);
+    if (virQEMUCapsGet(qemuCaps, QEMU_CAPS_EGL_HEADLESS))
+        VIR_DOMAIN_CAPS_ENUM_SET(dev->type, VIR_DOMAIN_GRAPHICS_TYPE_EGL_HEADLESS);
 }


-- 
2.31.1

Re: [PATCH 3/3] qemu: capabilities: Fill SDL graphics support only when it's really supported
Posted by Thomas Huth 4 years, 7 months ago
On 15/06/2021 18.05, Peter Krempa wrote:
> virQEMUCapsFillDomainDeviceGraphicsCaps fills data needed both for
> validation of the graphics type and also for correct display in the
> (dom)capablities XML.
> 
> Signal the support for SDL only when qemu has the capability.

Please replace SDL here and in the title with egl-headless :-)

  Thomas

> Signed-off-by: Peter Krempa <pkrempa@redhat.com>
> ---
>   src/qemu/qemu_capabilities.c | 3 ++-
>   1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c
> index a1f1a2b23e..d1cd8f11ac 100644
> --- a/src/qemu/qemu_capabilities.c
> +++ b/src/qemu/qemu_capabilities.c
> @@ -6066,7 +6066,8 @@ virQEMUCapsFillDomainDeviceGraphicsCaps(virQEMUCaps *qemuCaps,
>           VIR_DOMAIN_CAPS_ENUM_SET(dev->type, VIR_DOMAIN_GRAPHICS_TYPE_VNC);
>       if (virQEMUCapsGet(qemuCaps, QEMU_CAPS_SPICE))
>           VIR_DOMAIN_CAPS_ENUM_SET(dev->type, VIR_DOMAIN_GRAPHICS_TYPE_SPICE);
> -    VIR_DOMAIN_CAPS_ENUM_SET(dev->type, VIR_DOMAIN_GRAPHICS_TYPE_EGL_HEADLESS);
> +    if (virQEMUCapsGet(qemuCaps, QEMU_CAPS_EGL_HEADLESS))
> +        VIR_DOMAIN_CAPS_ENUM_SET(dev->type, VIR_DOMAIN_GRAPHICS_TYPE_EGL_HEADLESS);
>   }
> 
> 

Re: [PATCH 3/3] qemu: capabilities: Fill SDL graphics support only when it's really supported
Posted by Peter Krempa 4 years, 7 months ago
On Tue, Jun 15, 2021 at 21:40:16 +0200, Thomas Huth wrote:
> On 15/06/2021 18.05, Peter Krempa wrote:
> > virQEMUCapsFillDomainDeviceGraphicsCaps fills data needed both for
> > validation of the graphics type and also for correct display in the
> > (dom)capablities XML.
> > 
> > Signal the support for SDL only when qemu has the capability.
> 
> Please replace SDL here and in the title with egl-headless :-)

Oops ... I stole the commit message from the SDL patch and when trying
to fix/ammend it I probably re-used the '-c' option again so it has
undone my fixes ... sigh. :D