Reports a tristate enum value for acceptable graphics type=spice <gl enable=XXX/>. Wire it up for qemu too. 'no' is always a valid value, so we unconditionally report it. --- docs/formatdomaincaps.html.in | 8 ++++++++ src/conf/domain_capabilities.c | 1 + src/conf/domain_capabilities.h | 1 + src/qemu/qemu_capabilities.c | 4 ++++ tests/domaincapsschemadata/domaincaps-full.xml | 5 +++++ tests/domaincapsschemadata/domaincaps-qemu_1.6.50-1.xml | 3 +++ tests/domaincapsschemadata/domaincaps-qemu_2.6.0-1.xml | 4 ++++ tests/domaincapsschemadata/domaincaps-qemu_2.6.0-2.xml | 3 +++ tests/domaincapsschemadata/domaincaps-qemu_2.6.0-3.xml | 3 +++ tests/domaincapsschemadata/domaincaps-qemu_2.6.0-4.xml | 3 +++ tests/domaincapsschemadata/domaincaps-qemu_2.6.0-5.xml | 3 +++ tests/domaincapstest.c | 1 + 12 files changed, 39 insertions(+) diff --git a/docs/formatdomaincaps.html.in b/docs/formatdomaincaps.html.in index d5a8414..c424107 100644 --- a/docs/formatdomaincaps.html.in +++ b/docs/formatdomaincaps.html.in @@ -231,6 +231,10 @@ <value>vnc</value> <value>spice</value> </enum> + <enum name='spiceGL'> + <value>yes</value> + <value>no</value> + </enum> </graphics> ... </devices> @@ -241,6 +245,10 @@ <dt><code>type</code></dt> <dd>Options for the <code>type</code> attribute of the <graphics/> element.</dd> + + <dt><code>spiceGL</code></dt> + <dd>Options for the <code>enable</code> attribute of the + <graphics type='spice'><gl/> element.</dd> </dl> diff --git a/src/conf/domain_capabilities.c b/src/conf/domain_capabilities.c index 1676f0e..344955c 100644 --- a/src/conf/domain_capabilities.c +++ b/src/conf/domain_capabilities.c @@ -253,6 +253,7 @@ virDomainCapsDeviceGraphicsFormat(virBufferPtr buf, FORMAT_PROLOGUE(graphics); ENUM_PROCESS(graphics, type, virDomainGraphicsTypeToString); + ENUM_PROCESS(graphics, spiceGL, virTristateBoolTypeToString); FORMAT_EPILOGUE(graphics); } diff --git a/src/conf/domain_capabilities.h b/src/conf/domain_capabilities.h index d0ca009..916dba0 100644 --- a/src/conf/domain_capabilities.h +++ b/src/conf/domain_capabilities.h @@ -74,6 +74,7 @@ typedef virDomainCapsDeviceGraphics *virDomainCapsDeviceGraphicsPtr; struct _virDomainCapsDeviceGraphics { bool supported; virDomainCapsEnum type; /* virDomainGraphicsType */ + virDomainCapsEnum spiceGL; /* type=spice <gl enable=X/> tristate */ }; typedef struct _virDomainCapsDeviceVideo virDomainCapsDeviceVideo; diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c index 1bddf43..f228f4f 100644 --- a/src/qemu/qemu_capabilities.c +++ b/src/qemu/qemu_capabilities.c @@ -4183,6 +4183,10 @@ virQEMUCapsFillDomainDeviceGraphicsCaps(virQEMUCapsPtr qemuCaps, if (virQEMUCapsGet(qemuCaps, QEMU_CAPS_SPICE)) VIR_DOMAIN_CAPS_ENUM_SET(dev->type, VIR_DOMAIN_GRAPHICS_TYPE_SPICE); + VIR_DOMAIN_CAPS_ENUM_SET(dev->spiceGL, VIR_TRISTATE_BOOL_NO); + if (virQEMUCapsGet(qemuCaps, QEMU_CAPS_SPICE_GL)) + VIR_DOMAIN_CAPS_ENUM_SET(dev->spiceGL, VIR_TRISTATE_BOOL_YES); + return 0; } diff --git a/tests/domaincapsschemadata/domaincaps-full.xml b/tests/domaincapsschemadata/domaincaps-full.xml index 2f529ff..4eb5637 100644 --- a/tests/domaincapsschemadata/domaincaps-full.xml +++ b/tests/domaincapsschemadata/domaincaps-full.xml @@ -47,6 +47,11 @@ <value>desktop</value> <value>spice</value> </enum> + <enum name='spiceGL'> + <value>default</value> + <value>yes</value> + <value>no</value> + </enum> </graphics> <video supported='yes'> <enum name='modelType'> diff --git a/tests/domaincapsschemadata/domaincaps-qemu_1.6.50-1.xml b/tests/domaincapsschemadata/domaincaps-qemu_1.6.50-1.xml index 161d0ab..6213297 100644 --- a/tests/domaincapsschemadata/domaincaps-qemu_1.6.50-1.xml +++ b/tests/domaincapsschemadata/domaincaps-qemu_1.6.50-1.xml @@ -40,6 +40,9 @@ <value>vnc</value> <value>spice</value> </enum> + <enum name='spiceGL'> + <value>no</value> + </enum> </graphics> <video supported='yes'> <enum name='modelType'> diff --git a/tests/domaincapsschemadata/domaincaps-qemu_2.6.0-1.xml b/tests/domaincapsschemadata/domaincaps-qemu_2.6.0-1.xml index f42d239..2a1477f 100644 --- a/tests/domaincapsschemadata/domaincaps-qemu_2.6.0-1.xml +++ b/tests/domaincapsschemadata/domaincaps-qemu_2.6.0-1.xml @@ -40,6 +40,10 @@ <value>vnc</value> <value>spice</value> </enum> + <enum name='spiceGL'> + <value>yes</value> + <value>no</value> + </enum> </graphics> <video supported='yes'> <enum name='modelType'> diff --git a/tests/domaincapsschemadata/domaincaps-qemu_2.6.0-2.xml b/tests/domaincapsschemadata/domaincaps-qemu_2.6.0-2.xml index 4e87cd2..4349998 100644 --- a/tests/domaincapsschemadata/domaincaps-qemu_2.6.0-2.xml +++ b/tests/domaincapsschemadata/domaincaps-qemu_2.6.0-2.xml @@ -39,6 +39,9 @@ <value>sdl</value> <value>vnc</value> </enum> + <enum name='spiceGL'> + <value>no</value> + </enum> </graphics> <video supported='yes'> <enum name='modelType'> diff --git a/tests/domaincapsschemadata/domaincaps-qemu_2.6.0-3.xml b/tests/domaincapsschemadata/domaincaps-qemu_2.6.0-3.xml index f5f0f1c..27173c4 100644 --- a/tests/domaincapsschemadata/domaincaps-qemu_2.6.0-3.xml +++ b/tests/domaincapsschemadata/domaincaps-qemu_2.6.0-3.xml @@ -39,6 +39,9 @@ <value>sdl</value> <value>vnc</value> </enum> + <enum name='spiceGL'> + <value>no</value> + </enum> </graphics> <video supported='yes'> <enum name='modelType'> diff --git a/tests/domaincapsschemadata/domaincaps-qemu_2.6.0-4.xml b/tests/domaincapsschemadata/domaincaps-qemu_2.6.0-4.xml index 1ae8172..d7d81b5 100644 --- a/tests/domaincapsschemadata/domaincaps-qemu_2.6.0-4.xml +++ b/tests/domaincapsschemadata/domaincaps-qemu_2.6.0-4.xml @@ -39,6 +39,9 @@ <value>sdl</value> <value>vnc</value> </enum> + <enum name='spiceGL'> + <value>no</value> + </enum> </graphics> <video supported='yes'> <enum name='modelType'> diff --git a/tests/domaincapsschemadata/domaincaps-qemu_2.6.0-5.xml b/tests/domaincapsschemadata/domaincaps-qemu_2.6.0-5.xml index 583fdf0..51c5615 100644 --- a/tests/domaincapsschemadata/domaincaps-qemu_2.6.0-5.xml +++ b/tests/domaincapsschemadata/domaincaps-qemu_2.6.0-5.xml @@ -37,6 +37,9 @@ <value>sdl</value> <value>vnc</value> </enum> + <enum name='spiceGL'> + <value>no</value> + </enum> </graphics> <video supported='yes'> <enum name='modelType'> diff --git a/tests/domaincapstest.c b/tests/domaincapstest.c index 6ae3f35..1b62781 100644 --- a/tests/domaincapstest.c +++ b/tests/domaincapstest.c @@ -83,6 +83,7 @@ fillAllCaps(virDomainCapsPtr domCaps) graphics->supported = true; SET_ALL_BITS(graphics->type); + SET_ALL_BITS(graphics->spiceGL); video->supported = true; SET_ALL_BITS(video->modelType); -- 2.7.4 -- libvir-list mailing list libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list