qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH] monitor: introduce query-config-schema


From: Eric Blake
Subject: Re: [Qemu-devel] [PATCH] monitor: introduce query-config-schema
Date: Tue, 23 Apr 2013 09:32:31 -0600
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130402 Thunderbird/17.0.5

On 04/23/2013 07:20 AM, Luiz Capitulino wrote:
> On Mon, 22 Apr 2013 09:00:05 -0600
> Eric Blake <address@hidden> wrote:
> 
>> At any rate, we really DO want introspection, and having it in 1.5 is a
>> worthwhile goal.  Even if the introspection turns up empty on legacy
>> options, having it for the sake of new options is worth the effort.
> 
> Agreed. But as you said in another email, we need a JSON representation
> for this command. Dumping all options as strings is just like using -help.
> 
> Something else that has occurred to me is that, do we want this to be
> a QMP command or do we want this to be a command-line option? If we do this
> as a QMP command then libvirt would have to actually start QEMU just to
> query supported options.

A command-line option might (or might not) be useful to humans, but a
QMP command is what libvirt wants.  Libvirt already starts a QMP session
for lots of other queries (not the least of which is the
'query-commands' query which would let us know whether to even expect
the new QMP command for command-line introspection to work).  Adding one
more QMP query to the mix called by libvirt is easy (no additional
processes, and the response already goes through the JSON parser that
handles all QMP responses); adding a new command line option is more
expensive (we would have to start qemu once to use the command line
option, then again for the QMP queries; also, it's more coding effort to
wire up libvirt to pass the stdout from the command line call into the
JSON parser that was normally expecting data from a Unix socket).

> 
> Another interesting point is about full schema introspection. This patch
> only supports command-line options. It would be desirable to be able to
> introspect all QAPI types and QMP commands, although I'm aware that this
> might be a lot of work to do for 1.5.

Based on the call today, getting introspection for command line
additions in time for 1.5, and saving full QMP introspection until 1.6,
would be reasonable; libvirt's immediate goal is to determine when it is
safe to use new command line options while doing its one-shot QMP
probing of a qemu binary.

-- 
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]