| 3e270dca | 13-Dec-2018 |
Marc-André Lureau <marcandre.lureau@redhat.com> |
qapi: add 'if' to alternate members
Add 'if' key to alternate members:
{ 'alternate': 'TestIfAlternate', 'data': { 'alt': { 'type': 'TestStruct', 'if': 'COND' } } }
Generated code is not changed
qapi: add 'if' to alternate members
Add 'if' key to alternate members:
{ 'alternate': 'TestIfAlternate', 'data': { 'alt': { 'type': 'TestStruct', 'if': 'COND' } } }
Generated code is not changed by this patch but with "qapi: add #if conditions to generated code".
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by: Markus Armbruster <armbru@redhat.com> Message-Id: <20181213123724.4866-17-marcandre.lureau@redhat.com> Signed-off-by: Markus Armbruster <armbru@redhat.com>
show more ...
|
| a2724280 | 13-Dec-2018 |
Marc-André Lureau <marcandre.lureau@redhat.com> |
qapi: add 'if' to union members
Add 'if' key to union members:
{ 'union': 'TestIfUnion', 'data': 'mem': { 'type': 'str', 'if': 'COND'} }
The generated code remains unconditional for now. Later
qapi: add 'if' to union members
Add 'if' key to union members:
{ 'union': 'TestIfUnion', 'data': 'mem': { 'type': 'str', 'if': 'COND'} }
The generated code remains unconditional for now. Later patches generate the conditionals.
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by: Markus Armbruster <armbru@redhat.com> Message-Id: <20181213123724.4866-16-marcandre.lureau@redhat.com> Signed-off-by: Markus Armbruster <armbru@redhat.com>
show more ...
|
| 687ac05d | 24-Aug-2018 |
Peter Maydell <peter.maydell@linaro.org> |
docs/devel/memory.txt: Document _with_attrs accessors
When we added the _with_attrs accessors we forgot to mention them in the documentation.
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
docs/devel/memory.txt: Document _with_attrs accessors
When we added the _with_attrs accessors we forgot to mention them in the documentation.
Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Message-Id: <20180824170422.5783-4-peter.maydell@linaro.org> Based-on: <20180802174042.29234-1-peter.maydell@linaro.org> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
show more ...
|
| 8c643361 | 27-Aug-2018 |
Eric Blake <eblake@redhat.com> |
qapi: Add comments to aid debugging generated introspection
We consciously chose in commit 1a9a507b to hide QAPI type names from the introspection output on the wire, but added a command line option
qapi: Add comments to aid debugging generated introspection
We consciously chose in commit 1a9a507b to hide QAPI type names from the introspection output on the wire, but added a command line option -u to unmask the type name when doing a debug build. The unmask option still remains useful to some other forms of automated analysis, so it will not be removed; however, when it is not in use, the generated .c file can be hard to read. At the time when we first introduced masking, the generated file consisted only of a monolithic C string, so there was no clean way to inject any comments.
Later, in commit 7d0f982b, we switched the generation to output a QLit object, in part to make it easier for future addition of conditional compilation. In fact, commit d626b6c1 took advantage of this by passing a tuple instead of a bare object for encoding the output of conditionals. By extending that tuple, we can now interject strategic comments.
For now, type name debug aid comments are only output once per meta-type, rather than at all uses of the number used to encode the type within the introspection data. But this is still a lot more convenient than having to regenerate the file with the unmask operation temporarily turned on - merely search the generated file for '"NNN" =' to learn the corresponding source name and associated definition of type NNN.
The generated qapi-introspect.c changes only with the addition of comments, such as:
| @@ -14755,6 +15240,7 @@ | { "name", QLIT_QSTR("[485]"), }, | {} | })), | + /* "485" = QCryptoBlockInfoLUKSSlot */ | QLIT_QDICT(((QLitDictEntry[]) { | { "members", QLIT_QLIST(((QLitObject[]) { | QLIT_QDICT(((QLitDictEntry[]) {
Signed-off-by: Eric Blake <eblake@redhat.com> Message-Id: <20180827213943.33524-3-eblake@redhat.com> Reviewed-by: Markus Armbruster <armbru@redhat.com> [Rebased, update to qapi-code-gen.txt corrected] Signed-off-by: Markus Armbruster <armbru@redhat.com>
show more ...
|
| 913b5e28 | 28-Aug-2018 |
Markus Armbruster <armbru@redhat.com> |
qapi: Update docs for generator changes since commit 9ee86b85267
Signed-off-by: Markus Armbruster <armbru@redhat.com> Message-Id: <20180828120736.32323-3-armbru@redhat.com> Reviewed-by: Eric Blake <
qapi: Update docs for generator changes since commit 9ee86b85267
Signed-off-by: Markus Armbruster <armbru@redhat.com> Message-Id: <20180828120736.32323-3-armbru@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com>
show more ...
|
| fe8bf5f6 | 20-Jun-2018 |
Alex Bennée <alex.bennee@linaro.org> |
build-system: add coverage-report target
This will build a coverage report under the current directory in reports/coverage. At the users option a report can be generated by directly invoking somethi
build-system: add coverage-report target
This will build a coverage report under the current directory in reports/coverage. At the users option a report can be generated by directly invoking something like:
make foo/bar/coverage-report.html
Signed-off-by: Alex Bennée <alex.bennee@linaro.org> Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Tested-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
show more ...
|
| 00ecec15 | 03-Jul-2018 |
Markus Armbruster <armbru@redhat.com> |
qmp: Redo how the client requests out-of-band execution
Commit cf869d53172 "qmp: support out-of-band (oob) execution" added a general mechanism for command-independent arguments just for an out-of-b
qmp: Redo how the client requests out-of-band execution
Commit cf869d53172 "qmp: support out-of-band (oob) execution" added a general mechanism for command-independent arguments just for an out-of-band flag:
The "control" key is introduced to store this extra flag. "control" field is used to store arguments that are shared by all the commands, rather than command specific arguments. Let "run-oob" be the first.
However, it failed to reject unknown members of "control". For instance, in QMP command
{"execute": "query-name", "id": 42, "control": {"crap": true}}
"crap" gets silently ignored.
Instead of fixing this, revert the general "control" mechanism (because YAGNI), and do it the way I initially proposed, with key "exec-oob". Simpler code, simpler interface.
An out-of-band command
{"execute": "migrate-pause", "id": 42, "control": {"run-oob": true}}
becomes
{"exec-oob": "migrate-pause", "id": 42}
Signed-off-by: Markus Armbruster <armbru@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Message-Id: <20180703085358.13941-13-armbru@redhat.com> [Commit message typo fixed]
show more ...
|