Received: from eggs.gnu.org ([2001:4830:134:3::10]:57359) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bVdxg-0004Y2-Cu for qemu-devel@nongnu.org; Fri, 05 Aug 2016 08:10:49 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bVdxc-0000qZ-FB for qemu-devel@nongnu.org; Fri, 05 Aug 2016 08:10:47 -0400 Received: from mx1.redhat.com ([209.132.183.28]:39734) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bVdxc-0000qT-0c for qemu-devel@nongnu.org; Fri, 05 Aug 2016 08:10:44 -0400 Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 96E66C03BD58 for ; Fri, 5 Aug 2016 12:10:42 +0000 (UTC) From: Markus Armbruster References: <20160721140030.28383-1-marcandre.lureau@redhat.com> <20160721140030.28383-3-marcandre.lureau@redhat.com> Date: Fri, 05 Aug 2016 14:10:40 +0200 In-Reply-To: <20160721140030.28383-3-marcandre.lureau@redhat.com> (marcandre lureau's message of "Thu, 21 Jul 2016 18:00:20 +0400") Message-ID: <8737mjxvpb.fsf@dusky.pond.sub.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [PATCH v2 02/12] qapi-schema: add 'device_add' List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: marcandre.lureau@redhat.com Cc: qemu-devel@nongnu.org marcandre.lureau@redhat.com writes: > From: Marc-Andr=C3=A9 Lureau > > Even though device_add is not fully qapi'fied, we may add it to the json > schema with 'gen': false, so registration and documentation can be > generated. > > Signed-off-by: Marc-Andr=C3=A9 Lureau > --- > qapi-schema.json | 29 +++++++++++++++++++++++++++++ > 1 file changed, 29 insertions(+) > > diff --git a/qapi-schema.json b/qapi-schema.json > index 03c15d8..e950264 100644 > --- a/qapi-schema.json > +++ b/qapi-schema.json > @@ -2200,6 +2200,35 @@ > ## > { 'command': 'xen-set-global-dirty-log', 'data': { 'enable': 'bool' } } >=20=20 > +## > +# @device_add: > +# > +# @driver: the name of the new device's driver > +# @bus: #optional the device's parent bus (device tree path) > +# @id: the device's ID, must be unique > +# @props: #optional a dictionary of properties to be passed to the backe= nd I'm afraid @props is wrong. The properties are passed inline, like this: { "execute": "device_add", "arguments": { "driver": "e1000", "id": "nic1", "netdev": "netdev1" }= } *not* in a separate @props object. See also commit b8a9832 "qapi-schema: Fix up misleading specification of netdev_add". > +# > +# Add a device. > +# > +# Notes: > +# 1. For detailed information about this command, please refer to the > +# 'docs/qdev-device-use.txt' file. > +# > +# 2. It's possible to list device properties by running QEMU with the > +# "-device DEVICE,help" command-line argument, where DEVICE is the > +# device's name > +# > +# Example: > +# > +# -> { "execute": "device_add", > +# "arguments": { "driver": "e1000", "id": "net1" } } Please include at least one property in the example. > +# <- { "return": {} } > +# > +# Since: 0.13 > +## > +{ 'command': 'device_add', > + 'data': {'driver': 'str', 'id': 'str'}, 'gen': false } > + > ## > # @device_del: > # I like the general idea to do the non-qapi device_add like the simplarly non-qapi netdev_add.