From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:47818) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bWlKg-0006y3-EN for qemu-devel@nongnu.org; Mon, 08 Aug 2016 10:15:13 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bWlKb-0005Kg-P4 for qemu-devel@nongnu.org; Mon, 08 Aug 2016 10:15:10 -0400 Received: from mx1.redhat.com ([209.132.183.28]:49196) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bWlKb-0005Kc-DG for qemu-devel@nongnu.org; Mon, 08 Aug 2016 10:15:05 -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 096FF4E33B for ; Mon, 8 Aug 2016 14:15:05 +0000 (UTC) From: marcandre.lureau@redhat.com Date: Mon, 8 Aug 2016 18:14:30 +0400 Message-Id: <20160808141439.16908-7-marcandre.lureau@redhat.com> In-Reply-To: <20160808141439.16908-1-marcandre.lureau@redhat.com> References: <20160808141439.16908-1-marcandre.lureau@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Subject: [Qemu-devel] [PATCH v3 06/15] monitor: register the qapi generated commands List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: eblake@redhat.com, armbru@redhat.com, =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= From: Marc-Andr=C3=A9 Lureau Stop using the so-called 'middle' mode. Instead, use qmp_find_command() from generated qapi commands registry. Update and fix the documentation too. Export the query-version marshaller function. This allows to call qmp_marshal_query_version() from get_qmp_greeting(). Signed-off-by: Marc-Andr=C3=A9 Lureau --- monitor.c | 10 ++- vl.c | 1 + Makefile | 2 +- docs/writing-qmp-commands.txt | 8 +-- qapi/common.json | 2 +- qmp-commands.hx | 143 ------------------------------------= ------ 6 files changed, 12 insertions(+), 154 deletions(-) diff --git a/monitor.c b/monitor.c index 3a4a533..b5b6d05 100644 --- a/monitor.c +++ b/monitor.c @@ -3934,6 +3934,7 @@ static void handle_qmp_command(JSONMessageParser *p= arser, GQueue *tokens) QObject *obj, *data; QDict *input, *args; const mon_cmd_t *cmd; + QmpCommand *qcmd; const char *cmd_name; Monitor *mon =3D cur_mon; =20 @@ -3959,7 +3960,8 @@ static void handle_qmp_command(JSONMessageParser *p= arser, GQueue *tokens) cmd_name =3D qdict_get_str(input, "execute"); trace_handle_qmp_command(mon, cmd_name); cmd =3D qmp_find_cmd(cmd_name); - if (!cmd) { + qcmd =3D qmp_find_command(cmd_name); + if (!qcmd || !cmd) { error_set(&local_err, ERROR_CLASS_COMMAND_NOT_FOUND, "The command %s has not been found", cmd_name); goto err_out; @@ -3981,7 +3983,7 @@ static void handle_qmp_command(JSONMessageParser *p= arser, GQueue *tokens) goto err_out; } =20 - cmd->mhandler.cmd_new(args, &data, &local_err); + qcmd->fn(args, &data, &local_err); =20 err_out: monitor_protocol_emitter(mon, data, local_err); @@ -4053,7 +4055,9 @@ static QObject *get_qmp_greeting(void) QObject *ver =3D NULL; =20 qmp_marshal_query_version(NULL, &ver, NULL); - return qobject_from_jsonf("{'QMP':{'version': %p,'capabilities': []}= }",ver); + + return qobject_from_jsonf("{'QMP': {'version': %p, 'capabilities': [= ]}}", + ver); } =20 static void monitor_qmp_event(void *opaque, int event) diff --git a/vl.c b/vl.c index e7c2c62..8efa3df 100644 --- a/vl.c +++ b/vl.c @@ -2972,6 +2972,7 @@ int main(int argc, char **argv, char **envp) qemu_init_exec_dir(argv[0]); =20 module_call_init(MODULE_INIT_QOM); + module_call_init(MODULE_INIT_QAPI); =20 qemu_add_opts(&qemu_drive_opts); qemu_add_drive_opts(&qemu_legacy_drive_opts); diff --git a/Makefile b/Makefile index 0d7647f..fcdc192 100644 --- a/Makefile +++ b/Makefile @@ -311,7 +311,7 @@ $(qapi-modules) $(SRC_PATH)/scripts/qapi-event.py $(q= api-py) qmp-commands.h qmp-marshal.c :\ $(qapi-modules) $(SRC_PATH)/scripts/qapi-commands.py $(qapi-py) $(call quiet-command,$(PYTHON) $(SRC_PATH)/scripts/qapi-commands.py \ - $(gen-out-type) -o "." -m $<, \ + $(gen-out-type) -o "." $<, \ " GEN $@") qmp-introspect.h qmp-introspect.c :\ $(qapi-modules) $(SRC_PATH)/scripts/qapi-introspect.py $(qapi-py) diff --git a/docs/writing-qmp-commands.txt b/docs/writing-qmp-commands.tx= t index 59aa77a..0a66e0e 100644 --- a/docs/writing-qmp-commands.txt +++ b/docs/writing-qmp-commands.txt @@ -127,7 +127,6 @@ following at the bottom: { .name =3D "hello-world", .args_type =3D "", - .mhandler.cmd_new =3D qmp_marshal_hello_world, }, =20 You're done. Now build qemu, run it as suggested in the "Testing" sectio= n, @@ -179,7 +178,6 @@ The last step is to update the qmp-commands.hx file: { .name =3D "hello-world", .args_type =3D "message:s?", - .mhandler.cmd_new =3D qmp_marshal_hello_world, }, =20 Notice that the "args_type" member got our "message" argument. The chara= cter @@ -454,12 +452,11 @@ 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 correspoding entry in the qmp-commands.hx fi= le: +The last step is to add the corresponding entry in the qmp-commands.hx f= ile: =20 { .name =3D "query-alarm-clock", .args_type =3D "", - .mhandler.cmd_new =3D qmp_marshal_query_alarm_clock, }, =20 Time to test the new command. Build qemu, run it as described in the "Te= sting" @@ -518,7 +515,7 @@ in the monitor.c file. The entry for the "info alarmc= lock" follows: .args_type =3D "", .params =3D "", .help =3D "show information about the alarm clock", - .mhandler.info =3D hmp_info_alarm_clock, + .mhandler.cmd =3D hmp_info_alarm_clock, }, =20 To test this, run qemu and type "info alarmclock" in the user monitor. @@ -605,7 +602,6 @@ To test this you have to add the corresponding qmp-co= mmands.hx entry: { .name =3D "query-alarm-methods", .args_type =3D "", - .mhandler.cmd_new =3D qmp_marshal_query_alarm_methods, }, =20 Now Build qemu, run it as explained in the "Testing" section and try our= new diff --git a/qapi/common.json b/qapi/common.json index 9353a7b..ef25ea6 100644 --- a/qapi/common.json +++ b/qapi/common.json @@ -76,7 +76,7 @@ # # Since: 0.14.0 ## -{ 'command': 'query-version', 'returns': 'VersionInfo' } +{ 'command': 'query-version', 'returns': 'VersionInfo', 'export-marshal'= : true } =20 ## # @CommandInfo: diff --git a/qmp-commands.hx b/qmp-commands.hx index 13707ac..1ad8dda 100644 --- a/qmp-commands.hx +++ b/qmp-commands.hx @@ -63,7 +63,6 @@ EQMP { .name =3D "quit", .args_type =3D "", - .mhandler.cmd_new =3D qmp_marshal_quit, }, =20 SQMP @@ -84,7 +83,6 @@ EQMP { .name =3D "eject", .args_type =3D "force:-f,device:B", - .mhandler.cmd_new =3D qmp_marshal_eject, }, =20 SQMP @@ -110,7 +108,6 @@ EQMP { .name =3D "change", .args_type =3D "device:B,target:F,arg:s?", - .mhandler.cmd_new =3D qmp_marshal_change, }, =20 SQMP @@ -146,7 +143,6 @@ EQMP { .name =3D "screendump", .args_type =3D "filename:F", - .mhandler.cmd_new =3D qmp_marshal_screendump, }, =20 SQMP @@ -169,7 +165,6 @@ EQMP { .name =3D "stop", .args_type =3D "", - .mhandler.cmd_new =3D qmp_marshal_stop, }, =20 SQMP @@ -190,7 +185,6 @@ EQMP { .name =3D "cont", .args_type =3D "", - .mhandler.cmd_new =3D qmp_marshal_cont, }, =20 SQMP @@ -211,7 +205,6 @@ EQMP { .name =3D "system_wakeup", .args_type =3D "", - .mhandler.cmd_new =3D qmp_marshal_system_wakeup, }, =20 SQMP @@ -232,7 +225,6 @@ EQMP { .name =3D "system_reset", .args_type =3D "", - .mhandler.cmd_new =3D qmp_marshal_system_reset, }, =20 SQMP @@ -253,7 +245,6 @@ EQMP { .name =3D "system_powerdown", .args_type =3D "", - .mhandler.cmd_new =3D qmp_marshal_system_powerdown, }, =20 SQMP @@ -276,7 +267,6 @@ EQMP .args_type =3D "device:O", .params =3D "driver[,prop=3Dvalue][,...]", .help =3D "add device, like -device on the command line", - .mhandler.cmd_new =3D qmp_device_add, }, =20 SQMP @@ -310,7 +300,6 @@ EQMP { .name =3D "device_del", .args_type =3D "id:s", - .mhandler.cmd_new =3D qmp_marshal_device_del, }, =20 SQMP @@ -338,7 +327,6 @@ EQMP { .name =3D "send-key", .args_type =3D "keys:q,hold-time:i?", - .mhandler.cmd_new =3D qmp_marshal_send_key, }, =20 SQMP @@ -369,7 +357,6 @@ EQMP { .name =3D "cpu", .args_type =3D "index:i", - .mhandler.cmd_new =3D qmp_marshal_cpu, }, =20 SQMP @@ -394,7 +381,6 @@ EQMP { .name =3D "cpu-add", .args_type =3D "id:i", - .mhandler.cmd_new =3D qmp_marshal_cpu_add, }, =20 SQMP @@ -417,7 +403,6 @@ EQMP { .name =3D "memsave", .args_type =3D "val:l,size:i,filename:s,cpu:i?", - .mhandler.cmd_new =3D qmp_marshal_memsave, }, =20 SQMP @@ -446,7 +431,6 @@ EQMP { .name =3D "pmemsave", .args_type =3D "val:l,size:i,filename:s", - .mhandler.cmd_new =3D qmp_marshal_pmemsave, }, =20 SQMP @@ -474,7 +458,6 @@ EQMP { .name =3D "inject-nmi", .args_type =3D "", - .mhandler.cmd_new =3D qmp_marshal_inject_nmi, }, =20 SQMP @@ -497,7 +480,6 @@ EQMP { .name =3D "ringbuf-write", .args_type =3D "device:s,data:s,format:s?", - .mhandler.cmd_new =3D qmp_marshal_ringbuf_write, }, =20 SQMP @@ -526,7 +508,6 @@ EQMP { .name =3D "ringbuf-read", .args_type =3D "device:s,size:i,format:s?", - .mhandler.cmd_new =3D qmp_marshal_ringbuf_read, }, =20 SQMP @@ -562,7 +543,6 @@ EQMP { .name =3D "xen-save-devices-state", .args_type =3D "filename:F", - .mhandler.cmd_new =3D qmp_marshal_xen_save_devices_state, }, =20 SQMP @@ -589,7 +569,6 @@ EQMP { .name =3D "xen-load-devices-state", .args_type =3D "filename:F", - .mhandler.cmd_new =3D qmp_marshal_xen_load_devices_state, }, =20 SQMP @@ -616,7 +595,6 @@ EQMP { .name =3D "xen-set-global-dirty-log", .args_type =3D "enable:b", - .mhandler.cmd_new =3D qmp_marshal_xen_set_global_dirty_log, }, =20 SQMP @@ -640,7 +618,6 @@ EQMP { .name =3D "migrate", .args_type =3D "detach:-d,blk:-b,inc:-i,uri:s", - .mhandler.cmd_new =3D qmp_marshal_migrate, }, =20 SQMP @@ -673,7 +650,6 @@ EQMP { .name =3D "migrate_cancel", .args_type =3D "", - .mhandler.cmd_new =3D qmp_marshal_migrate_cancel, }, =20 SQMP @@ -694,7 +670,6 @@ EQMP { .name =3D "migrate-incoming", .args_type =3D "uri:s", - .mhandler.cmd_new =3D qmp_marshal_migrate_incoming, }, =20 SQMP @@ -722,7 +697,6 @@ EQMP { .name =3D "migrate-set-cache-size", .args_type =3D "value:o", - .mhandler.cmd_new =3D qmp_marshal_migrate_set_cache_size, }, =20 SQMP @@ -745,7 +719,6 @@ EQMP { .name =3D "migrate-start-postcopy", .args_type =3D "", - .mhandler.cmd_new =3D qmp_marshal_migrate_start_postcopy, }, =20 SQMP @@ -764,7 +737,6 @@ EQMP { .name =3D "query-migrate-cache-size", .args_type =3D "", - .mhandler.cmd_new =3D qmp_marshal_query_migrate_cache_size, }, =20 SQMP @@ -786,7 +758,6 @@ EQMP { .name =3D "migrate_set_speed", .args_type =3D "value:o", - .mhandler.cmd_new =3D qmp_marshal_migrate_set_speed, }, =20 SQMP @@ -809,7 +780,6 @@ EQMP { .name =3D "migrate_set_downtime", .args_type =3D "value:T", - .mhandler.cmd_new =3D qmp_marshal_migrate_set_downtime, }, =20 SQMP @@ -834,7 +804,6 @@ EQMP .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", - .mhandler.cmd_new =3D qmp_marshal_client_migrate_info, }, =20 SQMP @@ -868,7 +837,6 @@ EQMP .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", - .mhandler.cmd_new =3D qmp_marshal_dump_guest_memory, }, =20 SQMP @@ -907,7 +875,6 @@ EQMP { .name =3D "query-dump-guest-memory-capability", .args_type =3D "", - .mhandler.cmd_new =3D qmp_marshal_query_dump_guest_memory_capability= , }, =20 SQMP @@ -929,7 +896,6 @@ EQMP .args_type =3D "", .params =3D "", .help =3D "query background dump status", - .mhandler.cmd_new =3D qmp_marshal_query_dump, }, =20 SQMP @@ -952,7 +918,6 @@ EQMP { .name =3D "dump-skeys", .args_type =3D "filename:F", - .mhandler.cmd_new =3D qmp_marshal_dump_skeys, }, #endif =20 @@ -976,7 +941,6 @@ EQMP { .name =3D "netdev_add", .args_type =3D "netdev:O", - .mhandler.cmd_new =3D qmp_netdev_add, }, =20 SQMP @@ -1007,7 +971,6 @@ EQMP { .name =3D "netdev_del", .args_type =3D "id:s", - .mhandler.cmd_new =3D qmp_marshal_netdev_del, }, =20 SQMP @@ -1031,7 +994,6 @@ EQMP { .name =3D "object-add", .args_type =3D "qom-type:s,id:s,props:q?", - .mhandler.cmd_new =3D qmp_marshal_object_add, }, =20 SQMP @@ -1057,7 +1019,6 @@ EQMP { .name =3D "object-del", .args_type =3D "id:s", - .mhandler.cmd_new =3D qmp_marshal_object_del, }, =20 SQMP @@ -1082,7 +1043,6 @@ EQMP { .name =3D "block_resize", .args_type =3D "device:s?,node-name:s?,size:o", - .mhandler.cmd_new =3D qmp_marshal_block_resize, }, =20 SQMP @@ -1107,7 +1067,6 @@ EQMP { .name =3D "block-stream", .args_type =3D "job-id:s?,device:B,base:s?,speed:o?,backing-fil= e:s?,on-error:s?", - .mhandler.cmd_new =3D qmp_marshal_block_stream, }, =20 SQMP @@ -1152,7 +1111,6 @@ EQMP { .name =3D "block-commit", .args_type =3D "job-id:s?,device:B,base:s?,top:s?,backing-file:= s?,speed:o?", - .mhandler.cmd_new =3D qmp_marshal_block_commit, }, =20 SQMP @@ -1218,7 +1176,6 @@ 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?,on-source-error:s?,on-target-= error:s?", - .mhandler.cmd_new =3D qmp_marshal_drive_backup, }, =20 SQMP @@ -1274,7 +1231,6 @@ EQMP .name =3D "blockdev-backup", .args_type =3D "job-id:s?,sync:s,device:B,target:B,speed:i?," "on-source-error:s?,on-target-error:s?", - .mhandler.cmd_new =3D qmp_marshal_blockdev_backup, }, =20 SQMP @@ -1316,33 +1272,27 @@ EQMP { .name =3D "block-job-set-speed", .args_type =3D "device:B,speed:o", - .mhandler.cmd_new =3D qmp_marshal_block_job_set_speed, }, =20 { .name =3D "block-job-cancel", .args_type =3D "device:B,force:b?", - .mhandler.cmd_new =3D qmp_marshal_block_job_cancel, }, { .name =3D "block-job-pause", .args_type =3D "device:B", - .mhandler.cmd_new =3D qmp_marshal_block_job_pause, }, { .name =3D "block-job-resume", .args_type =3D "device:B", - .mhandler.cmd_new =3D qmp_marshal_block_job_resume, }, { .name =3D "block-job-complete", .args_type =3D "device:B", - .mhandler.cmd_new =3D qmp_marshal_block_job_complete, }, { .name =3D "transaction", .args_type =3D "actions:q,properties:q?", - .mhandler.cmd_new =3D qmp_marshal_transaction, }, =20 SQMP @@ -1436,7 +1386,6 @@ EQMP { .name =3D "block-dirty-bitmap-add", .args_type =3D "node:B,name:s,granularity:i?", - .mhandler.cmd_new =3D qmp_marshal_block_dirty_bitmap_add, }, =20 SQMP @@ -1464,7 +1413,6 @@ EQMP { .name =3D "block-dirty-bitmap-remove", .args_type =3D "node:B,name:s", - .mhandler.cmd_new =3D qmp_marshal_block_dirty_bitmap_remove, }, =20 SQMP @@ -1492,7 +1440,6 @@ EQMP { .name =3D "block-dirty-bitmap-clear", .args_type =3D "node:B,name:s", - .mhandler.cmd_new =3D qmp_marshal_block_dirty_bitmap_clear, }, =20 SQMP @@ -1521,7 +1468,6 @@ 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?", - .mhandler.cmd_new =3D qmp_marshal_blockdev_snapshot_sync, }, =20 SQMP @@ -1557,7 +1503,6 @@ EQMP { .name =3D "blockdev-snapshot", .args_type =3D "node:s,overlay:s", - .mhandler.cmd_new =3D qmp_marshal_blockdev_snapshot, }, =20 SQMP @@ -1595,7 +1540,6 @@ EQMP { .name =3D "blockdev-snapshot-internal-sync", .args_type =3D "device:B,name:s", - .mhandler.cmd_new =3D qmp_marshal_blockdev_snapshot_internal_syn= c, }, =20 SQMP @@ -1624,8 +1568,6 @@ EQMP { .name =3D "blockdev-snapshot-delete-internal-sync", .args_type =3D "device:B,id:s?,name:s?", - .mhandler.cmd_new =3D - qmp_marshal_blockdev_snapshot_delete_internal_sync= , }, =20 SQMP @@ -1669,7 +1611,6 @@ EQMP "on-source-error:s?,on-target-error:s?," "unmap:b?," "granularity:i?,buf-size:i?", - .mhandler.cmd_new =3D qmp_marshal_drive_mirror, }, =20 SQMP @@ -1733,7 +1674,6 @@ EQMP .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?", - .mhandler.cmd_new =3D qmp_marshal_blockdev_mirror, }, =20 SQMP @@ -1781,7 +1721,6 @@ EQMP { .name =3D "change-backing-file", .args_type =3D "device:s,image-node-name:s,backing-file:s", - .mhandler.cmd_new =3D qmp_marshal_change_backing_file, }, =20 SQMP @@ -1820,7 +1759,6 @@ EQMP { .name =3D "balloon", .args_type =3D "value:M", - .mhandler.cmd_new =3D qmp_marshal_balloon, }, =20 SQMP @@ -1843,7 +1781,6 @@ EQMP { .name =3D "set_link", .args_type =3D "name:s,up:b", - .mhandler.cmd_new =3D qmp_marshal_set_link, }, =20 SQMP @@ -1869,7 +1806,6 @@ EQMP .args_type =3D "fdname:s", .params =3D "getfd name", .help =3D "receive a file descriptor via SCM rights and as= sign it a name", - .mhandler.cmd_new =3D qmp_marshal_getfd, }, =20 SQMP @@ -1902,7 +1838,6 @@ EQMP .args_type =3D "fdname:s", .params =3D "closefd name", .help =3D "close a file descriptor previously passed via S= CM rights", - .mhandler.cmd_new =3D qmp_marshal_closefd, }, =20 SQMP @@ -1927,7 +1862,6 @@ EQMP .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", - .mhandler.cmd_new =3D qmp_marshal_add_fd, }, =20 SQMP @@ -1966,7 +1900,6 @@ EQMP .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", - .mhandler.cmd_new =3D qmp_marshal_remove_fd, }, =20 SQMP @@ -1998,7 +1931,6 @@ EQMP .name =3D "query-fdsets", .args_type =3D "", .help =3D "Return information describing all fd sets", - .mhandler.cmd_new =3D qmp_marshal_query_fdsets, }, =20 SQMP @@ -2047,7 +1979,6 @@ EQMP { .name =3D "block_passwd", .args_type =3D "device:s?,node-name:s?,password:s", - .mhandler.cmd_new =3D qmp_marshal_block_passwd, }, =20 SQMP @@ -2073,7 +2004,6 @@ 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?", - .mhandler.cmd_new =3D qmp_marshal_block_set_io_throttle, }, =20 SQMP @@ -2130,7 +2060,6 @@ EQMP { .name =3D "set_password", .args_type =3D "protocol:s,password:s,connected:s?", - .mhandler.cmd_new =3D qmp_marshal_set_password, }, =20 SQMP @@ -2156,7 +2085,6 @@ EQMP { .name =3D "expire_password", .args_type =3D "protocol:s,time:s", - .mhandler.cmd_new =3D qmp_marshal_expire_password, }, =20 SQMP @@ -2181,7 +2109,6 @@ EQMP { .name =3D "add_client", .args_type =3D "protocol:s,fdname:s,skipauth:b?,tls:b?", - .mhandler.cmd_new =3D qmp_marshal_add_client, }, =20 SQMP @@ -2209,7 +2136,6 @@ EQMP .args_type =3D "", .params =3D "", .help =3D "enable QMP capabilities", - .mhandler.cmd_new =3D qmp_marshal_qmp_capabilities, }, =20 SQMP @@ -2232,7 +2158,6 @@ EQMP { .name =3D "human-monitor-command", .args_type =3D "command-line:s,cpu-index:i?", - .mhandler.cmd_new =3D qmp_marshal_human_monitor_command, }, =20 SQMP @@ -2311,7 +2236,6 @@ EQMP { .name =3D "query-version", .args_type =3D "", - .mhandler.cmd_new =3D qmp_marshal_query_version, }, =20 SQMP @@ -2348,7 +2272,6 @@ EQMP { .name =3D "query-commands", .args_type =3D "", - .mhandler.cmd_new =3D qmp_marshal_query_commands, }, =20 SQMP @@ -2385,7 +2308,6 @@ EQMP { .name =3D "query-events", .args_type =3D "", - .mhandler.cmd_new =3D qmp_marshal_query_events, }, =20 SQMP @@ -2402,7 +2324,6 @@ EQMP { .name =3D "query-qmp-schema", .args_type =3D "", - .mhandler.cmd_new =3D qmp_query_qmp_schema, }, =20 SQMP @@ -2447,7 +2368,6 @@ EQMP { .name =3D "query-chardev", .args_type =3D "", - .mhandler.cmd_new =3D qmp_marshal_query_chardev, }, =20 SQMP @@ -2488,7 +2408,6 @@ EQMP { .name =3D "query-chardev-backends", .args_type =3D "", - .mhandler.cmd_new =3D qmp_marshal_query_chardev_backends, }, =20 SQMP @@ -2672,7 +2591,6 @@ EQMP { .name =3D "query-block", .args_type =3D "", - .mhandler.cmd_new =3D qmp_marshal_query_block, }, =20 SQMP @@ -2869,7 +2787,6 @@ EQMP { .name =3D "query-blockstats", .args_type =3D "query-nodes:b?", - .mhandler.cmd_new =3D qmp_marshal_query_blockstats, }, =20 SQMP @@ -2924,7 +2841,6 @@ EQMP { .name =3D "query-cpus", .args_type =3D "", - .mhandler.cmd_new =3D qmp_marshal_query_cpus, }, =20 SQMP @@ -2963,7 +2879,6 @@ EQMP { .name =3D "query-iothreads", .args_type =3D "", - .mhandler.cmd_new =3D qmp_marshal_query_iothreads, }, =20 SQMP @@ -3180,7 +3095,6 @@ EQMP { .name =3D "query-pci", .args_type =3D "", - .mhandler.cmd_new =3D qmp_marshal_query_pci, }, =20 SQMP @@ -3204,7 +3118,6 @@ EQMP { .name =3D "query-kvm", .args_type =3D "", - .mhandler.cmd_new =3D qmp_marshal_query_kvm, }, =20 SQMP @@ -3244,7 +3157,6 @@ EQMP { .name =3D "query-status", .args_type =3D "", - .mhandler.cmd_new =3D qmp_marshal_query_status, }, =20 SQMP @@ -3288,7 +3200,6 @@ EQMP { .name =3D "query-mice", .args_type =3D "", - .mhandler.cmd_new =3D qmp_marshal_query_mice, }, =20 SQMP @@ -3351,12 +3262,10 @@ EQMP { .name =3D "query-vnc", .args_type =3D "", - .mhandler.cmd_new =3D qmp_marshal_query_vnc, }, { .name =3D "query-vnc-servers", .args_type =3D "", - .mhandler.cmd_new =3D qmp_marshal_query_vnc_servers, }, =20 SQMP @@ -3433,7 +3342,6 @@ EQMP { .name =3D "query-spice", .args_type =3D "", - .mhandler.cmd_new =3D qmp_marshal_query_spice, }, #endif =20 @@ -3457,7 +3365,6 @@ EQMP { .name =3D "query-name", .args_type =3D "", - .mhandler.cmd_new =3D qmp_marshal_query_name, }, =20 SQMP @@ -3480,7 +3387,6 @@ EQMP { .name =3D "query-uuid", .args_type =3D "", - .mhandler.cmd_new =3D qmp_marshal_query_uuid, }, =20 SQMP @@ -3529,7 +3435,6 @@ EQMP { .name =3D "query-command-line-options", .args_type =3D "option:s?", - .mhandler.cmd_new =3D qmp_marshal_query_command_line_options, }, =20 SQMP @@ -3707,7 +3612,6 @@ EQMP { .name =3D "query-migrate", .args_type =3D "", - .mhandler.cmd_new =3D qmp_marshal_query_migrate, }, =20 SQMP @@ -3737,7 +3641,6 @@ EQMP .name =3D "migrate-set-capabilities", .args_type =3D "capabilities:q", .params =3D "capability:s,state:b", - .mhandler.cmd_new =3D qmp_marshal_migrate_set_capabilities, }, SQMP query-migrate-capabilities @@ -3774,7 +3677,6 @@ EQMP { .name =3D "query-migrate-capabilities", .args_type =3D "", - .mhandler.cmd_new =3D qmp_marshal_query_migrate_capabilities, }, =20 SQMP @@ -3804,7 +3706,6 @@ 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?", - .mhandler.cmd_new =3D qmp_marshal_migrate_set_parameters, }, SQMP query-migrate-parameters @@ -3841,7 +3742,6 @@ EQMP { .name =3D "query-migrate-parameters", .args_type =3D "", - .mhandler.cmd_new =3D qmp_marshal_query_migrate_parameters, }, =20 SQMP @@ -3869,88 +3769,73 @@ EQMP { .name =3D "query-balloon", .args_type =3D "", - .mhandler.cmd_new =3D qmp_marshal_query_balloon, }, =20 { .name =3D "query-block-jobs", .args_type =3D "", - .mhandler.cmd_new =3D qmp_marshal_query_block_jobs, }, =20 { .name =3D "qom-list", .args_type =3D "path:s", - .mhandler.cmd_new =3D qmp_marshal_qom_list, }, =20 { .name =3D "qom-set", .args_type =3D "path:s,property:s,value:q", - .mhandler.cmd_new =3D qmp_marshal_qom_set, }, =20 { .name =3D "qom-get", .args_type =3D "path:s,property:s", - .mhandler.cmd_new =3D qmp_marshal_qom_get, }, =20 { .name =3D "nbd-server-start", .args_type =3D "addr:q,tls-creds:s?", - .mhandler.cmd_new =3D qmp_marshal_nbd_server_start, }, { .name =3D "nbd-server-add", .args_type =3D "device:B,writable:b?", - .mhandler.cmd_new =3D qmp_marshal_nbd_server_add, }, { .name =3D "nbd-server-stop", .args_type =3D "", - .mhandler.cmd_new =3D qmp_marshal_nbd_server_stop, }, =20 { .name =3D "change-vnc-password", .args_type =3D "password:s", - .mhandler.cmd_new =3D qmp_marshal_change_vnc_password, }, { .name =3D "qom-list-types", .args_type =3D "implements:s?,abstract:b?", - .mhandler.cmd_new =3D qmp_marshal_qom_list_types, }, =20 { .name =3D "device-list-properties", .args_type =3D "typename:s", - .mhandler.cmd_new =3D qmp_marshal_device_list_properties, }, =20 { .name =3D "query-machines", .args_type =3D "", - .mhandler.cmd_new =3D qmp_marshal_query_machines, }, =20 { .name =3D "query-cpu-definitions", .args_type =3D "", - .mhandler.cmd_new =3D qmp_marshal_query_cpu_definitions, }, =20 { .name =3D "query-target", .args_type =3D "", - .mhandler.cmd_new =3D qmp_marshal_query_target, }, =20 { .name =3D "query-tpm", .args_type =3D "", - .mhandler.cmd_new =3D qmp_marshal_query_tpm, }, =20 SQMP @@ -3984,7 +3869,6 @@ EQMP { .name =3D "query-tpm-models", .args_type =3D "", - .mhandler.cmd_new =3D qmp_marshal_query_tpm_models, }, =20 SQMP @@ -4005,7 +3889,6 @@ EQMP { .name =3D "query-tpm-types", .args_type =3D "", - .mhandler.cmd_new =3D qmp_marshal_query_tpm_types, }, =20 SQMP @@ -4026,7 +3909,6 @@ EQMP { .name =3D "chardev-add", .args_type =3D "id:s,backend:q", - .mhandler.cmd_new =3D qmp_marshal_chardev_add, }, =20 SQMP @@ -4063,7 +3945,6 @@ EQMP { .name =3D "chardev-remove", .args_type =3D "id:s", - .mhandler.cmd_new =3D qmp_marshal_chardev_remove, }, =20 =20 @@ -4086,7 +3967,6 @@ EQMP { .name =3D "query-rx-filter", .args_type =3D "name:s?", - .mhandler.cmd_new =3D qmp_marshal_query_rx_filter, }, =20 SQMP @@ -4152,7 +4032,6 @@ EQMP { .name =3D "blockdev-add", .args_type =3D "options:q", - .mhandler.cmd_new =3D qmp_marshal_blockdev_add, }, =20 SQMP @@ -4211,7 +4090,6 @@ EQMP { .name =3D "x-blockdev-del", .args_type =3D "id:s?,node-name:s?", - .mhandler.cmd_new =3D qmp_marshal_x_blockdev_del, }, =20 SQMP @@ -4268,7 +4146,6 @@ EQMP { .name =3D "blockdev-open-tray", .args_type =3D "device:s,force:b?", - .mhandler.cmd_new =3D qmp_marshal_blockdev_open_tray, }, =20 SQMP @@ -4316,7 +4193,6 @@ EQMP { .name =3D "blockdev-close-tray", .args_type =3D "device:s", - .mhandler.cmd_new =3D qmp_marshal_blockdev_close_tray, }, =20 SQMP @@ -4351,7 +4227,6 @@ EQMP { .name =3D "x-blockdev-remove-medium", .args_type =3D "device:s", - .mhandler.cmd_new =3D qmp_marshal_x_blockdev_remove_medium, }, =20 SQMP @@ -4399,7 +4274,6 @@ EQMP { .name =3D "x-blockdev-insert-medium", .args_type =3D "device:s,node-name:s", - .mhandler.cmd_new =3D qmp_marshal_x_blockdev_insert_medium, }, =20 SQMP @@ -4439,7 +4313,6 @@ EQMP { .name =3D "x-blockdev-change", .args_type =3D "parent:B,child:B?,node:B?", - .mhandler.cmd_new =3D qmp_marshal_x_blockdev_change, }, =20 SQMP @@ -4492,7 +4365,6 @@ EQMP { .name =3D "query-named-block-nodes", .args_type =3D "", - .mhandler.cmd_new =3D qmp_marshal_query_named_block_nodes, }, =20 SQMP @@ -4554,7 +4426,6 @@ EQMP { .name =3D "blockdev-change-medium", .args_type =3D "device:B,filename:F,format:s?,read-only-mode:s?= ", - .mhandler.cmd_new =3D qmp_marshal_blockdev_change_medium, }, =20 SQMP @@ -4607,7 +4478,6 @@ EQMP { .name =3D "query-memdev", .args_type =3D "", - .mhandler.cmd_new =3D qmp_marshal_query_memdev, }, =20 SQMP @@ -4645,7 +4515,6 @@ EQMP { .name =3D "query-memory-devices", .args_type =3D "", - .mhandler.cmd_new =3D qmp_marshal_query_memory_devices, }, =20 SQMP @@ -4672,7 +4541,6 @@ EQMP { .name =3D "query-acpi-ospm-status", .args_type =3D "", - .mhandler.cmd_new =3D qmp_marshal_query_acpi_ospm_status, }, =20 SQMP @@ -4695,7 +4563,6 @@ EQMP { .name =3D "rtc-reset-reinjection", .args_type =3D "", - .mhandler.cmd_new =3D qmp_marshal_rtc_reset_reinjection, }, #endif =20 @@ -4716,7 +4583,6 @@ EQMP { .name =3D "trace-event-get-state", .args_type =3D "name:s,vcpu:i?", - .mhandler.cmd_new =3D qmp_marshal_trace_event_get_state, }, =20 SQMP @@ -4748,7 +4614,6 @@ EQMP { .name =3D "trace-event-set-state", .args_type =3D "name:s,enable:b,ignore-unavailable:b?,vcpu:i?", - .mhandler.cmd_new =3D qmp_marshal_trace_event_set_state, }, =20 SQMP @@ -4783,7 +4648,6 @@ EQMP { .name =3D "input-send-event", .args_type =3D "console:i?,events:q", - .mhandler.cmd_new =3D qmp_marshal_input_send_event, }, =20 SQMP @@ -4849,7 +4713,6 @@ EQMP { .name =3D "block-set-write-threshold", .args_type =3D "node-name:s,write-threshold:l", - .mhandler.cmd_new =3D qmp_marshal_block_set_write_threshold, }, =20 SQMP @@ -4877,7 +4740,6 @@ EQMP { .name =3D "query-rocker", .args_type =3D "name:s", - .mhandler.cmd_new =3D qmp_marshal_query_rocker, }, =20 SQMP @@ -4898,7 +4760,6 @@ EQMP { .name =3D "query-rocker-ports", .args_type =3D "name:s", - .mhandler.cmd_new =3D qmp_marshal_query_rocker_ports, }, =20 SQMP @@ -4923,7 +4784,6 @@ EQMP { .name =3D "query-rocker-of-dpa-flows", .args_type =3D "name:s,tbl-id:i?", - .mhandler.cmd_new =3D qmp_marshal_query_rocker_of_dpa_flows, }, =20 SQMP @@ -4952,7 +4812,6 @@ EQMP { .name =3D "query-rocker-of-dpa-groups", .args_type =3D "name:s,type:i?", - .mhandler.cmd_new =3D qmp_marshal_query_rocker_of_dpa_groups, }, =20 SQMP @@ -4983,7 +4842,6 @@ EQMP { .name =3D "query-gic-capabilities", .args_type =3D "", - .mhandler.cmd_new =3D qmp_marshal_query_gic_capabilities, }, #endif =20 @@ -5007,7 +4865,6 @@ EQMP { .name =3D "query-hotpluggable-cpus", .args_type =3D "", - .mhandler.cmd_new =3D qmp_marshal_query_hotpluggable_cpus, }, =20 SQMP --=20 2.9.0