From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:41077) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bjNOb-0001eO-UO for qemu-devel@nongnu.org; Mon, 12 Sep 2016 05:19:23 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bjNOX-0002hq-Um for qemu-devel@nongnu.org; Mon, 12 Sep 2016 05:19:20 -0400 Received: from mx1.redhat.com ([209.132.183.28]:53306) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bjNOX-0002hQ-N7 for qemu-devel@nongnu.org; Mon, 12 Sep 2016 05:19:17 -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 DE73DC008366 for ; Mon, 12 Sep 2016 09:19:16 +0000 (UTC) From: =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= Date: Mon, 12 Sep 2016 13:18:55 +0400 Message-Id: <20160912091913.15831-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 v6 00/18] qapi: remove the 'middle' mode 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?= Hi, Although some QMP commands are still not fully qapi'fied, it is possible to use more qapi common and generated code by dropping the 'middle' mode and use qmp_dispatch(). v6: - get back to v4 approach, and unregister commands at run-time. (Markus A= rmbruster) - comments and commit messages improvements. (Markus Armbruster) - remove #ifdef/per-target qapi build. (Markus Armbruster) v5: - replace the dynamic unregister commands approach by a few preliminary patches to make the json schema #ifdef conditional and per-target - fix "check invalid arguments" patch based on Markus version - patch reordering v4: - export all marshaller functions (so we can keep calling them after middle mode is removed), remove 'export-marshal' patch - get rid of unnecessary lambda in python code (leftover), remove second mcgen(), and outdated comment - remove disabled commands at run-time to avoid any regression. It's now on my TODO list to fix qapi generator in 2.8 to have conditionals - move qmp-commands.txt to doc/ - split the last patch, remove trailing ws - add QEMU_VERSION_{MAJOR,MINOR,MICRO} patch, simplifying qmp_query_version() (could be applied outside this series) - update commit title/messages/order v3: - add a reference to docs/qmp-spec.txt in qmp_capabilities doc - remove 'props' from device_add doc, improve example - replace a g_strcmp0 with more appropriate g_str_equal - add 'export-marshal' command generator key patch - call qmp_marshal_query_version() directly (also get rid of the need to do a make clean, since the qapi json is modified) - add patch to check invalid arguments on no-args (the old dispatch code checks that), and a test - patch reordering to fix intermediate builds - commit messages improvements - split some misc doc fixes in last patch - add some r-b and rebase v2: - rebased on master - add Since: 0.13 to qmp_capabilities and device_add documentation - fix device_add doc - add missing spaces after ',' in get_qmp_greeting() - fix some grammar in monitor.c while touching it Marc-Andr=C3=A9 Lureau (17): build-sys: define QEMU_VERSION_{MAJOR, MINOR, MICRO} qapi-schema: use generated marshaller for 'qmp_capabilities' qapi-schema: add 'device_add' monitor: simplify invalid_qmp_mode() monitor: register gen:false commands manually qmp: Hack to keep commands configuration-specific qapi: export the marshallers monitor: use qmp_find_command() (using generated qapi code) monitor: implement 'qmp_query_commands' without qmp_cmds monitor: remove mhandler.cmd_new qapi: remove the "middle" mode qapi: check invalid arguments on no-args commands tests: add a test to check invalid args monitor: use qmp_dispatch() build-sys: remove qmp-commands-old.h qmp-commands.hx: fix some styling Replace qmp-commands.hx by docs/qmp-commands.txt Markus Armbruster (1): qapi: Support unregistering QMP commands monitor.c | 424 +++------- qapi/qmp-registry.c | 8 + qmp.c | 16 +- tests/test-qga.c | 21 + tests/test-qmp-commands.c | 15 + vl.c | 1 + Makefile | 8 +- Makefile.target | 7 +- scripts/create_config | 6 + scripts/qapi-commands.py | 81 +- .gitignore | 1 - MAINTAINERS | 1 - docs/qapi-code-gen.txt | 6 +- qmp-commands.hx =3D> docs/qmp-commands.txt | 1297 +---------------------= -------- docs/writing-qmp-commands.txt | 46 +- hmp-commands-info.hx | 118 +-- hmp-commands.hx | 208 ++--- include/qapi/qmp/dispatch.h | 1 + qapi-schema.json | 61 ++ trace-events | 1 - 20 files changed, 458 insertions(+), 1869 deletions(-) rename qmp-commands.hx =3D> docs/qmp-commands.txt (81%) --=20 2.10.0