
On Tue, Jun 15, 2021 at 12:56:29 +0200, Thomas Huth wrote:
On 15/06/2021 12.01, 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.
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 ff7fce76dd..bd60460771 100644 --- a/src/qemu/qemu_capabilities.c +++ b/src/qemu/qemu_capabilities.c @@ -6085,7 +6085,8 @@ virQEMUCapsFillDomainDeviceGraphicsCaps(virQEMUCaps *qemuCaps, dev->supported = VIR_TRISTATE_BOOL_YES; dev->type.report = true;
- VIR_DOMAIN_CAPS_ENUM_SET(dev->type, VIR_DOMAIN_GRAPHICS_TYPE_SDL); + if (virQEMUCapsGet(qemuCaps, QEMU_CAPS_SDL)) + VIR_DOMAIN_CAPS_ENUM_SET(dev->type, VIR_DOMAIN_GRAPHICS_TYPE_SDL); if (virQEMUCapsGet(qemuCaps, QEMU_CAPS_VNC)) VIR_DOMAIN_CAPS_ENUM_SET(dev->type, VIR_DOMAIN_GRAPHICS_TYPE_VNC); if (virQEMUCapsGet(qemuCaps, QEMU_CAPS_SPICE))
Thanks for tackling the libvirt side, Peter!
Reviewed-by: Thomas Huth <thuth@redhat.com>
(PS: We could now also test VIR_DOMAIN_GRAPHICS_TYPE_EGL_HEADLESS in the same way in this function now, I guess)
Indeed. When adding the capability I've noticed one for EGL and thought it's already handled, but it was actually QEMU_CAPS_EGL_HEADLESS_RENDERNODE, thus EGL itself isn't handled.