Received: from eggs.gnu.org ([2001:4830:134:3::10]:35754) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1abMqD-00071l-80 for qemu-devel@nongnu.org; Thu, 03 Mar 2016 01:34:30 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1abMq9-0000yX-4U for qemu-devel@nongnu.org; Thu, 03 Mar 2016 01:34:29 -0500 Received: from mx1.redhat.com ([209.132.183.28]:33819) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1abMq8-0000yT-Vf for qemu-devel@nongnu.org; Thu, 03 Mar 2016 01:34:25 -0500 From: Markus Armbruster References: <1456224728-28163-1-git-send-email-peterx@redhat.com> <1456224728-28163-2-git-send-email-peterx@redhat.com> <1456842059.3566.11.camel@redhat.com> <20160302033444.GA5730@pxdev.xzpeter.org> <20160302071540.GC5730@pxdev.xzpeter.org> <87fuw9p5xg.fsf@blackfin.pond.sub.org> <20160302105558.GD5730@pxdev.xzpeter.org> <87fuw9kmjm.fsf@blackfin.pond.sub.org> <20160303042754.GA30973@pxdev.xzpeter.org> Date: Thu, 03 Mar 2016 07:34:21 +0100 In-Reply-To: <20160303042754.GA30973@pxdev.xzpeter.org> (Peter Xu's message of "Thu, 3 Mar 2016 12:27:54 +0800") Message-ID: <87k2lk9ij6.fsf@blackfin.pond.sub.org> MIME-Version: 1.0 Content-Type: text/plain Subject: Re: [Qemu-devel] [PATCH 1/3] arm: gic: add GICType List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Peter Xu Cc: wei@redhat.com, peter.maydell@linaro.org, drjones@redhat.com, mdroth@linux.vnet.ibm.com, qemu-devel@nongnu.org, Andrea Bolognani Peter Xu writes: > On Wed, Mar 02, 2016 at 02:59:57PM +0100, Markus Armbruster wrote: >> Peter Xu writes: >> > What's "query-schema"? Is that a QMP command? >> >> Yes. >> >> More than you ever wanted to know: >> http://events.linuxfoundation.org/sites/events/files/slides/armbru-qemu-introspection.pdf >> https://www.youtube.com/watch?v=IEa8Ao8_B9o&list=PLW3ep1uCIRfyLNSu708gWG7uvqlolk0ep&index=28 > > Thanks for the pointers and cool slides! It's a good thing to pick > up. :-) > > It'll be cool we treat data as codes, and codes as data. > > I see that qapi-introspect branch is not there now. Is it merged to > some other branch already? When will it be there in QEMU master > (still not in, right?)? Just curious about it. Merged in commit 9e72681. Between the talk and the merge, query-schema got renamed to query-qmp-schema. Sometimes I relapse. Sorry for the confusion! >> > What I meant is that, we can define the following (for example): >> > >> > { 'struct': 'GICCapInfo', >> > 'data': [ >> > 'version': 'int', >> > 'emulated': 'bool', >> > 'kernel': 'bool'] } >> > >> > And: >> > >> > { 'command': 'query-gic-capability', >> > 'returns': ['GICCapInfo'] } >> > >> > So we can keep this schema as it is when new versions arrive. We >> > can just push another element in. >> >> To answer questions of the sort "can this QEMU version do X?", it's >> often useful to tie X to a schema change that is visible in the result >> of query-schema. > > Now I can understand. For this case, I guess both ways work, right? > Considering that if "query-schema" is still not there, I'd still > prefer the "array" solution. At least, it can keep the schema > several lines shorter (as you have mentioned already, it's *big* > enough :). Also, even we would have "query-schema", I would still > prefer not change schema unless necessary. What do you think? I can't say without understanding what the introspection question would be. That needs actual thought, which is in short supply, especially before breakfast ;)