99cbc7
From 6203494c845ce2c2468485274d64f4e041ad4a5b Mon Sep 17 00:00:00 2001
99cbc7
Message-Id: <6203494c845ce2c2468485274d64f4e041ad4a5b@dist-git>
99cbc7
From: Erik Skultety <eskultet@redhat.com>
99cbc7
Date: Tue, 9 Apr 2019 08:34:29 +0200
99cbc7
Subject: [PATCH] qemu: caps: Introduce QEMU_EGL_HEADLESS_RENDERNODE capability
99cbc7
MIME-Version: 1.0
99cbc7
Content-Type: text/plain; charset=UTF-8
99cbc7
Content-Transfer-Encoding: 8bit
99cbc7
99cbc7
Now that we have QAPI introspection of display types in QEMU upstream,
99cbc7
we can check whether the 'rendernode' option is supported with
99cbc7
egl-headless display type.
99cbc7
99cbc7
Signed-off-by: Erik Skultety <eskultet@redhat.com>
99cbc7
Reviewed-by: Ján Tomko <jtomko@redhat.com>
99cbc7
(cherry picked from commit 312063b7664c992f959028ef516402ce175c3dfc)
99cbc7
99cbc7
https://bugzilla.redhat.com/show_bug.cgi?id=1628892
99cbc7
Signed-off-by: Erik Skultety <eskultet@redhat.com>
99cbc7
99cbc7
 Conflicts:
99cbc7
	src/qemu/qemu_capabilities.c
99cbc7
	src/qemu/qemu_capabilities.h
99cbc7
	tests/qemucapabilitiesdata/caps_3.1.0.x86_64.xml
99cbc7
            Context - several other capabilities were not backported.
99cbc7
Message-Id: <c7b6c70550d4ce83b8a692a1cd2b94f2c8aac402.1554791287.git.eskultet@redhat.com>
99cbc7
99cbc7
Reviewed-by: Jiri Denemark <jdenemar@redhat.com>
99cbc7
---
99cbc7
 src/qemu/qemu_capabilities.c                     | 2 ++
99cbc7
 src/qemu/qemu_capabilities.h                     | 1 +
99cbc7
 tests/qemucapabilitiesdata/caps_3.1.0.x86_64.xml | 1 +
99cbc7
 3 files changed, 4 insertions(+)
99cbc7
99cbc7
diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c
99cbc7
index a27ea85824..66eefae988 100644
99cbc7
--- a/src/qemu/qemu_capabilities.c
99cbc7
+++ b/src/qemu/qemu_capabilities.c
99cbc7
@@ -507,6 +507,7 @@ VIR_ENUM_IMPL(virQEMUCaps, QEMU_CAPS_LAST,
99cbc7
 
99cbc7
               /* 315 */
99cbc7
               "vfio-pci.display",
99cbc7
+              "egl-headless.rendernode"
99cbc7
     );
99cbc7
 
99cbc7
 
99cbc7
@@ -1306,6 +1307,7 @@ static struct virQEMUCapsStringFlags virQEMUCapsQMPSchemaQueries[] = {
99cbc7
     { "blockdev-add/arg-type/+qcow2/encrypt/+luks/key-secret", QEMU_CAPS_QCOW2_LUKS },
99cbc7
     { "nbd-server-start/arg-type/tls-creds", QEMU_CAPS_NBD_TLS },
99cbc7
     { "screendump/arg-type/device", QEMU_CAPS_SCREENDUMP_DEVICE },
99cbc7
+    { "query-display-options/ret-type/+egl-headless/rendernode", QEMU_CAPS_EGL_HEADLESS_RENDERNODE },
99cbc7
 };
99cbc7
 
99cbc7
 typedef struct _virQEMUCapsObjectTypeProps virQEMUCapsObjectTypeProps;
99cbc7
diff --git a/src/qemu/qemu_capabilities.h b/src/qemu/qemu_capabilities.h
99cbc7
index 25ad4218e0..76916d02fa 100644
99cbc7
--- a/src/qemu/qemu_capabilities.h
99cbc7
+++ b/src/qemu/qemu_capabilities.h
99cbc7
@@ -491,6 +491,7 @@ typedef enum { /* virQEMUCapsFlags grouping marker for syntax-check */
99cbc7
 
99cbc7
     /* 315 */
99cbc7
     QEMU_CAPS_VFIO_PCI_DISPLAY, /* -device vfio-pci.display */
99cbc7
+    QEMU_CAPS_EGL_HEADLESS_RENDERNODE, /* -display egl-headless,rendernode= */
99cbc7
 
99cbc7
     QEMU_CAPS_LAST /* this must always be the last item */
99cbc7
 } virQEMUCapsFlags;
99cbc7
diff --git a/tests/qemucapabilitiesdata/caps_3.1.0.x86_64.xml b/tests/qemucapabilitiesdata/caps_3.1.0.x86_64.xml
99cbc7
index cbeea14796..be044c6a7a 100644
99cbc7
--- a/tests/qemucapabilitiesdata/caps_3.1.0.x86_64.xml
99cbc7
+++ b/tests/qemucapabilitiesdata/caps_3.1.0.x86_64.xml
99cbc7
@@ -215,6 +215,7 @@
99cbc7
   <flag name='usb-storage.werror'/>
99cbc7
   <flag name='egl-headless'/>
99cbc7
   <flag name='vfio-pci.display'/>
99cbc7
+  <flag name='egl-headless.rendernode'/>
99cbc7
   <version>3000092</version>
99cbc7
   <kvmVersion>0</kvmVersion>
99cbc7
   <microcodeVersion>441682</microcodeVersion>
99cbc7
-- 
99cbc7
2.21.0
99cbc7