提交 7ab7d0ed 编写于 作者: E Erik Skultety

qemu: caps: Introduce a capability for egl-headless

Since QEMU 2.10, it's possible to use a new type of display -
egl-headless which uses drm nodes to provide OpenGL support. This patch
adds a capability for that. However, since QEMU doesn't provide a QMP
command to probe it, we have to base the capability on specific QEMU
version.
Acked-by: NMichal Privoznik <mprivozn@redhat.com>
Reviewed-by: NJán Tomko <jtomko@redhat.com>
Signed-off-by: NErik Skultety <eskultet@redhat.com>
上级 3b61f333
...@@ -503,6 +503,7 @@ VIR_ENUM_IMPL(virQEMUCaps, QEMU_CAPS_LAST, ...@@ -503,6 +503,7 @@ VIR_ENUM_IMPL(virQEMUCaps, QEMU_CAPS_LAST,
"machine.pseries.cap-hpt-max-page-size", "machine.pseries.cap-hpt-max-page-size",
"machine.pseries.cap-htm", "machine.pseries.cap-htm",
"usb-storage.werror", "usb-storage.werror",
"egl-headless",
); );
...@@ -4030,6 +4031,11 @@ virQEMUCapsInitQMPMonitor(virQEMUCapsPtr qemuCaps, ...@@ -4030,6 +4031,11 @@ virQEMUCapsInitQMPMonitor(virQEMUCapsPtr qemuCaps,
virQEMUCapsSet(qemuCaps, QEMU_CAPS_MACHINE_PSERIES_RESIZE_HPT); virQEMUCapsSet(qemuCaps, QEMU_CAPS_MACHINE_PSERIES_RESIZE_HPT);
} }
/* '-display egl-headless' cmdline option is supported since QEMU 2.10, but
* there's no way to probe it */
if (qemuCaps->version >= 2010000)
virQEMUCapsSet(qemuCaps, QEMU_CAPS_EGL_HEADLESS);
/* no way to query for -numa dist */ /* no way to query for -numa dist */
if (qemuCaps->version >= 2010000) if (qemuCaps->version >= 2010000)
virQEMUCapsSet(qemuCaps, QEMU_CAPS_NUMA_DIST); virQEMUCapsSet(qemuCaps, QEMU_CAPS_NUMA_DIST);
......
...@@ -487,6 +487,7 @@ typedef enum { /* virQEMUCapsFlags grouping marker for syntax-check */ ...@@ -487,6 +487,7 @@ typedef enum { /* virQEMUCapsFlags grouping marker for syntax-check */
QEMU_CAPS_MACHINE_PSERIES_CAP_HPT_MAX_PAGE_SIZE, /* -machine pseries.cap-hpt-max-page-size */ QEMU_CAPS_MACHINE_PSERIES_CAP_HPT_MAX_PAGE_SIZE, /* -machine pseries.cap-hpt-max-page-size */
QEMU_CAPS_MACHINE_PSERIES_CAP_HTM, /* -machine pseries.cap-htm */ QEMU_CAPS_MACHINE_PSERIES_CAP_HTM, /* -machine pseries.cap-htm */
QEMU_CAPS_USB_STORAGE_WERROR, /* -device usb-storage,werror=..,rerror=.. */ QEMU_CAPS_USB_STORAGE_WERROR, /* -device usb-storage,werror=..,rerror=.. */
QEMU_CAPS_EGL_HEADLESS, /* -display egl-headless */
QEMU_CAPS_LAST /* this must always be the last item */ QEMU_CAPS_LAST /* this must always be the last item */
} virQEMUCapsFlags; } virQEMUCapsFlags;
......
...@@ -159,6 +159,7 @@ ...@@ -159,6 +159,7 @@
<flag name='hda-output'/> <flag name='hda-output'/>
<flag name='blockdev-del'/> <flag name='blockdev-del'/>
<flag name='vhost-vsock'/> <flag name='vhost-vsock'/>
<flag name='egl-headless'/>
<version>2010000</version> <version>2010000</version>
<kvmVersion>0</kvmVersion> <kvmVersion>0</kvmVersion>
<microcodeVersion>307647</microcodeVersion> <microcodeVersion>307647</microcodeVersion>
......
...@@ -158,6 +158,7 @@ ...@@ -158,6 +158,7 @@
<flag name='hda-output'/> <flag name='hda-output'/>
<flag name='blockdev-del'/> <flag name='blockdev-del'/>
<flag name='vhost-vsock'/> <flag name='vhost-vsock'/>
<flag name='egl-headless'/>
<version>2010000</version> <version>2010000</version>
<kvmVersion>0</kvmVersion> <kvmVersion>0</kvmVersion>
<microcodeVersion>386992</microcodeVersion> <microcodeVersion>386992</microcodeVersion>
......
...@@ -119,6 +119,7 @@ ...@@ -119,6 +119,7 @@
<flag name='sdl-gl'/> <flag name='sdl-gl'/>
<flag name='blockdev-del'/> <flag name='blockdev-del'/>
<flag name='vhost-vsock'/> <flag name='vhost-vsock'/>
<flag name='egl-headless'/>
<version>2010000</version> <version>2010000</version>
<kvmVersion>0</kvmVersion> <kvmVersion>0</kvmVersion>
<microcodeVersion>307899</microcodeVersion> <microcodeVersion>307899</microcodeVersion>
......
...@@ -203,6 +203,7 @@ ...@@ -203,6 +203,7 @@
<flag name='vmgenid'/> <flag name='vmgenid'/>
<flag name='vhost-vsock'/> <flag name='vhost-vsock'/>
<flag name='mch'/> <flag name='mch'/>
<flag name='egl-headless'/>
<version>2010000</version> <version>2010000</version>
<kvmVersion>0</kvmVersion> <kvmVersion>0</kvmVersion>
<microcodeVersion>367995</microcodeVersion> <microcodeVersion>367995</microcodeVersion>
......
...@@ -126,6 +126,7 @@ ...@@ -126,6 +126,7 @@
<flag name='blockdev-del'/> <flag name='blockdev-del'/>
<flag name='vhost-vsock'/> <flag name='vhost-vsock'/>
<flag name='tpm-emulator'/> <flag name='tpm-emulator'/>
<flag name='egl-headless'/>
<version>2011000</version> <version>2011000</version>
<kvmVersion>0</kvmVersion> <kvmVersion>0</kvmVersion>
<microcodeVersion>346751</microcodeVersion> <microcodeVersion>346751</microcodeVersion>
......
...@@ -207,6 +207,7 @@ ...@@ -207,6 +207,7 @@
<flag name='tpm-emulator'/> <flag name='tpm-emulator'/>
<flag name='mch'/> <flag name='mch'/>
<flag name='mch.extended-tseg-mbytes'/> <flag name='mch.extended-tseg-mbytes'/>
<flag name='egl-headless'/>
<version>2011000</version> <version>2011000</version>
<kvmVersion>0</kvmVersion> <kvmVersion>0</kvmVersion>
<microcodeVersion>371455</microcodeVersion> <microcodeVersion>371455</microcodeVersion>
......
...@@ -169,6 +169,7 @@ ...@@ -169,6 +169,7 @@
<flag name='vhost-vsock'/> <flag name='vhost-vsock'/>
<flag name='chardev-fd-pass'/> <flag name='chardev-fd-pass'/>
<flag name='tpm-emulator'/> <flag name='tpm-emulator'/>
<flag name='egl-headless'/>
<version>2011090</version> <version>2011090</version>
<kvmVersion>0</kvmVersion> <kvmVersion>0</kvmVersion>
<microcodeVersion>347550</microcodeVersion> <microcodeVersion>347550</microcodeVersion>
......
...@@ -167,6 +167,7 @@ ...@@ -167,6 +167,7 @@
<flag name='chardev-fd-pass'/> <flag name='chardev-fd-pass'/>
<flag name='tpm-emulator'/> <flag name='tpm-emulator'/>
<flag name='machine.pseries.cap-htm'/> <flag name='machine.pseries.cap-htm'/>
<flag name='egl-headless'/>
<version>2011090</version> <version>2011090</version>
<kvmVersion>0</kvmVersion> <kvmVersion>0</kvmVersion>
<microcodeVersion>428334</microcodeVersion> <microcodeVersion>428334</microcodeVersion>
......
...@@ -133,6 +133,7 @@ ...@@ -133,6 +133,7 @@
<flag name='vhost-vsock'/> <flag name='vhost-vsock'/>
<flag name='chardev-fd-pass'/> <flag name='chardev-fd-pass'/>
<flag name='tpm-emulator'/> <flag name='tpm-emulator'/>
<flag name='egl-headless'/>
<version>2012000</version> <version>2012000</version>
<kvmVersion>0</kvmVersion> <kvmVersion>0</kvmVersion>
<microcodeVersion>375999</microcodeVersion> <microcodeVersion>375999</microcodeVersion>
......
...@@ -211,6 +211,7 @@ ...@@ -211,6 +211,7 @@
<flag name='mch'/> <flag name='mch'/>
<flag name='mch.extended-tseg-mbytes'/> <flag name='mch.extended-tseg-mbytes'/>
<flag name='sev-guest'/> <flag name='sev-guest'/>
<flag name='egl-headless'/>
<version>2011090</version> <version>2011090</version>
<kvmVersion>0</kvmVersion> <kvmVersion>0</kvmVersion>
<microcodeVersion>416196</microcodeVersion> <microcodeVersion>416196</microcodeVersion>
......
...@@ -167,6 +167,7 @@ ...@@ -167,6 +167,7 @@
<flag name='tpm-emulator'/> <flag name='tpm-emulator'/>
<flag name='machine.pseries.cap-hpt-max-page-size'/> <flag name='machine.pseries.cap-hpt-max-page-size'/>
<flag name='machine.pseries.cap-htm'/> <flag name='machine.pseries.cap-htm'/>
<flag name='egl-headless'/>
<version>2012050</version> <version>2012050</version>
<kvmVersion>0</kvmVersion> <kvmVersion>0</kvmVersion>
<microcodeVersion>446771</microcodeVersion> <microcodeVersion>446771</microcodeVersion>
......
...@@ -214,6 +214,7 @@ ...@@ -214,6 +214,7 @@
<flag name='mch.extended-tseg-mbytes'/> <flag name='mch.extended-tseg-mbytes'/>
<flag name='sev-guest'/> <flag name='sev-guest'/>
<flag name='usb-storage.werror'/> <flag name='usb-storage.werror'/>
<flag name='egl-headless'/>
<version>2012090</version> <version>2012090</version>
<kvmVersion>0</kvmVersion> <kvmVersion>0</kvmVersion>
<microcodeVersion>438109</microcodeVersion> <microcodeVersion>438109</microcodeVersion>
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册