On Fri, Nov 20, 2015 at 04:30:44PM +0100, Marc-André Lureau wrote: > Add Spice graphics gl attribute. qemu 2.6 should have -spice gl=on > argument to enable opengl rendering context. This is necessary > to actually enable virgl rendering. > > Signed-off-by: Marc-André Lureau <marcandre.lureau@xxxxxxxxx> > --- > docs/formatdomain.html.in | 6 ++++++ > docs/schemas/domaincommon.rng | 5 +++++ > src/conf/domain_conf.c | 11 +++++++++++ > src/conf/domain_conf.h | 1 + A qemuxml2xmltest would be nice to go with the parser. > src/qemu/qemu_capabilities.c | 2 ++ > src/qemu/qemu_capabilities.h | 1 + > src/qemu/qemu_command.c | 10 ++++++++++ And the qemuxml2argvtest can be squashed in with the cmd line formatter. > tests/qemucapabilitiesdata/caps_2.5.0-1.caps | 1 + > tests/qemucapabilitiesdata/caps_2.5.0-1.replies | 4 ++++ > 9 files changed, 41 insertions(+) > > diff --git a/docs/formatdomain.html.in b/docs/formatdomain.html.in > index df29fa1..d7e1d49 100644 > --- a/docs/formatdomain.html.in > +++ b/docs/formatdomain.html.in > @@ -4979,6 +4979,12 @@ qemu-kvm -net nic,model=? /dev/null > 0.8.8</span>); and <code>usbredir</code> > (<span class="since">since 0.9.12</span>). > </p> > + <p> > + Spice may provide accelerated server-side rendering with > + OpenGL. You can enable OpenGL support with > + <code>gl</code> attribute. It is disabled by default. > + (<span class="since">since 1.1.22</span>). According to the plan: http://wiki.qemu.org/Planning/2.5 QEMU 2.5.0 is planned for 10th Dec. Only features merged on qemu master are accepted to libvirt, so this won't make the next 1.3.0 release at the beginning of December. > + </p> > <pre> > <graphics type='spice' port='-1' tlsPort='-1' autoport='yes'> > <channel name='main' mode='secure'/> > diff --git a/docs/schemas/domaincommon.rng b/docs/schemas/domaincommon.rng > index 228f062..8f4d2ac 100644 > --- a/docs/schemas/domaincommon.rng > +++ b/docs/schemas/domaincommon.rng > @@ -2711,6 +2711,11 @@ > </choice> > </attribute> > </optional> > + <optional> > + <attribute name="gl"> > + <ref name="virYesNo"/> This accepts "yes", "no" and "default", > + </attribute> > + </optional> > <interleave> > <ref name="listenElements"/> > <zeroOrMore> > diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c > index 15413dc..c4bdd11 100644 > --- a/src/conf/domain_conf.c > +++ b/src/conf/domain_conf.c > @@ -10952,6 +10953,12 @@ virDomainGraphicsDefParseXML(xmlNodePtr node, > VIR_FREE(autoport); > } > > + if ((gl = virXMLPropString(node, "gl")) != NULL) { > + if (STREQ(gl, "yes")) > + def->data.spice.gl = true; > + VIR_FREE(gl); > + } but the parser only implements "yes" and "default". Overall, the XML looks good to me. Apart from the accel3d attribute, which is ugly, but less ugly than inveting a separate one. Anyone else with an opinion? Jan
Attachment:
signature.asc
Description: Digital signature
-- libvir-list mailing list libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list