|
|
99cbc7 |
From 7e67a192b18a3577baddc1c46d8e5428d30f89d3 Mon Sep 17 00:00:00 2001
|
|
|
99cbc7 |
Message-Id: <7e67a192b18a3577baddc1c46d8e5428d30f89d3@dist-git>
|
|
|
99cbc7 |
From: Erik Skultety <eskultet@redhat.com>
|
|
|
99cbc7 |
Date: Thu, 19 Jul 2018 15:03:57 +0200
|
|
|
99cbc7 |
Subject: [PATCH] qemu: caps: Introduce a capability for egl-headless
|
|
|
99cbc7 |
MIME-Version: 1.0
|
|
|
99cbc7 |
Content-Type: text/plain; charset=UTF-8
|
|
|
99cbc7 |
Content-Transfer-Encoding: 8bit
|
|
|
99cbc7 |
|
|
|
99cbc7 |
Since QEMU 2.10, it's possible to use a new type of display -
|
|
|
99cbc7 |
egl-headless which uses drm nodes to provide OpenGL support. This patch
|
|
|
99cbc7 |
adds a capability for that. However, since QEMU doesn't provide a QMP
|
|
|
99cbc7 |
command to probe it, we have to base the capability on specific QEMU
|
|
|
99cbc7 |
version.
|
|
|
99cbc7 |
|
|
|
99cbc7 |
Acked-by: Michal Privoznik <mprivozn@redhat.com>
|
|
|
99cbc7 |
Reviewed-by: Ján Tomko <jtomko@redhat.com>
|
|
|
99cbc7 |
Signed-off-by: Erik Skultety <eskultet@redhat.com>
|
|
|
99cbc7 |
(cherry picked from commit 7ab7d0ed49d8501198b33c655cc646667d333f8c)
|
|
|
99cbc7 |
|
|
|
99cbc7 |
https://bugzilla.redhat.com/show_bug.cgi?id=1475770
|
|
|
99cbc7 |
Signed-off-by: Erik Skultety <eskultet@redhat.com>
|
|
|
99cbc7 |
Reviewed-by: Ján Tomko <jtomko@redhat.com>
|
|
|
99cbc7 |
---
|
|
|
99cbc7 |
src/qemu/qemu_capabilities.c | 6 ++++++
|
|
|
99cbc7 |
src/qemu/qemu_capabilities.h | 1 +
|
|
|
99cbc7 |
tests/qemucapabilitiesdata/caps_2.10.0.aarch64.xml | 1 +
|
|
|
99cbc7 |
tests/qemucapabilitiesdata/caps_2.10.0.ppc64.xml | 1 +
|
|
|
99cbc7 |
tests/qemucapabilitiesdata/caps_2.10.0.s390x.xml | 1 +
|
|
|
99cbc7 |
tests/qemucapabilitiesdata/caps_2.10.0.x86_64.xml | 1 +
|
|
|
99cbc7 |
tests/qemucapabilitiesdata/caps_2.11.0.s390x.xml | 1 +
|
|
|
99cbc7 |
tests/qemucapabilitiesdata/caps_2.11.0.x86_64.xml | 1 +
|
|
|
99cbc7 |
tests/qemucapabilitiesdata/caps_2.12.0.aarch64.xml | 1 +
|
|
|
99cbc7 |
tests/qemucapabilitiesdata/caps_2.12.0.ppc64.xml | 1 +
|
|
|
99cbc7 |
tests/qemucapabilitiesdata/caps_2.12.0.s390x.xml | 1 +
|
|
|
99cbc7 |
tests/qemucapabilitiesdata/caps_2.12.0.x86_64.xml | 1 +
|
|
|
99cbc7 |
tests/qemucapabilitiesdata/caps_3.0.0.ppc64.xml | 1 +
|
|
|
99cbc7 |
tests/qemucapabilitiesdata/caps_3.0.0.x86_64.xml | 1 +
|
|
|
99cbc7 |
14 files changed, 19 insertions(+)
|
|
|
99cbc7 |
|
|
|
99cbc7 |
diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c
|
|
|
99cbc7 |
index 0f0020cf7d..05be8f1416 100644
|
|
|
99cbc7 |
--- a/src/qemu/qemu_capabilities.c
|
|
|
99cbc7 |
+++ b/src/qemu/qemu_capabilities.c
|
|
|
99cbc7 |
@@ -503,6 +503,7 @@ VIR_ENUM_IMPL(virQEMUCaps, QEMU_CAPS_LAST,
|
|
|
99cbc7 |
"machine.pseries.cap-hpt-max-page-size",
|
|
|
99cbc7 |
"machine.pseries.cap-htm",
|
|
|
99cbc7 |
"usb-storage.werror",
|
|
|
99cbc7 |
+ "egl-headless",
|
|
|
99cbc7 |
);
|
|
|
99cbc7 |
|
|
|
99cbc7 |
|
|
|
99cbc7 |
@@ -4034,6 +4035,11 @@ virQEMUCapsInitQMPMonitor(virQEMUCapsPtr qemuCaps,
|
|
|
99cbc7 |
virQEMUCapsSet(qemuCaps, QEMU_CAPS_MACHINE_PSERIES_RESIZE_HPT);
|
|
|
99cbc7 |
}
|
|
|
99cbc7 |
|
|
|
99cbc7 |
+ /* '-display egl-headless' cmdline option is supported since QEMU 2.10, but
|
|
|
99cbc7 |
+ * there's no way to probe it */
|
|
|
99cbc7 |
+ if (qemuCaps->version >= 2010000)
|
|
|
99cbc7 |
+ virQEMUCapsSet(qemuCaps, QEMU_CAPS_EGL_HEADLESS);
|
|
|
99cbc7 |
+
|
|
|
99cbc7 |
/* no way to query for -numa dist */
|
|
|
99cbc7 |
if (qemuCaps->version >= 2010000)
|
|
|
99cbc7 |
virQEMUCapsSet(qemuCaps, QEMU_CAPS_NUMA_DIST);
|
|
|
99cbc7 |
diff --git a/src/qemu/qemu_capabilities.h b/src/qemu/qemu_capabilities.h
|
|
|
99cbc7 |
index 1fa0ebfea3..55221e7e57 100644
|
|
|
99cbc7 |
--- a/src/qemu/qemu_capabilities.h
|
|
|
99cbc7 |
+++ b/src/qemu/qemu_capabilities.h
|
|
|
99cbc7 |
@@ -487,6 +487,7 @@ typedef enum { /* virQEMUCapsFlags grouping marker for syntax-check */
|
|
|
99cbc7 |
QEMU_CAPS_MACHINE_PSERIES_CAP_HPT_MAX_PAGE_SIZE, /* -machine pseries.cap-hpt-max-page-size */
|
|
|
99cbc7 |
QEMU_CAPS_MACHINE_PSERIES_CAP_HTM, /* -machine pseries.cap-htm */
|
|
|
99cbc7 |
QEMU_CAPS_USB_STORAGE_WERROR, /* -device usb-storage,werror=..,rerror=.. */
|
|
|
99cbc7 |
+ QEMU_CAPS_EGL_HEADLESS, /* -display egl-headless */
|
|
|
99cbc7 |
|
|
|
99cbc7 |
QEMU_CAPS_LAST /* this must always be the last item */
|
|
|
99cbc7 |
} virQEMUCapsFlags;
|
|
|
99cbc7 |
diff --git a/tests/qemucapabilitiesdata/caps_2.10.0.aarch64.xml b/tests/qemucapabilitiesdata/caps_2.10.0.aarch64.xml
|
|
|
99cbc7 |
index 169641063c..a70e050765 100644
|
|
|
99cbc7 |
--- a/tests/qemucapabilitiesdata/caps_2.10.0.aarch64.xml
|
|
|
99cbc7 |
+++ b/tests/qemucapabilitiesdata/caps_2.10.0.aarch64.xml
|
|
|
99cbc7 |
@@ -159,6 +159,7 @@
|
|
|
99cbc7 |
<flag name='hda-output'/>
|
|
|
99cbc7 |
<flag name='blockdev-del'/>
|
|
|
99cbc7 |
<flag name='vhost-vsock'/>
|
|
|
99cbc7 |
+ <flag name='egl-headless'/>
|
|
|
99cbc7 |
<version>2010000</version>
|
|
|
99cbc7 |
<kvmVersion>0</kvmVersion>
|
|
|
99cbc7 |
<microcodeVersion>307647</microcodeVersion>
|
|
|
99cbc7 |
diff --git a/tests/qemucapabilitiesdata/caps_2.10.0.ppc64.xml b/tests/qemucapabilitiesdata/caps_2.10.0.ppc64.xml
|
|
|
99cbc7 |
index 92c095abd2..72709905d8 100644
|
|
|
99cbc7 |
--- a/tests/qemucapabilitiesdata/caps_2.10.0.ppc64.xml
|
|
|
99cbc7 |
+++ b/tests/qemucapabilitiesdata/caps_2.10.0.ppc64.xml
|
|
|
99cbc7 |
@@ -158,6 +158,7 @@
|
|
|
99cbc7 |
<flag name='hda-output'/>
|
|
|
99cbc7 |
<flag name='blockdev-del'/>
|
|
|
99cbc7 |
<flag name='vhost-vsock'/>
|
|
|
99cbc7 |
+ <flag name='egl-headless'/>
|
|
|
99cbc7 |
<version>2010000</version>
|
|
|
99cbc7 |
<kvmVersion>0</kvmVersion>
|
|
|
99cbc7 |
<microcodeVersion>386992</microcodeVersion>
|
|
|
99cbc7 |
diff --git a/tests/qemucapabilitiesdata/caps_2.10.0.s390x.xml b/tests/qemucapabilitiesdata/caps_2.10.0.s390x.xml
|
|
|
99cbc7 |
index 5e22e21224..7347f5683f 100644
|
|
|
99cbc7 |
--- a/tests/qemucapabilitiesdata/caps_2.10.0.s390x.xml
|
|
|
99cbc7 |
+++ b/tests/qemucapabilitiesdata/caps_2.10.0.s390x.xml
|
|
|
99cbc7 |
@@ -119,6 +119,7 @@
|
|
|
99cbc7 |
<flag name='sdl-gl'/>
|
|
|
99cbc7 |
<flag name='blockdev-del'/>
|
|
|
99cbc7 |
<flag name='vhost-vsock'/>
|
|
|
99cbc7 |
+ <flag name='egl-headless'/>
|
|
|
99cbc7 |
<version>2010000</version>
|
|
|
99cbc7 |
<kvmVersion>0</kvmVersion>
|
|
|
99cbc7 |
<microcodeVersion>307899</microcodeVersion>
|
|
|
99cbc7 |
diff --git a/tests/qemucapabilitiesdata/caps_2.10.0.x86_64.xml b/tests/qemucapabilitiesdata/caps_2.10.0.x86_64.xml
|
|
|
99cbc7 |
index 10b066bff1..d69a148cd2 100644
|
|
|
99cbc7 |
--- a/tests/qemucapabilitiesdata/caps_2.10.0.x86_64.xml
|
|
|
99cbc7 |
+++ b/tests/qemucapabilitiesdata/caps_2.10.0.x86_64.xml
|
|
|
99cbc7 |
@@ -203,6 +203,7 @@
|
|
|
99cbc7 |
<flag name='vmgenid'/>
|
|
|
99cbc7 |
<flag name='vhost-vsock'/>
|
|
|
99cbc7 |
<flag name='mch'/>
|
|
|
99cbc7 |
+ <flag name='egl-headless'/>
|
|
|
99cbc7 |
<version>2010000</version>
|
|
|
99cbc7 |
<kvmVersion>0</kvmVersion>
|
|
|
99cbc7 |
<microcodeVersion>367995</microcodeVersion>
|
|
|
99cbc7 |
diff --git a/tests/qemucapabilitiesdata/caps_2.11.0.s390x.xml b/tests/qemucapabilitiesdata/caps_2.11.0.s390x.xml
|
|
|
99cbc7 |
index 6ca2e57ef8..b359f9a049 100644
|
|
|
99cbc7 |
--- a/tests/qemucapabilitiesdata/caps_2.11.0.s390x.xml
|
|
|
99cbc7 |
+++ b/tests/qemucapabilitiesdata/caps_2.11.0.s390x.xml
|
|
|
99cbc7 |
@@ -126,6 +126,7 @@
|
|
|
99cbc7 |
<flag name='blockdev-del'/>
|
|
|
99cbc7 |
<flag name='vhost-vsock'/>
|
|
|
99cbc7 |
<flag name='tpm-emulator'/>
|
|
|
99cbc7 |
+ <flag name='egl-headless'/>
|
|
|
99cbc7 |
<version>2011000</version>
|
|
|
99cbc7 |
<kvmVersion>0</kvmVersion>
|
|
|
99cbc7 |
<microcodeVersion>346751</microcodeVersion>
|
|
|
99cbc7 |
diff --git a/tests/qemucapabilitiesdata/caps_2.11.0.x86_64.xml b/tests/qemucapabilitiesdata/caps_2.11.0.x86_64.xml
|
|
|
99cbc7 |
index c52e44a498..210f774c4e 100644
|
|
|
99cbc7 |
--- a/tests/qemucapabilitiesdata/caps_2.11.0.x86_64.xml
|
|
|
99cbc7 |
+++ b/tests/qemucapabilitiesdata/caps_2.11.0.x86_64.xml
|
|
|
99cbc7 |
@@ -207,6 +207,7 @@
|
|
|
99cbc7 |
<flag name='tpm-emulator'/>
|
|
|
99cbc7 |
<flag name='mch'/>
|
|
|
99cbc7 |
<flag name='mch.extended-tseg-mbytes'/>
|
|
|
99cbc7 |
+ <flag name='egl-headless'/>
|
|
|
99cbc7 |
<version>2011000</version>
|
|
|
99cbc7 |
<kvmVersion>0</kvmVersion>
|
|
|
99cbc7 |
<microcodeVersion>371455</microcodeVersion>
|
|
|
99cbc7 |
diff --git a/tests/qemucapabilitiesdata/caps_2.12.0.aarch64.xml b/tests/qemucapabilitiesdata/caps_2.12.0.aarch64.xml
|
|
|
99cbc7 |
index ecc029f403..80e7afec04 100644
|
|
|
99cbc7 |
--- a/tests/qemucapabilitiesdata/caps_2.12.0.aarch64.xml
|
|
|
99cbc7 |
+++ b/tests/qemucapabilitiesdata/caps_2.12.0.aarch64.xml
|
|
|
99cbc7 |
@@ -169,6 +169,7 @@
|
|
|
99cbc7 |
<flag name='vhost-vsock'/>
|
|
|
99cbc7 |
<flag name='chardev-fd-pass'/>
|
|
|
99cbc7 |
<flag name='tpm-emulator'/>
|
|
|
99cbc7 |
+ <flag name='egl-headless'/>
|
|
|
99cbc7 |
<version>2011090</version>
|
|
|
99cbc7 |
<kvmVersion>0</kvmVersion>
|
|
|
99cbc7 |
<microcodeVersion>347550</microcodeVersion>
|
|
|
99cbc7 |
diff --git a/tests/qemucapabilitiesdata/caps_2.12.0.ppc64.xml b/tests/qemucapabilitiesdata/caps_2.12.0.ppc64.xml
|
|
|
99cbc7 |
index 7139179304..c4b09c0003 100644
|
|
|
99cbc7 |
--- a/tests/qemucapabilitiesdata/caps_2.12.0.ppc64.xml
|
|
|
99cbc7 |
+++ b/tests/qemucapabilitiesdata/caps_2.12.0.ppc64.xml
|
|
|
99cbc7 |
@@ -167,6 +167,7 @@
|
|
|
99cbc7 |
<flag name='chardev-fd-pass'/>
|
|
|
99cbc7 |
<flag name='tpm-emulator'/>
|
|
|
99cbc7 |
<flag name='machine.pseries.cap-htm'/>
|
|
|
99cbc7 |
+ <flag name='egl-headless'/>
|
|
|
99cbc7 |
<version>2011090</version>
|
|
|
99cbc7 |
<kvmVersion>0</kvmVersion>
|
|
|
99cbc7 |
<microcodeVersion>428334</microcodeVersion>
|
|
|
99cbc7 |
diff --git a/tests/qemucapabilitiesdata/caps_2.12.0.s390x.xml b/tests/qemucapabilitiesdata/caps_2.12.0.s390x.xml
|
|
|
99cbc7 |
index 87d189e58d..1ff2fe45e1 100644
|
|
|
99cbc7 |
--- a/tests/qemucapabilitiesdata/caps_2.12.0.s390x.xml
|
|
|
99cbc7 |
+++ b/tests/qemucapabilitiesdata/caps_2.12.0.s390x.xml
|
|
|
99cbc7 |
@@ -133,6 +133,7 @@
|
|
|
99cbc7 |
<flag name='vhost-vsock'/>
|
|
|
99cbc7 |
<flag name='chardev-fd-pass'/>
|
|
|
99cbc7 |
<flag name='tpm-emulator'/>
|
|
|
99cbc7 |
+ <flag name='egl-headless'/>
|
|
|
99cbc7 |
<version>2012000</version>
|
|
|
99cbc7 |
<kvmVersion>0</kvmVersion>
|
|
|
99cbc7 |
<microcodeVersion>375999</microcodeVersion>
|
|
|
99cbc7 |
diff --git a/tests/qemucapabilitiesdata/caps_2.12.0.x86_64.xml b/tests/qemucapabilitiesdata/caps_2.12.0.x86_64.xml
|
|
|
99cbc7 |
index 9c1f6c327c..37d17786cf 100644
|
|
|
99cbc7 |
--- a/tests/qemucapabilitiesdata/caps_2.12.0.x86_64.xml
|
|
|
99cbc7 |
+++ b/tests/qemucapabilitiesdata/caps_2.12.0.x86_64.xml
|
|
|
99cbc7 |
@@ -211,6 +211,7 @@
|
|
|
99cbc7 |
<flag name='mch'/>
|
|
|
99cbc7 |
<flag name='mch.extended-tseg-mbytes'/>
|
|
|
99cbc7 |
<flag name='sev-guest'/>
|
|
|
99cbc7 |
+ <flag name='egl-headless'/>
|
|
|
99cbc7 |
<version>2011090</version>
|
|
|
99cbc7 |
<kvmVersion>0</kvmVersion>
|
|
|
99cbc7 |
<microcodeVersion>416196</microcodeVersion>
|
|
|
99cbc7 |
diff --git a/tests/qemucapabilitiesdata/caps_3.0.0.ppc64.xml b/tests/qemucapabilitiesdata/caps_3.0.0.ppc64.xml
|
|
|
99cbc7 |
index 33cd00e613..57bf5dba11 100644
|
|
|
99cbc7 |
--- a/tests/qemucapabilitiesdata/caps_3.0.0.ppc64.xml
|
|
|
99cbc7 |
+++ b/tests/qemucapabilitiesdata/caps_3.0.0.ppc64.xml
|
|
|
99cbc7 |
@@ -167,6 +167,7 @@
|
|
|
99cbc7 |
<flag name='tpm-emulator'/>
|
|
|
99cbc7 |
<flag name='machine.pseries.cap-hpt-max-page-size'/>
|
|
|
99cbc7 |
<flag name='machine.pseries.cap-htm'/>
|
|
|
99cbc7 |
+ <flag name='egl-headless'/>
|
|
|
99cbc7 |
<version>2012050</version>
|
|
|
99cbc7 |
<kvmVersion>0</kvmVersion>
|
|
|
99cbc7 |
<microcodeVersion>446771</microcodeVersion>
|
|
|
99cbc7 |
diff --git a/tests/qemucapabilitiesdata/caps_3.0.0.x86_64.xml b/tests/qemucapabilitiesdata/caps_3.0.0.x86_64.xml
|
|
|
99cbc7 |
index cd036d9323..431910a9e3 100644
|
|
|
99cbc7 |
--- a/tests/qemucapabilitiesdata/caps_3.0.0.x86_64.xml
|
|
|
99cbc7 |
+++ b/tests/qemucapabilitiesdata/caps_3.0.0.x86_64.xml
|
|
|
99cbc7 |
@@ -214,6 +214,7 @@
|
|
|
99cbc7 |
<flag name='mch.extended-tseg-mbytes'/>
|
|
|
99cbc7 |
<flag name='sev-guest'/>
|
|
|
99cbc7 |
<flag name='usb-storage.werror'/>
|
|
|
99cbc7 |
+ <flag name='egl-headless'/>
|
|
|
99cbc7 |
<version>2012090</version>
|
|
|
99cbc7 |
<kvmVersion>0</kvmVersion>
|
|
|
99cbc7 |
<microcodeVersion>438109</microcodeVersion>
|
|
|
99cbc7 |
--
|
|
|
99cbc7 |
2.18.0
|
|
|
99cbc7 |
|