[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH v6 03/18] qapi-schema: add 'device_add'
From: |
Marc-André Lureau |
Subject: |
[Qemu-devel] [PATCH v6 03/18] qapi-schema: add 'device_add' |
Date: |
Mon, 12 Sep 2016 13:18:58 +0400 |
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 5e15d28..55f825d 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.10.0
- [Qemu-devel] [PATCH v6 00/18] qapi: remove the 'middle' mode, Marc-André Lureau, 2016/09/12
- [Qemu-devel] [PATCH v6 01/18] build-sys: define QEMU_VERSION_{MAJOR, MINOR, MICRO}, Marc-André Lureau, 2016/09/12
- [Qemu-devel] [PATCH v6 02/18] qapi-schema: use generated marshaller for 'qmp_capabilities', Marc-André Lureau, 2016/09/12
- [Qemu-devel] [PATCH v6 03/18] qapi-schema: add 'device_add',
Marc-André Lureau <=
- [Qemu-devel] [PATCH v6 04/18] monitor: simplify invalid_qmp_mode(), Marc-André Lureau, 2016/09/12
- [Qemu-devel] [PATCH v6 05/18] monitor: register gen:false commands manually, Marc-André Lureau, 2016/09/12
- [Qemu-devel] [PATCH v6 06/18] qapi: Support unregistering QMP commands, Marc-André Lureau, 2016/09/12
- [Qemu-devel] [PATCH v6 07/18] qmp: Hack to keep commands configuration-specific, Marc-André Lureau, 2016/09/12
- [Qemu-devel] [PATCH v6 08/18] qapi: export the marshallers, Marc-André Lureau, 2016/09/12
- [Qemu-devel] [PATCH v6 10/18] monitor: implement 'qmp_query_commands' without qmp_cmds, Marc-André Lureau, 2016/09/12
- [Qemu-devel] [PATCH v6 09/18] monitor: use qmp_find_command() (using generated qapi code), Marc-André Lureau, 2016/09/12
- [Qemu-devel] [PATCH v6 12/18] qapi: remove the "middle" mode, Marc-André Lureau, 2016/09/12
- [Qemu-devel] [PATCH v6 11/18] monitor: remove mhandler.cmd_new, Marc-André Lureau, 2016/09/12
- [Qemu-devel] [PATCH v6 13/18] qapi: check invalid arguments on no-args commands, Marc-André Lureau, 2016/09/12