#
d626b6c1 |
| 03-Jul-2018 |
Marc-André Lureau <marcandre.lureau@redhat.com> |
qapi-introspect: add preprocessor conditions to generated QLit
This commit adds 'ifcond' conditions to top-level QLit objects. Future work will add them to object and enum type members, i.e. within
qapi-introspect: add preprocessor conditions to generated QLit
This commit adds 'ifcond' conditions to top-level QLit objects. Future work will add them to object and enum type members, i.e. within QLit objects.
Extend the QLit generator to_qlit() to accept (@obj, @cond) tuples in addition to just @obj. The tuple causes the QLit generated for objects for @obj with #if/#endif conditions for @cond.
See generated tests/test-qmp-introspect.c. Example diff after this patch:
--- before 2018-01-08 11:55:24.757083654 +0100 +++ tests/test-qmp-introspect.c 2018-01-08 13:08:44.477641629 +0100 @@ -51,6 +51,8 @@ { "name", QLIT_QSTR("EVENT_F"), }, {} })), +#if defined(TEST_IF_CMD) +#if defined(TEST_IF_STRUCT) QLIT_QDICT(((QLitDictEntry[]) { { "arg-type", QLIT_QSTR("5"), }, { "meta-type", QLIT_QSTR("command"), }, @@ -58,12 +60,16 @@ { "ret-type", QLIT_QSTR("0"), }, {} })), +#endif /* defined(TEST_IF_STRUCT) */ +#endif /* defined(TEST_IF_CMD) */
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by: Markus Armbruster <armbru@redhat.com> Message-Id: <20180703155648.11933-9-marcandre.lureau@redhat.com> Signed-off-by: Markus Armbruster <armbru@redhat.com>
show more ...
|
#
40bb1376 |
| 03-Jul-2018 |
Marc-André Lureau <marcandre.lureau@redhat.com> |
qapi-introspect: modify to_qlit() to append ',' on level > 0
The following patch is going to break list entries with #if/#endif, so they should have the trailing ',' as suffix.
Signed-off-by: Marc-
qapi-introspect: modify to_qlit() to append ',' on level > 0
The following patch is going to break list entries with #if/#endif, so they should have the trailing ',' as suffix.
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by: Markus Armbruster <armbru@redhat.com> Message-Id: <20180703155648.11933-8-marcandre.lureau@redhat.com> Signed-off-by: Markus Armbruster <armbru@redhat.com>
show more ...
|
#
fbf09a2f |
| 03-Jul-2018 |
Marc-André Lureau <marcandre.lureau@redhat.com> |
qapi: add 'ifcond' to visitor methods
Modify the test visitor to check correct passing of values.
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by: Markus Armbruster <armb
qapi: add 'ifcond' to visitor methods
Modify the test visitor to check correct passing of values.
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by: Markus Armbruster <armbru@redhat.com> Message-Id: <20180703155648.11933-5-marcandre.lureau@redhat.com> [Accidental change to roms/seabios dropped] Signed-off-by: Markus Armbruster <armbru@redhat.com>
show more ...
|
Revision tags: v2.11.2 |
|
#
da112e83 |
| 20-Jun-2018 |
Markus Armbruster <armbru@redhat.com> |
qapi/introspect: Eliminate pointless variable in .visit_end()
Commit 1a9a507b2e3 "qapi-introspect: Hide type names" added local variable @jsons to improve sorting, but also removed the sorting. It
qapi/introspect: Eliminate pointless variable in .visit_end()
Commit 1a9a507b2e3 "qapi-introspect: Hide type names" added local variable @jsons to improve sorting, but also removed the sorting. It was part of a big series that went to v8, and it made sense until v2 or so...
Commit 7d0f982bfbb replaced @jsons by @qlits, preserving the uselessness.
Get rid of it.
Signed-off-by: Markus Armbruster <armbru@redhat.com> Message-Id: <20180620124742.16979-1-armbru@redhat.com> Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
show more ...
|
#
d6fe3d02 |
| 11-May-2018 |
Igor Mammedov <imammedo@redhat.com> |
qapi: introduce new cmd option "allow-preconfig"
New option will be used to allow commands, which are prepared/need to run, during preconfig state. Other commands that should be able to run in preco
qapi: introduce new cmd option "allow-preconfig"
New option will be used to allow commands, which are prepared/need to run, during preconfig state. Other commands that should be able to run in preconfig state, should be amended to not expect machine in initialized state or deal with it.
For compatibility reasons, commands that don't use new flag 'allow-preconfig' explicitly are not permitted to run in preconfig state but allowed in all other states like they used to be.
Within this patch allow following commands in preconfig state: qmp_capabilities query-qmp-schema query-commands query-command-line-options query-status exit-preconfig to allow qmp connection, basic introspection and moving to the next state.
PS: set-numa-node and query-hotpluggable-cpus will be enabled later in a separate patches.
Signed-off-by: Igor Mammedov <imammedo@redhat.com> Message-Id: <1526057503-39287-1-git-send-email-imammedo@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> [ehabkost: Changed "since 2.13" to "since 3.0"] Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
show more ...
|
Revision tags: v2.12.0, v2.12.0-rc4, v2.12.0-rc3, v2.12.0-rc2, v2.12.0-rc1, v2.12.0-rc0 |
|
#
876c6751 |
| 09-Mar-2018 |
Peter Xu <peterx@redhat.com> |
qapi: introduce new cmd option "allow-oob"
Here "oob" stands for "Out-Of-Band". When "allow-oob" is set, it means the command allows out-of-band execution.
The "oob" idea is proposed by Markus Arm
qapi: introduce new cmd option "allow-oob"
Here "oob" stands for "Out-Of-Band". When "allow-oob" is set, it means the command allows out-of-band execution.
The "oob" idea is proposed by Markus Armbruster in following thread:
https://lists.gnu.org/archive/html/qemu-devel/2017-09/msg02057.html
This new "allow-oob" boolean will be exposed by "query-qmp-schema" as well for command entries, so that QMP clients can know which commands can be used in out-of-band calls. For example the command "migrate" originally looks like:
{"name": "migrate", "ret-type": "17", "meta-type": "command", "arg-type": "86"}
And it'll be changed into:
{"name": "migrate", "ret-type": "17", "allow-oob": false, "meta-type": "command", "arg-type": "86"}
This patch only provides the QMP interface level changes. It does not contain the real out-of-band execution implementation yet.
Suggested-by: Markus Armbruster <armbru@redhat.com> Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com> Reviewed-by: Fam Zheng <famz@redhat.com> Signed-off-by: Peter Xu <peterx@redhat.com> Message-Id: <20180309090006.10018-18-peterx@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> [eblake: rebase on introspection done by qlit] Signed-off-by: Eric Blake <eblake@redhat.com>
show more ...
|
#
7d0f982b |
| 05-Mar-2018 |
Marc-André Lureau <marcandre.lureau@redhat.com> |
qapi: generate a literal qobject for introspection
Replace the generated json string with a literal qobject. The later is easier to deal with, at run time as well as compile time: adding #if conditi
qapi: generate a literal qobject for introspection
Replace the generated json string with a literal qobject. The later is easier to deal with, at run time as well as compile time: adding #if conditionals will be easier than in a json string.
The output of query-qmp-schema is not changed.
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by: Markus Armbruster <armbru@redhat.com> Message-Id: <20180305172951.2150-5-marcandre.lureau@redhat.com> [eblake: fix python 3 failure] Signed-off-by: Eric Blake <eblake@redhat.com>
show more ...
|
Revision tags: v2.11.1 |
|
#
eb815e24 |
| 11-Feb-2018 |
Markus Armbruster <armbru@redhat.com> |
qapi: Move qapi-schema.json to qapi/, rename generated files
Move qapi-schema.json to qapi/, so it's next to its modules, and all files get generated to qapi/, not just the ones generated for module
qapi: Move qapi-schema.json to qapi/, rename generated files
Move qapi-schema.json to qapi/, so it's next to its modules, and all files get generated to qapi/, not just the ones generated for modules.
Consistently name the generated files qapi-MODULE.EXT: qmp-commands.[ch] become qapi-commands.[ch], qapi-event.[ch] become qapi-events.[ch], and qmp-introspect.[ch] become qapi-introspect.[ch]. This gets rid of the temporary hacks in scripts/qapi/commands.py, scripts/qapi/events.py, and scripts/qapi/common.py.
Signed-off-by: Markus Armbruster <armbru@redhat.com> Message-Id: <20180211093607.27351-28-armbru@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by: Michael Roth <mdroth@linux.vnet.ibm.com> [eblake: Fix trailing dot in tpm.c, undo temporary hack for OSX toolchain] Signed-off-by: Eric Blake <eblake@redhat.com>
show more ...
|
#
71b3f045 |
| 26-Feb-2018 |
Markus Armbruster <armbru@redhat.com> |
qapi: Make code-generating visitors use QAPIGen more
The use of QAPIGen is rather shallow so far: most of the output accumulation is not converted. Take the next step: convert output accumulation i
qapi: Make code-generating visitors use QAPIGen more
The use of QAPIGen is rather shallow so far: most of the output accumulation is not converted. Take the next step: convert output accumulation in the code-generating visitor classes. Helper functions outside these classes are not converted.
Signed-off-by: Markus Armbruster <armbru@redhat.com> Message-Id: <20180211093607.27351-20-armbru@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by: Michael Roth <mdroth@linux.vnet.ibm.com> [eblake: rebase to earlier guardstart cleanup] Signed-off-by: Eric Blake <eblake@redhat.com>
show more ...
|
#
fb0bc835 |
| 26-Feb-2018 |
Markus Armbruster <armbru@redhat.com> |
qapi-gen: New common driver for code and doc generators
Whenever qapi-schema.json changes, we run six programs eleven times to update eleven files. Similar for qga/qapi-schema.json. This is silly.
qapi-gen: New common driver for code and doc generators
Whenever qapi-schema.json changes, we run six programs eleven times to update eleven files. Similar for qga/qapi-schema.json. This is silly. Replace the six programs by a single program that spits out all eleven files.
The programs become modules in new Python package qapi, along with the helper library. This requires moving them to scripts/qapi/. While moving them, consistently drop executable mode bits.
Signed-off-by: Markus Armbruster <armbru@redhat.com> Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com> Message-Id: <20180211093607.27351-9-armbru@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Reviewed-by: Michael Roth <mdroth@linux.vnet.ibm.com> [eblake: move change to one-line 'blurb' earlier in series, mention mode bit change as intentional, update qapi-code-gen.txt to match actual generated events.c file] Signed-off-by: Eric Blake <eblake@redhat.com>
show more ...
|