From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:38158) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UUgVT-0005A0-Jy for qemu-devel@nongnu.org; Tue, 23 Apr 2013 12:55:53 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UUgVS-0003Ym-97 for qemu-devel@nongnu.org; Tue, 23 Apr 2013 12:55:51 -0400 Received: from mx1.redhat.com ([209.132.183.28]:22607) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UUgVR-0003YV-Ti for qemu-devel@nongnu.org; Tue, 23 Apr 2013 12:55:50 -0400 Date: Tue, 23 Apr 2013 12:55:17 -0400 From: Luiz Capitulino Message-ID: <20130423125517.3e9151bd@redhat.com> In-Reply-To: <5176A98F.9050809@redhat.com> References: <1366365123-5412-1-git-send-email-akong@redhat.com> <51716101.8090705@redhat.com> <20130422114841.GA4053@t430s.nay.redhat.com> <517527FC.2090808@redhat.com> <51755075.1000008@redhat.com> <20130423092040.7179f3ce@redhat.com> <5176A98F.9050809@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH] monitor: introduce query-config-schema List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Eric Blake Cc: aliguori@us.ibm.com, mdroth@linux.vnet.ibm.com, qemu-devel@nongnu.org, jyang@redhat.com, Paolo Bonzini , Amos Kong On Tue, 23 Apr 2013 09:32:31 -0600 Eric Blake wrote: > On 04/23/2013 07:20 AM, Luiz Capitulino wrote: > > On Mon, 22 Apr 2013 09:00:05 -0600 > > Eric Blake 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); That's right. > 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. Yes. All my points have been clarified in today's meeting.