From patchwork Fri Jul 9 18:13:48 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Miguel Di Ciurcio Filho X-Patchwork-Id: 58420 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [199.232.76.165]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 6BB0BB6F0C for ; Sat, 10 Jul 2010 04:15:13 +1000 (EST) Received: from localhost ([127.0.0.1]:58041 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OXI6P-0003Tp-Fo for incoming@patchwork.ozlabs.org; Fri, 09 Jul 2010 14:15:09 -0400 Received: from [140.186.70.92] (port=35916 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OXI5F-00038R-V2 for qemu-devel@nongnu.org; Fri, 09 Jul 2010 14:13:59 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OXI5D-0006b1-Ed for qemu-devel@nongnu.org; Fri, 09 Jul 2010 14:13:56 -0400 Received: from mail-gx0-f173.google.com ([209.85.161.173]:42327) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OXI5D-0006aj-Bq for qemu-devel@nongnu.org; Fri, 09 Jul 2010 14:13:55 -0400 Received: by gxk19 with SMTP id 19so1508295gxk.4 for ; Fri, 09 Jul 2010 11:13:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:from:to:cc:subject:date :message-id:x-mailer; bh=YVAUM1XqCl04RVv2vXBCOMZWVp4ngzLUjgSjnLy6LSQ=; b=nfDz9ozD1I5pKTpn+gY5w9TO/d1mV6qubrE1lG7rfSaLUu2ohleUhZ23Vw33k5z0fB Nf2HL489QCr2bS98G5CArNpzyN8+4OvMku5tZbm12YeiWHa3Y8RsVMW9PsKkQRuZpoU0 b9S1R9kT26fkq6nIPpb8DZrgz7POT9i/9uFeI= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=from:to:cc:subject:date:message-id:x-mailer; b=e+a+V4G/FeH01O9SZdYWoSJ7hiEoEQrEJnVdUoialHYegJRURmZUsz6Gj1G51qmjJd E/BYu5JJXt6+2bWWtdxLWUeWdGoFAlh9YrHH5CK3Wm0GjDdoupCbwgGcNFEkCrE6gzez 2L/WjACIh2M8u4YUs5KOzpPtdw0pwZ6qxLEpk= Received: by 10.100.124.12 with SMTP id w12mr10331659anc.121.1278699233635; Fri, 09 Jul 2010 11:13:53 -0700 (PDT) Received: from localhost.localdomain ([189.61.231.202]) by mx.google.com with ESMTPS id c19sm13338744ana.2.2010.07.09.11.13.50 (version=TLSv1/SSLv3 cipher=RC4-MD5); Fri, 09 Jul 2010 11:13:52 -0700 (PDT) From: Miguel Di Ciurcio Filho To: qemu-devel@nongnu.org Date: Fri, 9 Jul 2010 15:13:48 -0300 Message-Id: <1278699228-7665-1-git-send-email-miguel.filho@gmail.com> X-Mailer: git-send-email 1.7.1 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) Cc: armbru@redhat.com, lcapitulino@redhat.com, Miguel Di Ciurcio Filho , avi@redhat.com Subject: [Qemu-devel] [PATCH v2] QMP: Introduce the documentation for query-qdm X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org 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 +- "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) + - 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