Received: from eggs.gnu.org ([2001:4830:134:3::10]:35836) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YGVtd-0003ys-IJ for qemu-devel@nongnu.org; Wed, 28 Jan 2015 11:55:25 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YGVta-0001lt-5P for qemu-devel@nongnu.org; Wed, 28 Jan 2015 11:55:17 -0500 Received: from mail.nologin.es ([62.82.228.235]:42458 helo=nologin.es) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YGVtZ-0001Us-UW for qemu-devel@nongnu.org; Wed, 28 Jan 2015 11:55:14 -0500 From: Javier Celaya Date: Wed, 28 Jan 2015 17:54:45 +0100 Message-ID: <1497737.FQv3Yx42uv@javinlg> In-Reply-To: <87r3ug8w9o.fsf@blackfin.pond.sub.org> References: <1508539.cfTQauU1Ry@javinlg> <54C66A60.3000204@redhat.com> <87r3ug8w9o.fsf@blackfin.pond.sub.org> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="iso-8859-1" Subject: Re: [Qemu-devel] [Spice-devel] [PATCH] [RFC] LZ4 compression option for SPICE List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Markus Armbruster Cc: qemu-devel@nongnu.org, devel@flexvm.es, Gerd Hoffmann , Anthony Liguori , spice-devel >From what I've seen in QEMU and libvirt's code, I would say that discov= ering=20 whether the spice server supports LZ4 is not a matter of adding a new Q= MP=20 command. That would not scale very well with new command line options. = I would=20 suggest something more general. For instance, having the command query-= command-line-options return also the allowed values for string paramete= rs.=20 That would output "lz4" for parameter "image-compression" in option "sp= ice",=20 among the other compression methods. Another possibility would be a new= QMP=20 command that returns the capabilities of the spice server, as defined i= n the=20 spice protocol. They include the SPICE_DISPLAY_CAP_LZ4_COMPRESSION capa= bility,=20 if the spice server supports LZ4. In any case, I think it is out of the= scope=20 of this patch. El Martes, 27 de enero de 2015 09:26:11 Markus Armbruster escribi=F3: > Eric Blake writes: > > On 01/26/2015 01:48 AM, Javier Celaya wrote: > >> Sorry, I forgot to patch the command-line help. Hope it helps. > >>=20 > >>>> Recently, SPICE included the lz4 compression algorithm. This pat= ch adds > >>>> a command line option to select it. > >>>=20 > >>> How is libvirt going to introspect whether the command line suppo= rts > >>> this option? Is there some QMP command that lists the set of val= id > >>> compression formats understood by a given qemu binary? > >=20 > > No, patching the command line --help does NOT help libvirt. It nee= ds to > > be discoverable via QMP to be introspectible, as scraping --help ou= tput > > is not machine-friendly. (That said, you DO want to expose it in -= -help > > output; I'm just complaining that --help output alone is not enough= ). >=20 > We should really, really, really provide access to (the relevant subs= et > of) the QAPI schema over QMP! Until we get that, useful progress is > delayed by problems like this one, and we keep growing special-purpos= e > solutions to problems like this one.