[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH v4 03/17] qapi-schema: add 'device_add'
From: |
marcandre . lureau |
Subject: |
[Qemu-devel] [PATCH v4 03/17] qapi-schema: add 'device_add' |
Date: |
Wed, 10 Aug 2016 22:02:21 +0400 |
From: Marc-André Lureau <address@hidden>
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é Lureau <address@hidden>
Reviewed-by: Eric Blake <address@hidden>
---
qapi-schema.json | 40 ++++++++++++++++++++++++++++++++++++++++
1 file changed, 40 insertions(+)
diff --git a/qapi-schema.json b/qapi-schema.json
index 553b02e..6e2550e 100644
--- a/qapi-schema.json
+++ b/qapi-schema.json
@@ -2200,6 +2200,46 @@
##
{ 'command': 'xen-set-global-dirty-log', 'data': { 'enable': 'bool' } }
+##
+# @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
+#
+# Additional arguments depend on the type.
+#
+# 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",
+# "bus": "pci.0",
+# "mac": "52:54:00:12:34:56" } }
+# <- { "return": {} }
+#
+# TODO This command effectively bypasses QAPI completely due to its
+# "additional arguments" business. It shouldn't have been added to
+# the schema in this form. It should be qapified properly, or
+# replaced by a properly qapified command.
+#
+# Since: 0.13
+##
+{ 'command': 'device_add',
+ 'data': {'driver': 'str', 'id': 'str'},
+ 'gen': false } # so we can get the additional arguments
+
##
# @device_del:
#
--
2.9.0
- [Qemu-devel] [PATCH v4 00/17] qapi: remove the 'middle' mode, marcandre . lureau, 2016/08/10
- [Qemu-devel] [PATCH v4 01/17] build-sys: define QEMU_VERSION_{MAJOR, MINOR, MICRO}, marcandre . lureau, 2016/08/10
- [Qemu-devel] [PATCH v4 02/17] qapi-schema: use generated marshaller for 'qmp_capabilities', marcandre . lureau, 2016/08/10
- [Qemu-devel] [PATCH v4 03/17] qapi-schema: add 'device_add',
marcandre . lureau <=
- [Qemu-devel] [PATCH v4 04/17] monitor: simplify invalid_qmp_mode(), marcandre . lureau, 2016/08/10
- [Qemu-devel] [PATCH v4 05/17] monitor: register gen:false commands manually, marcandre . lureau, 2016/08/10
- [Qemu-devel] [PATCH v4 06/17] monitor: unregister conditional commands, marcandre . lureau, 2016/08/10
- Re: [Qemu-devel] [PATCH v4 06/17] monitor: unregister conditional commands, Markus Armbruster, 2016/08/17
- [Qemu-devel] [PATCH v4 07/17] qapi: export the marshallers, marcandre . lureau, 2016/08/10
- [Qemu-devel] [PATCH v4 08/17] monitor: use qmp_find_command() (using generated qapi code), marcandre . lureau, 2016/08/10