From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from [140.186.70.92] (port=35278 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OXLQI-0004Sf-DQ for qemu-devel@nongnu.org; Fri, 09 Jul 2010 17:47:55 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OXLQH-0005WB-4T for qemu-devel@nongnu.org; Fri, 09 Jul 2010 17:47:54 -0400 Received: from mx1.redhat.com ([209.132.183.28]:36603) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OXLQG-0005W1-TF for qemu-devel@nongnu.org; Fri, 09 Jul 2010 17:47:53 -0400 Date: Fri, 9 Jul 2010 18:47:42 -0300 From: Luiz Capitulino Message-ID: <20100709184742.33173ac3@redhat.com> In-Reply-To: <1278699228-7665-1-git-send-email-miguel.filho@gmail.com> References: <1278699228-7665-1-git-send-email-miguel.filho@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Subject: [Qemu-devel] Re: [PATCH v2] QMP: Introduce the documentation for query-qdm List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Miguel Di Ciurcio Filho Cc: avi@redhat.com, qemu-devel@nongnu.org, armbru@redhat.com On Fri, 9 Jul 2010 15:13:48 -0300 Miguel Di Ciurcio Filho wrote: > Changelog from v1 > ----------------- > - renamed "props" to "properties" > - updated the examples > - reworded the explanations of "name" and "description" > - split "type" into a json-object, adding "qmp" and "qdev" > - list all possible values for "bus" > - list all possible values for "qdev" on "type" > - list all possible values for "qmp" on "type" > --- > qemu-monitor.hx | 88 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ > 1 files changed, 88 insertions(+), 0 deletions(-) > > diff --git a/qemu-monitor.hx b/qemu-monitor.hx > index 2af3de6..0055d0a 100644 > --- a/qemu-monitor.hx > +++ b/qemu-monitor.hx > @@ -2490,6 +2490,94 @@ STEXI > show device tree > @item info qdm > show qdev device model list > +ETEXI > +SQMP > +query-qdm > +--------- > + > +Describe the capabilities of all devices registered with qdev. > + > +The returned output is a json-array, each element is a json-object describing > +a single device type. > + > +Each json-object contains the following: > + > +- "name": name of the device (json-string) > +- "bus": the name of the bus type for the device (json-string) > + - Possible values: PCI, SCSI, I2C, ISA, SSI, USB, virtio-serial-bus, System "System", do we really have this? If so, isn't it internal only? > +- "alias": an alias by which the device is also known (json-string, optional) > +- "description": description of the device (json-string, optional) > +- "creatable": whether this device can be created on command line (json-boolean) > +- "properties": a list where each element is an json-object that describes a > + property of the device. Each json-object contains the following: > + - "name": the name of the property (json-string) > + - "type": a json-object that contains the following: > + - "qdev": the internal name of the type of the property (json-string) I assume this is used in the command-line, right? It's better to say that rather than "internal", as "internal" doesn't seem to have a purpose for clients. Otherwise, looks good to me. Markus, I need your ACK too. > + - Possible values: uint8, uint16, uint32, uint64, int32, macaddr, > + drive, chr, string, netdev, bit, taddr > + - "qmp": the json equivalent type of the internal type (json-string) > + - Possible values: integer, string, boolean > + > +Example: > + > +-> { "execute": "query-qdm" } > +<- { > + "return": [ > + { > + "name": "virtio-blk-pci", > + "creatable": true, > + "bus": "PCI", > + "properties": [ > + { > + "name": "indirect_desc", > + "type": { > + "qdev": "bit", > + "qmp": "boolean" > + } > + }, > + { > + "name": "logical_block_size", > + "type": { > + "qdev": "uint16", > + "qmp": "integer" > + } > + }, > + { > + "name": "opt_io_size", > + "type": { > + "qdev": "uint32", > + "qmp": "integer" > + } > + } > + { > + "name": "drive", > + "type": { > + "qdev": "drive", > + "qmp": "string" > + } > + } > + ] > + }, > + { > + "name": "virtio-balloon-pci", > + "creatable": true, > + "bus": "PCI", > + "properties": [ > + { > + "name": "indirect_desc", > + "type": { > + "qdev": "bit", > + "qmp": "boolean" > + } > + } > + ] > + }, > + .... > + ] > + > +EQMP > + > +STEXI > @item info roms > show roms > @end table