[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL 03/18] qapi-schema: add 'device_add'
From: |
Markus Armbruster |
Subject: |
[Qemu-devel] [PULL 03/18] qapi-schema: add 'device_add' |
Date: |
Mon, 19 Sep 2016 18:41:19 +0200 |
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>
Message-Id: <address@hidden>
Reviewed-by: Markus Armbruster <address@hidden>
Signed-off-by: Markus Armbruster <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
@@ -2201,6 +2201,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:
#
# Remove a device from a guest
--
2.5.5
- [Qemu-devel] [PULL 00/18] QAPI patches for 2016-09-19, Markus Armbruster, 2016/09/19
- [Qemu-devel] [PULL 03/18] qapi-schema: add 'device_add',
Markus Armbruster <=
- [Qemu-devel] [PULL 05/18] monitor: register gen:false commands manually, Markus Armbruster, 2016/09/19
- [Qemu-devel] [PULL 08/18] qapi: export the marshallers, Markus Armbruster, 2016/09/19
- [Qemu-devel] [PULL 10/18] monitor: implement 'qmp_query_commands' without qmp_cmds, Markus Armbruster, 2016/09/19
- [Qemu-devel] [PULL 13/18] qapi: check invalid arguments on no-args commands, Markus Armbruster, 2016/09/19
- [Qemu-devel] [PULL 14/18] tests: add a test to check invalid args, Markus Armbruster, 2016/09/19
- [Qemu-devel] [PULL 04/18] monitor: simplify invalid_qmp_mode(), Markus Armbruster, 2016/09/19
- [Qemu-devel] [PULL 01/18] build-sys: define QEMU_VERSION_{MAJOR, MINOR, MICRO}, Markus Armbruster, 2016/09/19
- [Qemu-devel] [PULL 06/18] qapi: Support unregistering QMP commands, Markus Armbruster, 2016/09/19
- [Qemu-devel] [PULL 02/18] qapi-schema: use generated marshaller for 'qmp_capabilities', Markus Armbruster, 2016/09/19
- [Qemu-devel] [PULL 17/18] qmp-commands.hx: fix some styling, Markus Armbruster, 2016/09/19