Received: from eggs.gnu.org ([2001:4830:134:3::10]:53151) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bFsC0-0003Wk-T8 for qemu-devel@nongnu.org; Wed, 22 Jun 2016 20:08:29 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bFsBw-0004Nq-A9 for qemu-devel@nongnu.org; Wed, 22 Jun 2016 20:08:23 -0400 Received: from mx1.redhat.com ([209.132.183.28]:57929) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bFsBv-0004NR-V0 for qemu-devel@nongnu.org; Wed, 22 Jun 2016 20:08:20 -0400 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (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 A409F3F725 for ; Thu, 23 Jun 2016 00:08:19 +0000 (UTC) From: marcandre.lureau@redhat.com Date: Thu, 23 Jun 2016 02:08:02 +0200 Message-Id: <20160623000809.4522-6-marcandre.lureau@redhat.com> In-Reply-To: <20160623000809.4522-1-marcandre.lureau@redhat.com> References: <20160623000809.4522-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 05/12] 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. Note: this commit requires a 'make clean' prior to make, since the generated files do not depend on Makefile (due to a cyclic rule introduced in 4115852bb0). Signed-off-by: Marc-Andr=C3=A9 Lureau --- Makefile | 2 +- monitor.c | 12 +++-- qmp-commands.hx | 143 --------------------------------------------------= ------ vl.c | 1 + 4 files changed, 11 insertions(+), 147 deletions(-) diff --git a/Makefile b/Makefile index 7087fc2..81faf4b 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/monitor.c b/monitor.c index 585bc1f..1dadc2a 100644 --- a/monitor.c +++ b/monitor.c @@ -3884,6 +3884,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 @@ -3909,7 +3910,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; @@ -3931,7 +3933,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); @@ -4000,9 +4002,13 @@ void monitor_resume(Monitor *mon) =20 static QObject *get_qmp_greeting(void) { + QmpCommand *cmd; QObject *ver =3D NULL; =20 - qmp_marshal_query_version(NULL, &ver, NULL); + cmd =3D qmp_find_command("query-version"); + assert(cmd && cmd->fn); + cmd->fn(NULL, &ver, NULL); + return qobject_from_jsonf("{'QMP':{'version': %p,'capabilities': []}= }",ver); } =20 diff --git a/qmp-commands.hx b/qmp-commands.hx index ee88e48..95c1e7d 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_marshal_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 "device:B,base:s?,speed:o?,backing-file:s?,on-er= ror:s?", - .mhandler.cmd_new =3D qmp_marshal_block_stream, }, =20 SQMP @@ -1150,7 +1109,6 @@ EQMP { .name =3D "block-commit", .args_type =3D "device:B,base:s?,top:s?,backing-file:s?,speed:o= ?", - .mhandler.cmd_new =3D qmp_marshal_block_commit, }, =20 SQMP @@ -1214,7 +1172,6 @@ EQMP .name =3D "drive-backup", .args_type =3D "sync:s,device:B,target:s,speed:i?,mode:s?,forma= t:s?," "bitmap:s?,on-source-error:s?,on-target-error:s?", - .mhandler.cmd_new =3D qmp_marshal_drive_backup, }, =20 SQMP @@ -1268,7 +1225,6 @@ EQMP .name =3D "blockdev-backup", .args_type =3D "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 @@ -1308,33 +1264,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 @@ -1428,7 +1378,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 @@ -1456,7 +1405,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 @@ -1484,7 +1432,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 @@ -1513,7 +1460,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 @@ -1549,7 +1495,6 @@ EQMP { .name =3D "blockdev-snapshot", .args_type =3D "node:s,overlay:s", - .mhandler.cmd_new =3D qmp_marshal_blockdev_snapshot, }, =20 SQMP @@ -1587,7 +1532,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 @@ -1616,8 +1560,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 @@ -1661,7 +1603,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 @@ -1723,7 +1664,6 @@ EQMP .args_type =3D "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 @@ -1769,7 +1709,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 @@ -1808,7 +1747,6 @@ EQMP { .name =3D "balloon", .args_type =3D "value:M", - .mhandler.cmd_new =3D qmp_marshal_balloon, }, =20 SQMP @@ -1831,7 +1769,6 @@ EQMP { .name =3D "set_link", .args_type =3D "name:s,up:b", - .mhandler.cmd_new =3D qmp_marshal_set_link, }, =20 SQMP @@ -1857,7 +1794,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 @@ -1890,7 +1826,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 @@ -1915,7 +1850,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 @@ -1954,7 +1888,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 @@ -1986,7 +1919,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 @@ -2035,7 +1967,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 @@ -2061,7 +1992,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 @@ -2118,7 +2048,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 @@ -2144,7 +2073,6 @@ EQMP { .name =3D "expire_password", .args_type =3D "protocol:s,time:s", - .mhandler.cmd_new =3D qmp_marshal_expire_password, }, =20 SQMP @@ -2169,7 +2097,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 @@ -2197,7 +2124,6 @@ EQMP .args_type =3D "", .params =3D "", .help =3D "enable QMP capabilities", - .mhandler.cmd_new =3D qmp_marshal_qmp_capabilities, }, =20 SQMP @@ -2220,7 +2146,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 @@ -2299,7 +2224,6 @@ EQMP { .name =3D "query-version", .args_type =3D "", - .mhandler.cmd_new =3D qmp_marshal_query_version, }, =20 SQMP @@ -2336,7 +2260,6 @@ EQMP { .name =3D "query-commands", .args_type =3D "", - .mhandler.cmd_new =3D qmp_marshal_query_commands, }, =20 SQMP @@ -2373,7 +2296,6 @@ EQMP { .name =3D "query-events", .args_type =3D "", - .mhandler.cmd_new =3D qmp_marshal_query_events, }, =20 SQMP @@ -2390,7 +2312,6 @@ EQMP { .name =3D "query-qmp-schema", .args_type =3D "", - .mhandler.cmd_new =3D qmp_query_qmp_schema, }, =20 SQMP @@ -2435,7 +2356,6 @@ EQMP { .name =3D "query-chardev", .args_type =3D "", - .mhandler.cmd_new =3D qmp_marshal_query_chardev, }, =20 SQMP @@ -2476,7 +2396,6 @@ EQMP { .name =3D "query-chardev-backends", .args_type =3D "", - .mhandler.cmd_new =3D qmp_marshal_query_chardev_backends, }, =20 SQMP @@ -2660,7 +2579,6 @@ EQMP { .name =3D "query-block", .args_type =3D "", - .mhandler.cmd_new =3D qmp_marshal_query_block, }, =20 SQMP @@ -2857,7 +2775,6 @@ EQMP { .name =3D "query-blockstats", .args_type =3D "query-nodes:b?", - .mhandler.cmd_new =3D qmp_marshal_query_blockstats, }, =20 SQMP @@ -2912,7 +2829,6 @@ EQMP { .name =3D "query-cpus", .args_type =3D "", - .mhandler.cmd_new =3D qmp_marshal_query_cpus, }, =20 SQMP @@ -2951,7 +2867,6 @@ EQMP { .name =3D "query-iothreads", .args_type =3D "", - .mhandler.cmd_new =3D qmp_marshal_query_iothreads, }, =20 SQMP @@ -3168,7 +3083,6 @@ EQMP { .name =3D "query-pci", .args_type =3D "", - .mhandler.cmd_new =3D qmp_marshal_query_pci, }, =20 SQMP @@ -3192,7 +3106,6 @@ EQMP { .name =3D "query-kvm", .args_type =3D "", - .mhandler.cmd_new =3D qmp_marshal_query_kvm, }, =20 SQMP @@ -3232,7 +3145,6 @@ EQMP { .name =3D "query-status", .args_type =3D "", - .mhandler.cmd_new =3D qmp_marshal_query_status, }, =20 SQMP @@ -3276,7 +3188,6 @@ EQMP { .name =3D "query-mice", .args_type =3D "", - .mhandler.cmd_new =3D qmp_marshal_query_mice, }, =20 SQMP @@ -3339,12 +3250,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 @@ -3421,7 +3330,6 @@ EQMP { .name =3D "query-spice", .args_type =3D "", - .mhandler.cmd_new =3D qmp_marshal_query_spice, }, #endif =20 @@ -3445,7 +3353,6 @@ EQMP { .name =3D "query-name", .args_type =3D "", - .mhandler.cmd_new =3D qmp_marshal_query_name, }, =20 SQMP @@ -3468,7 +3375,6 @@ EQMP { .name =3D "query-uuid", .args_type =3D "", - .mhandler.cmd_new =3D qmp_marshal_query_uuid, }, =20 SQMP @@ -3517,7 +3423,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 @@ -3695,7 +3600,6 @@ EQMP { .name =3D "query-migrate", .args_type =3D "", - .mhandler.cmd_new =3D qmp_marshal_query_migrate, }, =20 SQMP @@ -3725,7 +3629,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 @@ -3762,7 +3665,6 @@ EQMP { .name =3D "query-migrate-capabilities", .args_type =3D "", - .mhandler.cmd_new =3D qmp_marshal_query_migrate_capabilities, }, =20 SQMP @@ -3792,7 +3694,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 @@ -3829,7 +3730,6 @@ EQMP { .name =3D "query-migrate-parameters", .args_type =3D "", - .mhandler.cmd_new =3D qmp_marshal_query_migrate_parameters, }, =20 SQMP @@ -3857,88 +3757,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 @@ -3972,7 +3857,6 @@ EQMP { .name =3D "query-tpm-models", .args_type =3D "", - .mhandler.cmd_new =3D qmp_marshal_query_tpm_models, }, =20 SQMP @@ -3993,7 +3877,6 @@ EQMP { .name =3D "query-tpm-types", .args_type =3D "", - .mhandler.cmd_new =3D qmp_marshal_query_tpm_types, }, =20 SQMP @@ -4014,7 +3897,6 @@ EQMP { .name =3D "chardev-add", .args_type =3D "id:s,backend:q", - .mhandler.cmd_new =3D qmp_marshal_chardev_add, }, =20 SQMP @@ -4051,7 +3933,6 @@ EQMP { .name =3D "chardev-remove", .args_type =3D "id:s", - .mhandler.cmd_new =3D qmp_marshal_chardev_remove, }, =20 =20 @@ -4074,7 +3955,6 @@ EQMP { .name =3D "query-rx-filter", .args_type =3D "name:s?", - .mhandler.cmd_new =3D qmp_marshal_query_rx_filter, }, =20 SQMP @@ -4140,7 +4020,6 @@ EQMP { .name =3D "blockdev-add", .args_type =3D "options:q", - .mhandler.cmd_new =3D qmp_marshal_blockdev_add, }, =20 SQMP @@ -4199,7 +4078,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 @@ -4256,7 +4134,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 @@ -4304,7 +4181,6 @@ EQMP { .name =3D "blockdev-close-tray", .args_type =3D "device:s", - .mhandler.cmd_new =3D qmp_marshal_blockdev_close_tray, }, =20 SQMP @@ -4339,7 +4215,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 @@ -4387,7 +4262,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 @@ -4427,7 +4301,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 @@ -4480,7 +4353,6 @@ EQMP { .name =3D "query-named-block-nodes", .args_type =3D "", - .mhandler.cmd_new =3D qmp_marshal_query_named_block_nodes, }, =20 SQMP @@ -4542,7 +4414,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 @@ -4595,7 +4466,6 @@ EQMP { .name =3D "query-memdev", .args_type =3D "", - .mhandler.cmd_new =3D qmp_marshal_query_memdev, }, =20 SQMP @@ -4633,7 +4503,6 @@ EQMP { .name =3D "query-memory-devices", .args_type =3D "", - .mhandler.cmd_new =3D qmp_marshal_query_memory_devices, }, =20 SQMP @@ -4660,7 +4529,6 @@ EQMP { .name =3D "query-acpi-ospm-status", .args_type =3D "", - .mhandler.cmd_new =3D qmp_marshal_query_acpi_ospm_status, }, =20 SQMP @@ -4683,7 +4551,6 @@ EQMP { .name =3D "rtc-reset-reinjection", .args_type =3D "", - .mhandler.cmd_new =3D qmp_marshal_rtc_reset_reinjection, }, #endif =20 @@ -4704,7 +4571,6 @@ EQMP { .name =3D "trace-event-get-state", .args_type =3D "name:s", - .mhandler.cmd_new =3D qmp_marshal_trace_event_get_state, }, =20 SQMP @@ -4722,7 +4588,6 @@ EQMP { .name =3D "trace-event-set-state", .args_type =3D "name:s,enable:b,ignore-unavailable:b?", - .mhandler.cmd_new =3D qmp_marshal_trace_event_set_state, }, =20 SQMP @@ -4740,7 +4605,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 @@ -4806,7 +4670,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 @@ -4834,7 +4697,6 @@ EQMP { .name =3D "query-rocker", .args_type =3D "name:s", - .mhandler.cmd_new =3D qmp_marshal_query_rocker, }, =20 SQMP @@ -4855,7 +4717,6 @@ EQMP { .name =3D "query-rocker-ports", .args_type =3D "name:s", - .mhandler.cmd_new =3D qmp_marshal_query_rocker_ports, }, =20 SQMP @@ -4880,7 +4741,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 @@ -4909,7 +4769,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 @@ -4940,7 +4799,6 @@ EQMP { .name =3D "query-gic-capabilities", .args_type =3D "", - .mhandler.cmd_new =3D qmp_marshal_query_gic_capabilities, }, #endif =20 @@ -4964,7 +4822,6 @@ EQMP { .name =3D "query-hotpluggable-cpus", .args_type =3D "", - .mhandler.cmd_new =3D qmp_marshal_query_hotpluggable_cpus, }, =20 SQMP diff --git a/vl.c b/vl.c index 74bbd30..c6f0544 100644 --- a/vl.c +++ b/vl.c @@ -2971,6 +2971,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); --=20 2.9.0