From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:39766) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bm1dh-0006SB-1o for qemu-devel@nongnu.org; Mon, 19 Sep 2016 12:41:57 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bm1db-0008Qi-Cm for qemu-devel@nongnu.org; Mon, 19 Sep 2016 12:41:52 -0400 Received: from mx1.redhat.com ([209.132.183.28]:41020) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bm1da-0008Q0-NB for qemu-devel@nongnu.org; Mon, 19 Sep 2016 12:41:47 -0400 Received: from int-mx13.intmail.prod.int.phx2.redhat.com (int-mx13.intmail.prod.int.phx2.redhat.com [10.5.11.26]) (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 29580C05A280 for ; Mon, 19 Sep 2016 16:41:46 +0000 (UTC) From: Markus Armbruster Date: Mon, 19 Sep 2016 18:41:34 +0200 Message-Id: <1474303294-13952-19-git-send-email-armbru@redhat.com> In-Reply-To: <1474303294-13952-1-git-send-email-armbru@redhat.com> References: <1474303294-13952-1-git-send-email-armbru@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Subject: [Qemu-devel] [PULL 18/18] Replace qmp-commands.hx by docs/qmp-commands.txt List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= From: Marc-Andr=C3=A9 Lureau The only remaining function of qmp-commands.hx is to let us generate qmp-commands.txt from it. Replace qmp-commands.hx by qmp-commands.txt. We intend to move the documentation into the QAPI schema and generate qapi-commands.txt from it, but not right now. Signed-off-by: Marc-Andr=C3=A9 Lureau Message-Id: <20160912091913.15831-19-marcandre.lureau@redhat.com> Reviewed-by: Markus Armbruster Signed-off-by: Markus Armbruster --- .gitignore | 1 - MAINTAINERS | 1 - Makefile | 6 +- docs/qapi-code-gen.txt | 6 +- qmp-commands.hx =3D> docs/qmp-commands.txt | 1127 ----------------------= -------- docs/writing-qmp-commands.txt | 38 - 6 files changed, 4 insertions(+), 1175 deletions(-) rename qmp-commands.hx =3D> docs/qmp-commands.txt (87%) diff --git a/.gitignore b/.gitignore index 5ffc84b..c91d018 100644 --- a/.gitignore +++ b/.gitignore @@ -55,7 +55,6 @@ /qemu-monitor-info.texi /qemu-version.h /qemu-version.h.tmp -/qmp-commands.txt /vscclient /fsdev/virtfs-proxy-helper *.[1-9] diff --git a/MAINTAINERS b/MAINTAINERS index 7d43026..d4ee949 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -1235,7 +1235,6 @@ M: Markus Armbruster S: Supported F: qmp.c F: monitor.c -F: qmp-commands.hx F: docs/*qmp-* F: scripts/qmp/ T: git git://repo.or.cz/qemu/armbru.git qapi-next diff --git a/Makefile b/Makefile index 1c9f062..81ca388 100644 --- a/Makefile +++ b/Makefile @@ -92,7 +92,6 @@ HELPERS-$(CONFIG_LINUX) =3D qemu-bridge-helper$(EXESUF) =20 ifdef BUILD_DOCS DOCS=3Dqemu-doc.html qemu-tech.html qemu.1 qemu-img.1 qemu-nbd.8 qemu-ga= .8 -DOCS+=3Dqmp-commands.txt ifdef CONFIG_VIRTFS DOCS+=3Dfsdev/virtfs-proxy-helper.1 endif @@ -432,7 +431,7 @@ endif install-doc: $(DOCS) $(INSTALL_DIR) "$(DESTDIR)$(qemu_docdir)" $(INSTALL_DATA) qemu-doc.html qemu-tech.html "$(DESTDIR)$(qemu_docdir)= " - $(INSTALL_DATA) qmp-commands.txt "$(DESTDIR)$(qemu_docdir)" + $(INSTALL_DATA) docs/qmp-commands.txt "$(DESTDIR)$(qemu_docdir)" ifdef CONFIG_POSIX $(INSTALL_DIR) "$(DESTDIR)$(mandir)/man1" $(INSTALL_DATA) qemu.1 "$(DESTDIR)$(mandir)/man1" @@ -555,9 +554,6 @@ qemu-monitor.texi: $(SRC_PATH)/hmp-commands.hx $(SRC_= PATH)/scripts/hxtool qemu-monitor-info.texi: $(SRC_PATH)/hmp-commands-info.hx $(SRC_PATH)/scr= ipts/hxtool $(call quiet-command,sh $(SRC_PATH)/scripts/hxtool -t < $< > $@," GEN = $@") =20 -qmp-commands.txt: $(SRC_PATH)/qmp-commands.hx $(SRC_PATH)/scripts/hxtool - $(call quiet-command,sh $(SRC_PATH)/scripts/hxtool -q < $< > $@," GEN = $@") - qemu-img-cmds.texi: $(SRC_PATH)/qemu-img-cmds.hx $(SRC_PATH)/scripts/hxt= ool $(call quiet-command,sh $(SRC_PATH)/scripts/hxtool -t < $< > $@," GEN = $@") =20 diff --git a/docs/qapi-code-gen.txt b/docs/qapi-code-gen.txt index de298dc..5d4c2cd 100644 --- a/docs/qapi-code-gen.txt +++ b/docs/qapi-code-gen.txt @@ -964,9 +964,9 @@ Example: =20 Used to generate the marshaling/dispatch functions for the commands defined in the schema. The generated code implements -qmp_marshal_COMMAND() (mentioned in qmp-commands.hx, and registered -automatically), and declares qmp_COMMAND() that the user must -implement. The following files are generated: +qmp_marshal_COMMAND() (registered automatically), and declares +qmp_COMMAND() that the user must implement. The following files are +generated: =20 $(prefix)qmp-marshal.c: command marshal/dispatch functions for each QMP command defined in the schema. Functions diff --git a/qmp-commands.hx b/docs/qmp-commands.txt similarity index 87% rename from qmp-commands.hx rename to docs/qmp-commands.txt index b38772c..acebeb3 100644 --- a/qmp-commands.hx +++ b/docs/qmp-commands.txt @@ -1,8 +1,3 @@ -HXCOMM QMP dispatch table and documentation -HXCOMM Text between SQMP and EQMP is copied to the QMP documentation fil= e and -HXCOMM does not show up in the other formats. - -SQMP QMP Supported Commands ---------------------- =20 @@ -58,14 +53,6 @@ If you're planning to adopt QMP, please observe the fo= llowing: Server's responses in the examples below are always a success response, = please refer to the QMP specification for more details on error responses. =20 -EQMP - - { - .name =3D "quit", - .args_type =3D "", - }, - -SQMP quit ---- =20 @@ -78,14 +65,6 @@ Example: -> { "execute": "quit" } <- { "return": {} } =20 -EQMP - - { - .name =3D "eject", - .args_type =3D "force:-f,device:B", - }, - -SQMP eject ----- =20 @@ -103,14 +82,6 @@ Example: =20 Note: The "force" argument defaults to false. =20 -EQMP - - { - .name =3D "change", - .args_type =3D "device:B,target:F,arg:s?", - }, - -SQMP change ------ =20 @@ -138,14 +109,6 @@ Examples: "arg": "foobar1" } } <- { "return": {} } =20 -EQMP - - { - .name =3D "screendump", - .args_type =3D "filename:F", - }, - -SQMP screendump ---------- =20 @@ -160,14 +123,6 @@ Example: -> { "execute": "screendump", "arguments": { "filename": "/tmp/image" } = } <- { "return": {} } =20 -EQMP - - { - .name =3D "stop", - .args_type =3D "", - }, - -SQMP stop ---- =20 @@ -180,14 +135,6 @@ Example: -> { "execute": "stop" } <- { "return": {} } =20 -EQMP - - { - .name =3D "cont", - .args_type =3D "", - }, - -SQMP cont ---- =20 @@ -200,14 +147,6 @@ Example: -> { "execute": "cont" } <- { "return": {} } =20 -EQMP - - { - .name =3D "system_wakeup", - .args_type =3D "", - }, - -SQMP system_wakeup ------------- =20 @@ -220,14 +159,6 @@ Example: -> { "execute": "system_wakeup" } <- { "return": {} } =20 -EQMP - - { - .name =3D "system_reset", - .args_type =3D "", - }, - -SQMP system_reset ------------ =20 @@ -240,14 +171,6 @@ Example: -> { "execute": "system_reset" } <- { "return": {} } =20 -EQMP - - { - .name =3D "system_powerdown", - .args_type =3D "", - }, - -SQMP system_powerdown ---------------- =20 @@ -260,16 +183,6 @@ Example: -> { "execute": "system_powerdown" } <- { "return": {} } =20 -EQMP - - { - .name =3D "device_add", - .args_type =3D "device:O", - .params =3D "driver[,prop=3Dvalue][,...]", - .help =3D "add device, like -device on the command line", - }, - -SQMP device_add ---------- =20 @@ -295,14 +208,6 @@ Notes: (2) It's possible to list device properties by running QEMU with the "-device DEVICE,\?" command-line argument, where DEVICE is the devic= e's name =20 -EQMP - - { - .name =3D "device_del", - .args_type =3D "id:s", - }, - -SQMP device_del ---------- =20 @@ -322,14 +227,6 @@ Example: -> { "execute": "device_del", "arguments": { "id": "/machine/peripheral-= anon/device[0]" } } <- { "return": {} } =20 -EQMP - - { - .name =3D "send-key", - .args_type =3D "keys:q,hold-time:i?", - }, - -SQMP send-key ---------- =20 @@ -352,14 +249,6 @@ Example: { "type": "qcode", "data": "delete" } ] } = } <- { "return": {} } =20 -EQMP - - { - .name =3D "cpu", - .args_type =3D "index:i", - }, - -SQMP cpu --- =20 @@ -376,14 +265,6 @@ Example: =20 Note: CPUs' indexes are obtained with the 'query-cpus' command. =20 -EQMP - - { - .name =3D "cpu-add", - .args_type =3D "id:i", - }, - -SQMP cpu-add ------- =20 @@ -398,14 +279,6 @@ Example: -> { "execute": "cpu-add", "arguments": { "id": 2 } } <- { "return": {} } =20 -EQMP - - { - .name =3D "memsave", - .args_type =3D "val:l,size:i,filename:s,cpu:i?", - }, - -SQMP memsave ------- =20 @@ -426,14 +299,6 @@ Example: "filename": "/tmp/virtual-mem-dump" } } <- { "return": {} } =20 -EQMP - - { - .name =3D "pmemsave", - .args_type =3D "val:l,size:i,filename:s", - }, - -SQMP pmemsave -------- =20 @@ -453,14 +318,6 @@ Example: "filename": "/tmp/physical-mem-dump" } } <- { "return": {} } =20 -EQMP - - { - .name =3D "inject-nmi", - .args_type =3D "", - }, - -SQMP inject-nmi ---------- =20 @@ -475,14 +332,6 @@ Example: =20 Note: inject-nmi fails when the guest doesn't support injecting. =20 -EQMP - - { - .name =3D "ringbuf-write", - .args_type =3D "device:s,data:s,format:s?", - }, - -SQMP ringbuf-write ------------- =20 @@ -503,14 +352,6 @@ Example: "format": "utf8" } } <- { "return": {} } =20 -EQMP - - { - .name =3D "ringbuf-read", - .args_type =3D "device:s,size:i,format:s?", - }, - -SQMP ringbuf-read ------------- =20 @@ -538,14 +379,6 @@ Example: "format": "utf8" } } <- {"return": "abcdefgh"} =20 -EQMP - - { - .name =3D "xen-save-devices-state", - .args_type =3D "filename:F", - }, - -SQMP xen-save-devices-state ------- =20 @@ -564,14 +397,6 @@ Example: "arguments": { "filename": "/tmp/save" } } <- { "return": {} } =20 -EQMP - - { - .name =3D "xen-load-devices-state", - .args_type =3D "filename:F", - }, - -SQMP xen-load-devices-state ---------------------- =20 @@ -590,14 +415,6 @@ Example: "arguments": { "filename": "/tmp/resume" } } <- { "return": {} } =20 -EQMP - - { - .name =3D "xen-set-global-dirty-log", - .args_type =3D "enable:b", - }, - -SQMP xen-set-global-dirty-log ------- =20 @@ -613,14 +430,6 @@ Example: "arguments": { "enable": true } } <- { "return": {} } =20 -EQMP - - { - .name =3D "migrate", - .args_type =3D "detach:-d,blk:-b,inc:-i,uri:s", - }, - -SQMP migrate ------- =20 @@ -645,14 +454,6 @@ Notes: (3) The user Monitor's "detach" argument is invalid in QMP and should no= t be used =20 -EQMP - - { - .name =3D "migrate_cancel", - .args_type =3D "", - }, - -SQMP migrate_cancel -------------- =20 @@ -665,14 +466,6 @@ Example: -> { "execute": "migrate_cancel" } <- { "return": {} } =20 -EQMP - - { - .name =3D "migrate-incoming", - .args_type =3D "uri:s", - }, - -SQMP migrate-incoming ---------------- =20 @@ -693,13 +486,6 @@ Notes: be used (2) The uri format is the same as for -incoming =20 -EQMP - { - .name =3D "migrate-set-cache-size", - .args_type =3D "value:o", - }, - -SQMP migrate-set-cache-size ---------------------- =20 @@ -715,13 +501,6 @@ Example: -> { "execute": "migrate-set-cache-size", "arguments": { "value": 536870= 912 } } <- { "return": {} } =20 -EQMP - { - .name =3D "migrate-start-postcopy", - .args_type =3D "", - }, - -SQMP migrate-start-postcopy ---------------------- =20 @@ -732,14 +511,6 @@ Example: -> { "execute": "migrate-start-postcopy" } <- { "return": {} } =20 -EQMP - - { - .name =3D "query-migrate-cache-size", - .args_type =3D "", - }, - -SQMP query-migrate-cache-size ------------------------ =20 @@ -753,14 +524,6 @@ Example: -> { "execute": "query-migrate-cache-size" } <- { "return": 67108864 } =20 -EQMP - - { - .name =3D "migrate_set_speed", - .args_type =3D "value:o", - }, - -SQMP migrate_set_speed ----------------- =20 @@ -775,14 +538,6 @@ Example: -> { "execute": "migrate_set_speed", "arguments": { "value": 1024 } } <- { "return": {} } =20 -EQMP - - { - .name =3D "migrate_set_downtime", - .args_type =3D "value:T", - }, - -SQMP migrate_set_downtime -------------------- =20 @@ -797,16 +552,6 @@ Example: -> { "execute": "migrate_set_downtime", "arguments": { "value": 0.1 } } <- { "return": {} } =20 -EQMP - - { - .name =3D "client_migrate_info", - .args_type =3D "protocol:s,hostname:s,port:i?,tls-port:i?,cert-= subject:s?", - .params =3D "protocol hostname port tls-port cert-subject", - .help =3D "set migration information for remote display", - }, - -SQMP client_migrate_info ------------------- =20 @@ -830,16 +575,6 @@ Example: "port": 1234 } } <- { "return": {} } =20 -EQMP - - { - .name =3D "dump-guest-memory", - .args_type =3D "paging:b,protocol:s,detach:b?,begin:i?,end:i?,f= ormat:s?", - .params =3D "-p protocol [-d] [begin] [length] [format]", - .help =3D "dump guest memory to file", - }, - -SQMP dump =20 =20 @@ -870,14 +605,6 @@ Notes: =20 (1) All boolean arguments default to false =20 -EQMP - - { - .name =3D "query-dump-guest-memory-capability", - .args_type =3D "", - }, - -SQMP query-dump-guest-memory-capability ---------- =20 @@ -889,16 +616,6 @@ Example: <- { "return": { "formats": ["elf", "kdump-zlib", "kdump-lzo", "kdump-snappy"] } =20 -EQMP - - { - .name =3D "query-dump", - .args_type =3D "", - .params =3D "", - .help =3D "query background dump status", - }, - -SQMP query-dump ---------- =20 @@ -912,16 +629,6 @@ Example: <- { "return": { "status": "active", "completed": 1024000, "total": 2048000 } } =20 -EQMP - -#if defined TARGET_S390X - { - .name =3D "dump-skeys", - .args_type =3D "filename:F", - }, -#endif - -SQMP dump-skeys ---------- =20 @@ -936,14 +643,6 @@ Example: -> { "execute": "dump-skeys", "arguments": { "filename": "/tmp/skeys" } = } <- { "return": {} } =20 -EQMP - - { - .name =3D "netdev_add", - .args_type =3D "netdev:O", - }, - -SQMP netdev_add ---------- =20 @@ -966,14 +665,6 @@ Note: The supported device options are the same ones= supported by the '-netdev' command-line argument, which are listed in the '-help' output or Q= EMU's manual =20 -EQMP - - { - .name =3D "netdev_del", - .args_type =3D "id:s", - }, - -SQMP netdev_del ---------- =20 @@ -989,14 +680,6 @@ Example: <- { "return": {} } =20 =20 -EQMP - - { - .name =3D "object-add", - .args_type =3D "qom-type:s,id:s,props:q?", - }, - -SQMP object-add ---------- =20 @@ -1014,14 +697,6 @@ Example: "props": { "filename": "/dev/hwrng" } } } <- { "return": {} } =20 -EQMP - - { - .name =3D "object-del", - .args_type =3D "id:s", - }, - -SQMP object-del ---------- =20 @@ -1037,15 +712,6 @@ Example: <- { "return": {} } =20 =20 -EQMP - - - { - .name =3D "block_resize", - .args_type =3D "device:s?,node-name:s?,size:o", - }, - -SQMP block_resize ------------ =20 @@ -1062,14 +728,6 @@ Example: -> { "execute": "block_resize", "arguments": { "device": "scratch", "siz= e": 1073741824 } } <- { "return": {} } =20 -EQMP - - { - .name =3D "block-stream", - .args_type =3D "job-id:s?,device:B,base:s?,speed:o?,backing-fil= e:s?,on-error:s?", - }, - -SQMP block-stream ------------ =20 @@ -1106,14 +764,6 @@ Example: "base": "/tmp/master.qcow= 2" } } <- { "return": {} } =20 -EQMP - - { - .name =3D "block-commit", - .args_type =3D "job-id:s?,device:B,base:s?,top:s?,backing-file:= s?,speed:o?", - }, - -SQMP block-commit ------------ =20 @@ -1170,16 +820,6 @@ Example: "top": "/tmp/snap1.qcow2" = } } <- { "return": {} } =20 -EQMP - - { - .name =3D "drive-backup", - .args_type =3D "job-id:s?,sync:s,device:B,target:s,speed:i?,mod= e:s?," - "format:s?,bitmap:s?,compress:b?," - "on-source-error:s?,on-target-error:s?", - }, - -SQMP drive-backup ------------ =20 @@ -1228,15 +868,6 @@ Example: "target": "backup.img" } = } <- { "return": {} } =20 -EQMP - - { - .name =3D "blockdev-backup", - .args_type =3D "job-id:s?,sync:s,device:B,target:B,speed:i?,com= press:b?," - "on-source-error:s?,on-target-error:s?", - }, - -SQMP blockdev-backup --------------- =20 @@ -1272,35 +903,6 @@ Example: "target": "tgt-id" } } <- { "return": {} } =20 -EQMP - - { - .name =3D "block-job-set-speed", - .args_type =3D "device:B,speed:o", - }, - - { - .name =3D "block-job-cancel", - .args_type =3D "device:B,force:b?", - }, - { - .name =3D "block-job-pause", - .args_type =3D "device:B", - }, - { - .name =3D "block-job-resume", - .args_type =3D "device:B", - }, - { - .name =3D "block-job-complete", - .args_type =3D "device:B", - }, - { - .name =3D "transaction", - .args_type =3D "actions:q,properties:q?", - }, - -SQMP transaction ----------- =20 @@ -1387,14 +989,6 @@ Example: "name": "snapshot0" } } ] } } <- { "return": {} } =20 -EQMP - - { - .name =3D "block-dirty-bitmap-add", - .args_type =3D "node:B,name:s,granularity:i?", - }, - -SQMP block-dirty-bitmap-add ---------------------- Since 2.4 @@ -1413,14 +1007,6 @@ Example: "name": "bitmap0" } } <- { "return": {} } =20 -EQMP - - { - .name =3D "block-dirty-bitmap-remove", - .args_type =3D "node:B,name:s", - }, - -SQMP block-dirty-bitmap-remove ------------------------- Since 2.4 @@ -1439,14 +1025,6 @@ Example: "name": "bitmap0" = } } <- { "return": {} } =20 -EQMP - - { - .name =3D "block-dirty-bitmap-clear", - .args_type =3D "node:B,name:s", - }, - -SQMP block-dirty-bitmap-clear ------------------------ Since 2.4 @@ -1466,14 +1044,6 @@ Example: "name": "bitm= ap0" } } <- { "return": {} } =20 -EQMP - - { - .name =3D "blockdev-snapshot-sync", - .args_type =3D "device:s?,node-name:s?,snapshot-file:s,snapshot= -node-name:s?,format:s?,mode:s?", - }, - -SQMP blockdev-snapshot-sync ---------------------- =20 @@ -1501,14 +1071,6 @@ Example: "format": "qcow2= " } } <- { "return": {} } =20 -EQMP - - { - .name =3D "blockdev-snapshot", - .args_type =3D "node:s,overlay:s", - }, - -SQMP blockdev-snapshot ----------------- Since 2.5 @@ -1538,14 +1100,6 @@ Example: "overlay": "node1534= " } } <- { "return": {} } =20 -EQMP - - { - .name =3D "blockdev-snapshot-internal-sync", - .args_type =3D "device:B,name:s", - }, - -SQMP blockdev-snapshot-internal-sync ------------------------------- =20 @@ -1567,14 +1121,6 @@ Example: } <- { "return": {} } =20 -EQMP - - { - .name =3D "blockdev-snapshot-delete-internal-sync", - .args_type =3D "device:B,id:s?,name:s?", - }, - -SQMP blockdev-snapshot-delete-internal-sync -------------------------------------- =20 @@ -1606,18 +1152,6 @@ Example: } } =20 -EQMP - - { - .name =3D "drive-mirror", - .args_type =3D "job-id:s?,sync:s,device:B,target:s,speed:i?,mod= e:s?," - "format:s?,node-name:s?,replaces:s?," - "on-source-error:s?,on-target-error:s?," - "unmap:b?," - "granularity:i?,buf-size:i?", - }, - -SQMP drive-mirror ------------ =20 @@ -1672,16 +1206,6 @@ Example: "format": "qcow2" } } <- { "return": {} } =20 -EQMP - - { - .name =3D "blockdev-mirror", - .args_type =3D "job-id:s?,sync:s,device:B,target:B,replaces:s?,= speed:i?," - "on-source-error:s?,on-target-error:s?," - "granularity:i?,buf-size:i?", - }, - -SQMP blockdev-mirror ------------ =20 @@ -1723,13 +1247,6 @@ Example: "sync": "full" } } <- { "return": {} } =20 -EQMP - { - .name =3D "change-backing-file", - .args_type =3D "device:s,image-node-name:s,backing-file:s", - }, - -SQMP change-backing-file ------------------- Since: 2.1 @@ -1761,14 +1278,6 @@ Arguments: Returns: Nothing on success If "device" does not exist or cannot be determined, DeviceNotFo= und =20 -EQMP - - { - .name =3D "balloon", - .args_type =3D "value:M", - }, - -SQMP balloon ------- =20 @@ -1783,14 +1292,6 @@ Example: -> { "execute": "balloon", "arguments": { "value": 536870912 } } <- { "return": {} } =20 -EQMP - - { - .name =3D "set_link", - .args_type =3D "name:s,up:b", - }, - -SQMP set_link -------- =20 @@ -1806,16 +1307,6 @@ Example: -> { "execute": "set_link", "arguments": { "name": "e1000.0", "up": fals= e } } <- { "return": {} } =20 -EQMP - - { - .name =3D "getfd", - .args_type =3D "fdname:s", - .params =3D "getfd name", - .help =3D "receive a file descriptor via SCM rights and as= sign it a name", - }, - -SQMP getfd ----- =20 @@ -1838,16 +1329,6 @@ Notes: (2) The 'closefd' command can be used to explicitly close the file descriptor when it is no longer needed. =20 -EQMP - - { - .name =3D "closefd", - .args_type =3D "fdname:s", - .params =3D "closefd name", - .help =3D "close a file descriptor previously passed via S= CM rights", - }, - -SQMP closefd ------- =20 @@ -1862,16 +1343,6 @@ Example: -> { "execute": "closefd", "arguments": { "fdname": "fd1" } } <- { "return": {} } =20 -EQMP - - { - .name =3D "add-fd", - .args_type =3D "fdset-id:i?,opaque:s?", - .params =3D "add-fd fdset-id opaque", - .help =3D "Add a file descriptor, that was passed via SCM = rights, to an fd set", - }, - -SQMP add-fd ------- =20 @@ -1900,16 +1371,6 @@ Notes: (1) The list of fd sets is shared by all monitor connections. (2) If "fdset-id" is not specified, a new fd set will be created. =20 -EQMP - - { - .name =3D "remove-fd", - .args_type =3D "fdset-id:i,fd:i?", - .params =3D "remove-fd fdset-id fd", - .help =3D "Remove a file descriptor from an fd set", - }, - -SQMP remove-fd --------- =20 @@ -1932,15 +1393,6 @@ Notes: (2) If "fd" is not specified, all file descriptors in "fdset-id" will be removed. =20 -EQMP - - { - .name =3D "query-fdsets", - .args_type =3D "", - .help =3D "Return information describing all fd sets", - }, - -SQMP query-fdsets ------------- =20 @@ -1981,14 +1433,6 @@ Example: =20 Note: The list of fd sets is shared by all monitor connections. =20 -EQMP - - { - .name =3D "block_passwd", - .args_type =3D "device:s?,node-name:s?,password:s", - }, - -SQMP block_passwd ------------ =20 @@ -2006,14 +1450,6 @@ Example: "password": "12345" } } <- { "return": {} } =20 -EQMP - - { - .name =3D "block_set_io_throttle", - .args_type =3D "device:B,bps:l,bps_rd:l,bps_wr:l,iops:l,iops_rd= :l,iops_wr:l,bps_max:l?,bps_rd_max:l?,bps_wr_max:l?,iops_max:l?,iops_rd_m= ax:l?,iops_wr_max:l?,bps_max_length:l?,bps_rd_max_length:l?,bps_wr_max_le= ngth:l?,iops_max_length:l?,iops_rd_max_length:l?,iops_wr_max_length:l?,io= ps_size:l?,group:s?", - }, - -SQMP block_set_io_throttle ------------ =20 @@ -2062,14 +1498,6 @@ Example: "iops_size": 0 } } <- { "return": {} } =20 -EQMP - - { - .name =3D "set_password", - .args_type =3D "protocol:s,password:s,connected:s?", - }, - -SQMP set_password ------------ =20 @@ -2087,14 +1515,6 @@ Example: "password": "secret" } } <- { "return": {} } =20 -EQMP - - { - .name =3D "expire_password", - .args_type =3D "protocol:s,time:s", - }, - -SQMP expire_password --------------- =20 @@ -2111,14 +1531,6 @@ Example: "time": "+60" } } <- { "return": {} } =20 -EQMP - - { - .name =3D "add_client", - .args_type =3D "protocol:s,fdname:s,skipauth:b?,tls:b?", - }, - -SQMP add_client ---------- =20 @@ -2137,15 +1549,6 @@ Example: "fdname": "myclient" } } <- { "return": {} } =20 -EQMP - { - .name =3D "qmp_capabilities", - .args_type =3D "", - .params =3D "", - .help =3D "enable QMP capabilities", - }, - -SQMP qmp_capabilities ---------------- =20 @@ -2160,14 +1563,6 @@ Example: =20 Note: This command must be issued before issuing any other command. =20 -EQMP - - { - .name =3D "human-monitor-command", - .args_type =3D "command-line:s,cpu-index:i?", - }, - -SQMP human-monitor-command --------------------- =20 @@ -2204,13 +1599,7 @@ Notes: 3. Query Commands =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D =20 -HXCOMM Each query command below is inside a SQMP/EQMP section, do NOT ch= ange -HXCOMM this! We will possibly move query commands definitions inside tho= se -HXCOMM sections, just like regular commands. =20 -EQMP - -SQMP query-version ------------- =20 @@ -2238,14 +1627,6 @@ Example: } } =20 -EQMP - - { - .name =3D "query-version", - .args_type =3D "", - }, - -SQMP query-commands -------------- =20 @@ -2274,14 +1655,6 @@ Example: =20 Note: This example has been shortened as the real response is too long. =20 -EQMP - - { - .name =3D "query-commands", - .args_type =3D "", - }, - -SQMP query-events -------------- =20 @@ -2310,14 +1683,6 @@ Example: =20 Note: This example has been shortened as the real response is too long. =20 -EQMP - - { - .name =3D "query-events", - .args_type =3D "", - }, - -SQMP query-qmp-schema ---------------- =20 @@ -2326,14 +1691,6 @@ named schema entities. Entities are commands, eve= nts and various types. See docs/qapi-code-gen.txt for information on their structure and intended use. =20 -EQMP - - { - .name =3D "query-qmp-schema", - .args_type =3D "", - }, - -SQMP query-chardev ------------- =20 @@ -2370,14 +1727,6 @@ Example: ] } =20 -EQMP - - { - .name =3D "query-chardev", - .args_type =3D "", - }, - -SQMP query-chardev-backends ------------- =20 @@ -2410,14 +1759,6 @@ Example: ] } =20 -EQMP - - { - .name =3D "query-chardev-backends", - .args_type =3D "", - }, - -SQMP query-block ----------- =20 @@ -2593,14 +1934,6 @@ Example: ] } =20 -EQMP - - { - .name =3D "query-block", - .args_type =3D "", - }, - -SQMP query-blockstats ---------------- =20 @@ -2789,14 +2122,6 @@ Example: ] } =20 -EQMP - - { - .name =3D "query-blockstats", - .args_type =3D "query-nodes:b?", - }, - -SQMP query-cpus ---------- =20 @@ -2843,14 +2168,6 @@ Example: ] } =20 -EQMP - - { - .name =3D "query-cpus", - .args_type =3D "", - }, - -SQMP query-iothreads --------------- =20 @@ -2881,14 +2198,6 @@ Example: ] } =20 -EQMP - - { - .name =3D "query-iothreads", - .args_type =3D "", - }, - -SQMP query-pci --------- =20 @@ -3097,14 +2406,6 @@ Example: =20 Note: This example has been shortened as the real response is too long. =20 -EQMP - - { - .name =3D "query-pci", - .args_type =3D "", - }, - -SQMP query-kvm --------- =20 @@ -3120,14 +2421,6 @@ Example: -> { "execute": "query-kvm" } <- { "return": { "enabled": true, "present": true } } =20 -EQMP - - { - .name =3D "query-kvm", - .args_type =3D "", - }, - -SQMP query-status ------------ =20 @@ -3159,14 +2452,6 @@ Example: -> { "execute": "query-status" } <- { "return": { "running": true, "singlestep": false, "status": "runnin= g" } } =20 -EQMP - =20 - { - .name =3D "query-status", - .args_type =3D "", - }, - -SQMP query-mice ---------- =20 @@ -3202,14 +2487,6 @@ Example: ] } =20 -EQMP - - { - .name =3D "query-mice", - .args_type =3D "", - }, - -SQMP query-vnc --------- =20 @@ -3264,18 +2541,6 @@ Example: } } =20 -EQMP - - { - .name =3D "query-vnc", - .args_type =3D "", - }, - { - .name =3D "query-vnc-servers", - .args_type =3D "", - }, - -SQMP query-spice ----------- =20 @@ -3343,16 +2608,6 @@ Example: } } =20 -EQMP - -#if defined(CONFIG_SPICE) - { - .name =3D "query-spice", - .args_type =3D "", - }, -#endif - -SQMP query-name ---------- =20 @@ -3367,14 +2622,6 @@ Example: -> { "execute": "query-name" } <- { "return": { "name": "qemu-name" } } =20 -EQMP - - { - .name =3D "query-name", - .args_type =3D "", - }, - -SQMP query-uuid ---------- =20 @@ -3389,14 +2636,6 @@ Example: -> { "execute": "query-uuid" } <- { "return": { "UUID": "550e8400-e29b-41d4-a716-446655440000" } } =20 -EQMP - - { - .name =3D "query-uuid", - .args_type =3D "", - }, - -SQMP query-command-line-options -------------------------- =20 @@ -3437,14 +2676,6 @@ Example: ] } =20 -EQMP - - { - .name =3D "query-command-line-options", - .args_type =3D "option:s?", - }, - -SQMP query-migrate ------------- =20 @@ -3614,14 +2845,6 @@ Examples: } } =20 -EQMP - - { - .name =3D "query-migrate", - .args_type =3D "", - }, - -SQMP migrate-set-capabilities ------------------------ =20 @@ -3642,14 +2865,6 @@ Example: -> { "execute": "migrate-set-capabilities" , "arguments": { "capabilities": [ { "capability": "xbzrle", "state": true } ] } } =20 -EQMP - - { - .name =3D "migrate-set-capabilities", - .args_type =3D "capabilities:q", - .params =3D "capability:s,state:b", - }, -SQMP query-migrate-capabilities -------------------------- =20 @@ -3679,14 +2894,6 @@ Example: {"state": false, "capability": "postcopy-ram"} ]} =20 -EQMP - - { - .name =3D "query-migrate-capabilities", - .args_type =3D "", - }, - -SQMP migrate-set-parameters ---------------------- =20 @@ -3707,14 +2914,6 @@ Example: -> { "execute": "migrate-set-parameters" , "arguments": { "compress-level": 1 } } =20 -EQMP - - { - .name =3D "migrate-set-parameters", - .args_type =3D - "compress-level:i?,compress-threads:i?,decompress-threads:i?= ,cpu-throttle-initial:i?,cpu-throttle-increment:i?", - }, -SQMP query-migrate-parameters ------------------------ =20 @@ -3744,14 +2943,6 @@ Example: } } =20 -EQMP - - { - .name =3D "query-migrate-parameters", - .args_type =3D "", - }, - -SQMP query-balloon ------------- =20 @@ -3771,96 +2962,6 @@ Example: } } =20 -EQMP - - { - .name =3D "query-balloon", - .args_type =3D "", - }, - - { - .name =3D "query-block-jobs", - .args_type =3D "", - }, - - { - .name =3D "qom-list", - .args_type =3D "path:s", - }, - - { - .name =3D "qom-set", - .args_type =3D "path:s,property:s,value:q", - }, - - { - .name =3D "qom-get", - .args_type =3D "path:s,property:s", - }, - - { - .name =3D "nbd-server-start", - .args_type =3D "addr:q,tls-creds:s?", - }, - { - .name =3D "nbd-server-add", - .args_type =3D "device:B,writable:b?", - }, - { - .name =3D "nbd-server-stop", - .args_type =3D "", - }, - - { - .name =3D "change-vnc-password", - .args_type =3D "password:s", - }, - { - .name =3D "qom-list-types", - .args_type =3D "implements:s?,abstract:b?", - }, - - { - .name =3D "device-list-properties", - .args_type =3D "typename:s", - }, - - { - .name =3D "query-machines", - .args_type =3D "", - }, - - { - .name =3D "query-cpu-definitions", - .args_type =3D "", - }, - - { - .name =3D "query-cpu-model-expansion", - .args_type =3D "type:s,model:q", - }, - - { - .name =3D "query-cpu-model-comparison", - .args_type =3D "modela:q,modelb:q", - }, - - { - .name =3D "query-cpu-model-baseline", - .args_type =3D "modela:q,modelb:q", - }, - - { - .name =3D "query-target", - .args_type =3D "", - }, - - { - .name =3D "query-tpm", - .args_type =3D "", - }, - -SQMP query-tpm --------- =20 @@ -3886,14 +2987,6 @@ Example: ] } =20 -EQMP - - { - .name =3D "query-tpm-models", - .args_type =3D "", - }, - -SQMP query-tpm-models ---------------- =20 @@ -3906,14 +2999,6 @@ Example: -> { "execute": "query-tpm-models" } <- { "return": [ "tpm-tis" ] } =20 -EQMP - - { - .name =3D "query-tpm-types", - .args_type =3D "", - }, - -SQMP query-tpm-types --------------- =20 @@ -3926,14 +3011,6 @@ Example: -> { "execute": "query-tpm-types" } <- { "return": [ "passthrough" ] } =20 -EQMP - - { - .name =3D "chardev-add", - .args_type =3D "id:s,backend:q", - }, - -SQMP chardev-add ---------------- =20 @@ -3962,15 +3039,6 @@ Examples: "backend" : { "type" : "pty", "data" : {} } } } <- { "return": { "pty" : "/dev/pty/42" } } =20 -EQMP - - { - .name =3D "chardev-remove", - .args_type =3D "id:s", - }, - - -SQMP chardev-remove -------------- =20 @@ -3985,13 +3053,6 @@ Example: -> { "execute": "chardev-remove", "arguments": { "id" : "foo" } } <- { "return": {} } =20 -EQMP - { - .name =3D "query-rx-filter", - .args_type =3D "name:s?", - }, - -SQMP query-rx-filter --------------- =20 @@ -4049,14 +3110,6 @@ Example: ] } =20 -EQMP - - { - .name =3D "blockdev-add", - .args_type =3D "options:q", - }, - -SQMP blockdev-add ------------ =20 @@ -4107,14 +3160,6 @@ Example (2): =20 <- { "return": {} } =20 -EQMP - - { - .name =3D "x-blockdev-del", - .args_type =3D "id:s?,node-name:s?", - }, - -SQMP x-blockdev-del ------------ Since 2.5 @@ -4163,14 +3208,6 @@ Example: } <- { "return": {} } =20 -EQMP - - { - .name =3D "blockdev-open-tray", - .args_type =3D "device:s,force:b?", - }, - -SQMP blockdev-open-tray ------------------ =20 @@ -4210,14 +3247,6 @@ Example: =20 <- { "return": {} } =20 -EQMP - - { - .name =3D "blockdev-close-tray", - .args_type =3D "device:s", - }, - -SQMP blockdev-close-tray ------------------- =20 @@ -4244,14 +3273,6 @@ Example: =20 <- { "return": {} } =20 -EQMP - - { - .name =3D "x-blockdev-remove-medium", - .args_type =3D "device:s", - }, - -SQMP x-blockdev-remove-medium ------------------------ =20 @@ -4291,14 +3312,6 @@ Example: =20 <- { "return": {} } =20 -EQMP - - { - .name =3D "x-blockdev-insert-medium", - .args_type =3D "device:s,node-name:s", - }, - -SQMP x-blockdev-insert-medium ------------------------ =20 @@ -4330,14 +3343,6 @@ Example: =20 <- { "return": {} } =20 -EQMP - - { - .name =3D "x-blockdev-change", - .args_type =3D "parent:B,child:B?,node:B?", - }, - -SQMP x-blockdev-change ----------------- =20 @@ -4382,14 +3387,6 @@ Delete a quorum's node "child": "children.1" } } <- { "return": {} } =20 -EQMP - - { - .name =3D "query-named-block-nodes", - .args_type =3D "", - }, - -SQMP query-named-block-nodes ----------------------- =20 @@ -4443,14 +3440,6 @@ Example: } } } ] } =20 -EQMP - - { - .name =3D "blockdev-change-medium", - .args_type =3D "device:B,filename:F,format:s?,read-only-mode:s?= ", - }, - -SQMP blockdev-change-medium ---------------------- =20 @@ -4495,14 +3484,6 @@ Examples: =20 <- { "return": {} } =20 -EQMP - - { - .name =3D "query-memdev", - .args_type =3D "", - }, - -SQMP query-memdev ------------ =20 @@ -4532,14 +3513,6 @@ Example (1): ] } =20 -EQMP - - { - .name =3D "query-memory-devices", - .args_type =3D "", - }, - -SQMP query-memory-devices -------------------- =20 @@ -4559,14 +3532,6 @@ Example: "type": "dimm" } ] } =20 -EQMP - - { - .name =3D "query-acpi-ospm-status", - .args_type =3D "", - }, - -SQMP query-acpi-ospm-status ---------------------- =20 @@ -4581,16 +3546,6 @@ Example: { "slot": "3", "slot-type": "DIMM", "source": 0, "statu= s": 0} ]} =20 -EQMP - -#if defined TARGET_I386 - { - .name =3D "rtc-reset-reinjection", - .args_type =3D "", - }, -#endif - -SQMP rtc-reset-reinjection --------------------- =20 @@ -4603,14 +3558,6 @@ Example: -> { "execute": "rtc-reset-reinjection" } <- { "return": {} } =20 -EQMP - - { - .name =3D "trace-event-get-state", - .args_type =3D "name:s,vcpu:i?", - }, - -SQMP trace-event-get-state --------------------- =20 @@ -4635,14 +3582,6 @@ Example: -> { "execute": "trace-event-get-state", "arguments": { "name": "qemu_me= malign" } } <- { "return": [ { "name": "qemu_memalign", "state": "disabled" } ] } =20 -EQMP - - { - .name =3D "trace-event-set-state", - .args_type =3D "name:s,enable:b,ignore-unavailable:b?,vcpu:i?", - }, - -SQMP trace-event-set-state --------------------- =20 @@ -4670,14 +3609,6 @@ Example: -> { "execute": "trace-event-set-state", "arguments": { "name": "qemu_me= malign", "enable": "true" } } <- { "return": {} } =20 -EQMP - - { - .name =3D "input-send-event", - .args_type =3D "console:i?,events:q", - }, - -SQMP input-send-event ---------------- =20 @@ -4733,14 +3664,6 @@ Move mouse pointer to absolute coordinates (20000,= 400). { "type": "abs", "data" : { "axis": "y", "value" : 400 } = } ] } } <- { "return": {} } =20 -EQMP - - { - .name =3D "block-set-write-threshold", - .args_type =3D "node-name:s,write-threshold:l", - }, - -SQMP block-set-write-threshold ------------ =20 @@ -4760,14 +3683,6 @@ Example: "write-threshold": 17179869184 } } <- { "return": {} } =20 -EQMP - - { - .name =3D "query-rocker", - .args_type =3D "name:s", - }, - -SQMP Show rocker switch ------------------ =20 @@ -4780,14 +3695,6 @@ Example: -> { "execute": "query-rocker", "arguments": { "name": "sw1" } } <- { "return": {"name": "sw1", "ports": 2, "id": 1327446905938}} =20 -EQMP - - { - .name =3D "query-rocker-ports", - .args_type =3D "name:s", - }, - -SQMP Show rocker switch ports ------------------------ =20 @@ -4804,14 +3711,6 @@ Example: "autoneg": "off", "link-up": true, "speed": 10000} ]} =20 -EQMP - - { - .name =3D "query-rocker-of-dpa-flows", - .args_type =3D "name:s,tbl-id:i?", - }, - -SQMP Show rocker switch OF-DPA flow tables ------------------------------------- =20 @@ -4832,14 +3731,6 @@ Example: {...more...}, ]} =20 -EQMP - - { - .name =3D "query-rocker-of-dpa-groups", - .args_type =3D "name:s,type:i?", - }, - -SQMP Show rocker OF-DPA group tables ------------------------------- =20 @@ -4861,16 +3752,6 @@ Example: "pop-vlan": 1, "id": 251658240} ]} =20 -EQMP - -#if defined TARGET_ARM - { - .name =3D "query-gic-capabilities", - .args_type =3D "", - }, -#endif - -SQMP query-gic-capabilities --------------- =20 @@ -4885,14 +3766,6 @@ Example: <- { "return": [{ "version": 2, "emulated": true, "kernel": false }, { "version": 3, "emulated": false, "kernel": true } ] } =20 -EQMP - - { - .name =3D "query-hotpluggable-cpus", - .args_type =3D "", - }, - -SQMP Show existing/possible CPUs --------------------------- =20 diff --git a/docs/writing-qmp-commands.txt b/docs/writing-qmp-commands.tx= t index c425393..cfa6fe7 100644 --- a/docs/writing-qmp-commands.txt +++ b/docs/writing-qmp-commands.txt @@ -119,16 +119,6 @@ There are a few things to be noticed: 5. Printing to the terminal is discouraged for QMP commands, we do it he= re because it's the easiest way to demonstrate a QMP command =20 -Now a little hack is needed. As we're still using the old QMP server we = need -to add the new command to its internal dispatch table. This step won't b= e -required in the near future. Open the qmp-commands.hx file and add the -following at the bottom: - - { - .name =3D "hello-world", - .args_type =3D "", - }, - You're done. Now build qemu, run it as suggested in the "Testing" sectio= n, and then type the following QMP command: =20 @@ -173,20 +163,6 @@ There are two important details to be noticed: 2. The C implementation signature must follow the schema's argument orde= ring, which is defined by the "data" member =20 -The last step is to update the qmp-commands.hx file: - - { - .name =3D "hello-world", - .args_type =3D "message:s?", - }, - -Notice that the "args_type" member got our "message" argument. The chara= cter -"s" stands for "string" and "?" means it's optional. This too must be or= dered -according to the C implementation and schema file. You can look for more -examples in the qmp-commands.hx file if you need to define more argument= s. - -Again, this step won't be required in the future. - Time to test our new version of the "hello-world" command. Build qemu, r= un it as described in the "Testing" section and then send two commands: =20 @@ -452,13 +428,6 @@ There are a number of things to be noticed: 6. You have to include the "qmp-commands.h" header file in qemu-timer.c, otherwise qemu won't build =20 -The last step is to add the corresponding entry in the qmp-commands.hx f= ile: - - { - .name =3D "query-alarm-clock", - .args_type =3D "", - }, - Time to test the new command. Build qemu, run it as described in the "Te= sting" section and try this: =20 @@ -597,13 +566,6 @@ iteration of the loop. That's because the alarm time= r method in use is the first element of the alarm_timers array. Also notice that QAPI lists are= handled by hand and we return the head of the list. =20 -To test this you have to add the corresponding qmp-commands.hx entry: - - { - .name =3D "query-alarm-methods", - .args_type =3D "", - }, - Now Build qemu, run it as explained in the "Testing" section and try our= new command: =20 --=20 2.5.5