#
3ad64edf |
| 04-Aug-2021 |
Marc-André Lureau <marcandre.lureau@redhat.com> |
qapi: add 'any' condition
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Message-Id: <20210804083105.97531-8-marcandre.lureau@redhat.com> Reviewed-by: Markus Armbruster <armbru@redha
qapi: add 'any' condition
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Message-Id: <20210804083105.97531-8-marcandre.lureau@redhat.com> Reviewed-by: Markus Armbruster <armbru@redhat.com> Signed-off-by: Markus Armbruster <armbru@redhat.com>
show more ...
|
#
5d83b9a1 |
| 04-Aug-2021 |
Marc-André Lureau <marcandre.lureau@redhat.com> |
qapi: replace if condition list with dict {'all': [...]}
Replace the simple list sugar form with a recursive structure that will accept other operators in the following commits (all, any or not).
S
qapi: replace if condition list with dict {'all': [...]}
Replace the simple list sugar form with a recursive structure that will accept other operators in the following commits (all, any or not).
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Message-Id: <20210804083105.97531-7-marcandre.lureau@redhat.com> Reviewed-by: Markus Armbruster <armbru@redhat.com> [Accidental code motion undone. Degenerate :forms: comment dropped. Helper _check_if() moved. Error messages tweaked. ui.json updated. Accidental changes to qapi-schema-test.json dropped.] Signed-off-by: Markus Armbruster <armbru@redhat.com>
show more ...
|
Revision tags: v6.1.0-rc1, v6.1.0-rc0, v6.0.0, v6.0.0-rc5, v6.0.0-rc4, v6.0.0-rc3, v6.0.0-rc2, v6.0.0-rc1, v6.0.0-rc0 |
|
#
d83b4764 |
| 23-Mar-2021 |
Markus Armbruster <armbru@redhat.com> |
qapi: Enforce union and alternate branch naming rules
Union branch names should use '-', not '_'. Enforce this. The only offenders are in tests/. Fix them.
Signed-off-by: Markus Armbruster <armb
qapi: Enforce union and alternate branch naming rules
Union branch names should use '-', not '_'. Enforce this. The only offenders are in tests/. Fix them.
Signed-off-by: Markus Armbruster <armbru@redhat.com> Message-Id: <20210323094025.3569441-29-armbru@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> [Commit message typo fixed]
show more ...
|
#
5aceeac0 |
| 23-Mar-2021 |
Markus Armbruster <armbru@redhat.com> |
qapi: Enforce struct member naming rules
Struct members, including command arguments, event data, and union inline base members, should use '-', not '_'. Enforce this. Fix the fixable offenders (a
qapi: Enforce struct member naming rules
Struct members, including command arguments, event data, and union inline base members, should use '-', not '_'. Enforce this. Fix the fixable offenders (all in tests/), and add the remainder to pragma member-name-exceptions.
Signed-off-by: Markus Armbruster <armbru@redhat.com> Message-Id: <20210323094025.3569441-27-armbru@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com>
show more ...
|
#
05ebf841 |
| 23-Mar-2021 |
Markus Armbruster <armbru@redhat.com> |
qapi: Enforce command naming rules
Command names should be lower-case. Enforce this. Fix the fixable offenders (all in tests/), and add the remainder to pragma command-name-exceptions.
Signed-off
qapi: Enforce command naming rules
Command names should be lower-case. Enforce this. Fix the fixable offenders (all in tests/), and add the remainder to pragma command-name-exceptions.
Signed-off-by: Markus Armbruster <armbru@redhat.com> Message-Id: <20210323094025.3569441-25-armbru@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com>
show more ...
|
#
b86df374 |
| 23-Mar-2021 |
Markus Armbruster <armbru@redhat.com> |
qapi: Rename pragma *-whitelist to *-exceptions
Rename pragma returns-whitelist to command-returns-exceptions, and name-case-whitelist to member-name-case-exceptions.
Signed-off-by: Markus Armbrust
qapi: Rename pragma *-whitelist to *-exceptions
Rename pragma returns-whitelist to command-returns-exceptions, and name-case-whitelist to member-name-case-exceptions.
Signed-off-by: Markus Armbruster <armbru@redhat.com> Message-Id: <20210323094025.3569441-20-armbru@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com>
show more ...
|
#
d4f4cae8 |
| 23-Mar-2021 |
Markus Armbruster <armbru@redhat.com> |
qapi: Enforce event naming rules
Event names should be ALL_CAPS with words separated by underscore. Enforce this. The only offenders are in tests/. Fix them. Existing test event-case covers the n
qapi: Enforce event naming rules
Event names should be ALL_CAPS with words separated by underscore. Enforce this. The only offenders are in tests/. Fix them. Existing test event-case covers the new error.
Signed-off-by: Markus Armbruster <armbru@redhat.com> Message-Id: <20210323094025.3569441-14-armbru@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com>
show more ...
|
#
a291a38f |
| 18-Mar-2021 |
Markus Armbruster <armbru@redhat.com> |
qapi: Implement deprecated-output=hide for QMP event data
This policy suppresses deprecated bits in output, and thus permits "testing the future". Implement it for QMP event data: suppress deprecat
qapi: Implement deprecated-output=hide for QMP event data
This policy suppresses deprecated bits in output, and thus permits "testing the future". Implement it for QMP event data: suppress deprecated members.
No QMP event data is deprecated right now.
Signed-off-by: Markus Armbruster <armbru@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Message-Id: <20210318155519.1224118-6-armbru@redhat.com>
show more ...
|
#
91fa93e5 |
| 18-Mar-2021 |
Markus Armbruster <armbru@redhat.com> |
qapi: Implement deprecated-output=hide for QMP command results
This policy suppresses deprecated bits in output, and thus permits "testing the future". Implement it for QMP command results. Exampl
qapi: Implement deprecated-output=hide for QMP command results
This policy suppresses deprecated bits in output, and thus permits "testing the future". Implement it for QMP command results. Example: when QEMU is run with -compat deprecated-output=hide, then
{"execute": "query-cpus-fast"}
yields
{"return": [{"thread-id": 9805, "props": {"core-id": 0, "thread-id": 0, "socket-id": 0}, "qom-path": "/machine/unattached/device[0]", "cpu-index": 0, "target": "x86_64"}]}
instead of
{"return": [{"arch": "x86", "thread-id": 22436, "props": {"core-id": 0, "thread-id": 0, "socket-id": 0}, "qom-path": "/machine/unattached/device[0]", "cpu-index": 0, "target": "x86_64"}]}
Note the suppression of deprecated member "arch".
Signed-off-by: Markus Armbruster <armbru@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Message-Id: <20210318155519.1224118-4-armbru@redhat.com>
show more ...
|
Revision tags: v5.2.0, v5.2.0-rc4, v5.2.0-rc3, v5.2.0-rc2, v5.2.0-rc1, v5.2.0-rc0 |
|
#
04f22362 |
| 05-Oct-2020 |
Kevin Wolf <kwolf@redhat.com> |
qapi: Add a 'coroutine' flag for commands
This patch adds a new 'coroutine' flag to QMP command definitions that tells the QMP dispatcher that the command handler is safe to be run in a coroutine.
qapi: Add a 'coroutine' flag for commands
This patch adds a new 'coroutine' flag to QMP command definitions that tells the QMP dispatcher that the command handler is safe to be run in a coroutine.
The documentation of the new flag pretends that this flag is already used as intended, which it isn't yet after this patch. We'll implement this in another patch in this series.
Signed-off-by: Kevin Wolf <kwolf@redhat.com> Message-Id: <20201005155855.256490-9-kwolf@redhat.com> Reviewed-by: Markus Armbruster <armbru@redhat.com> Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com> Signed-off-by: Markus Armbruster <armbru@redhat.com>
show more ...
|
Revision tags: v5.0.1, v5.1.0, v5.1.0-rc3 |
|
#
f7160f32 |
| 29-Jul-2020 |
Andrea Bolognani <abologna@redhat.com> |
schemas: Add vim modeline
The various schemas included in QEMU use a JSON-based format which is, however, strictly speaking not valid JSON.
As a consequence, when vim tries to apply syntax highligh
schemas: Add vim modeline
The various schemas included in QEMU use a JSON-based format which is, however, strictly speaking not valid JSON.
As a consequence, when vim tries to apply syntax highlight rules for JSON (as guessed from the file name), the result is an unreadable mess which mostly consist of red markers pointing out supposed errors in, well, pretty much everything.
Using Python syntax highlighting produces much better results, and in fact these files already start with specially-formatted comments that instruct Emacs to process them as if they were Python files.
This commit adds the equivalent special comments for vim.
Signed-off-by: Andrea Bolognani <abologna@redhat.com> Message-Id: <20200729185024.121766-1-abologna@redhat.com> Reviewed-by: Daniel P. Berrangé <berrange@redhat.com> Reviewed-by: John Snow <jsnow@redhat.com> Signed-off-by: Markus Armbruster <armbru@redhat.com>
show more ...
|
Revision tags: v5.1.0-rc2, v5.1.0-rc1, v5.1.0-rc0, v4.2.1, v5.0.0, v5.0.0-rc4, v5.0.0-rc3, v5.0.0-rc2, v5.0.0-rc1, v5.0.0-rc0 |
|
#
f965e8fe |
| 17-Mar-2020 |
Markus Armbruster <armbru@redhat.com> |
qapi: New special feature flag "deprecated"
Unlike regular feature flags, the new special feature flag "deprecated" is recognized by the QAPI generator. For now, it's only permitted with commands,
qapi: New special feature flag "deprecated"
Unlike regular feature flags, the new special feature flag "deprecated" is recognized by the QAPI generator. For now, it's only permitted with commands, events, and struct members. It will be put to use shortly.
Signed-off-by: Markus Armbruster <armbru@redhat.com> Message-Id: <20200317115459.31821-26-armbru@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> [Doc typo fixed]
show more ...
|
#
84ab0086 |
| 17-Mar-2020 |
Markus Armbruster <armbru@redhat.com> |
qapi: Add feature flags to struct members
Signed-off-by: Markus Armbruster <armbru@redhat.com> Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com> Message-Id: <20200317115459.31821-21-armbr
qapi: Add feature flags to struct members
Signed-off-by: Markus Armbruster <armbru@redhat.com> Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com> Message-Id: <20200317115459.31821-21-armbru@redhat.com>
show more ...
|
#
013b4efc |
| 17-Mar-2020 |
Markus Armbruster <armbru@redhat.com> |
qapi: Add feature flags to remaining definitions
In v4.1.0, we added feature flags just to struct types (commit 6a8c0b5102^..f3ed93d545), to satisfy an immediate need (commit c9d4070991 "file-posix:
qapi: Add feature flags to remaining definitions
In v4.1.0, we added feature flags just to struct types (commit 6a8c0b5102^..f3ed93d545), to satisfy an immediate need (commit c9d4070991 "file-posix: Add dynamic-auto-read-only QAPI feature"). In v4.2.0, we added them to commands (commit 23394b4c39 "qapi: Add feature flags to commands") to satisfy another immediate need (commit d76744e65e "qapi: Allow introspecting fix for savevm's cooperation with blockdev").
Add them to the remaining definitions: enumeration types, union types, alternate types, and events.
Signed-off-by: Markus Armbruster <armbru@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Message-Id: <20200317115459.31821-13-armbru@redhat.com>
show more ...
|
Revision tags: v4.2.0, v4.2.0-rc5, v4.2.0-rc4, v4.2.0-rc3, v4.2.0-rc2, v4.1.1, v4.2.0-rc1, v4.2.0-rc0 |
|
#
2e2e0df2 |
| 18-Oct-2019 |
Peter Krempa <pkrempa@redhat.com> |
tests: qapi: Test 'features' of commands
Signed-off-by: Peter Krempa <pkrempa@redhat.com> Reviewed-by: Markus Armbruster <armbru@redhat.com> Signed-off-by: Markus Armbruster <armbru@redhat.com> Mess
tests: qapi: Test 'features' of commands
Signed-off-by: Peter Krempa <pkrempa@redhat.com> Reviewed-by: Markus Armbruster <armbru@redhat.com> Signed-off-by: Markus Armbruster <armbru@redhat.com> Message-Id: <20191018081454.21369-4-armbru@redhat.com>
show more ...
|
Revision tags: v4.0.1, v3.1.1.1 |
|
#
0ced9531 |
| 13-Sep-2019 |
Markus Armbruster <armbru@redhat.com> |
qapi: Permit omitting all flat union branches
Absent flat union branches default to the empty struct (since commit 800877bb16 "qapi: allow empty branches in flat unions"). But an attempt to omit al
qapi: Permit omitting all flat union branches
Absent flat union branches default to the empty struct (since commit 800877bb16 "qapi: allow empty branches in flat unions"). But an attempt to omit all of them is rejected with "Union 'FOO' has no branches". Harmless oddity, but it's easy to avoid, so do that.
Signed-off-by: Markus Armbruster <armbru@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Message-Id: <20190913201349.24332-11-armbru@redhat.com> [Commit message typo fixed]
show more ...
|
#
f0325536 |
| 13-Sep-2019 |
Markus Armbruster <armbru@redhat.com> |
qapi: Permit alternates with just one branch
A union or alternate without branches makes no sense and doesn't work: it can't be instantiated. A union or alternate with just one branch works, but is
qapi: Permit alternates with just one branch
A union or alternate without branches makes no sense and doesn't work: it can't be instantiated. A union or alternate with just one branch works, but is degenerate. We accept the former, but reject the latter. Weird. docs/devel/qapi-code-gen.txt doesn't mention the difference. It claims an alternate definition is "is similar to a simple union type".
Permit degenerate alternates to make them consistent with unions.
Signed-off-by: Markus Armbruster <armbru@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Message-Id: <20190913201349.24332-10-armbru@redhat.com>
show more ...
|
#
675b214b |
| 13-Sep-2019 |
Markus Armbruster <armbru@redhat.com> |
qapi: Permit 'boxed' with empty type
We reject empty types with 'boxed': true. We don't really need that to work, but making it work is actually simpler than rejecting it, so do that.
Signed-off-b
qapi: Permit 'boxed' with empty type
We reject empty types with 'boxed': true. We don't really need that to work, but making it work is actually simpler than rejecting it, so do that.
Signed-off-by: Markus Armbruster <armbru@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Message-Id: <20190913201349.24332-9-armbru@redhat.com>
show more ...
|
#
b22e8658 |
| 13-Sep-2019 |
Markus Armbruster <armbru@redhat.com> |
qapi: Drop support for boxed alternate arguments
Commands and events can define their argument type inline (default) or by referring to another type ('boxed': true, since commit c818408e44 "qapi: Im
qapi: Drop support for boxed alternate arguments
Commands and events can define their argument type inline (default) or by referring to another type ('boxed': true, since commit c818408e44 "qapi: Implement boxed types for commands/events", v2.7.0). The unboxed inline definition is an (anonymous) struct type. The boxed type may be a struct, union, or alternate type.
The latter is problematic: docs/interop/qemu-spec.txt requires the value of the 'data' key to be a json-object, but any non-degenerate alternate type has at least one branch that isn't.
Fortunately, we haven't made use of alternates in this context outside tests/. Drop support for them.
QAPISchemaAlternateType.is_empty() is now unused. Drop it, too.
Signed-off-by: Markus Armbruster <armbru@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Message-Id: <20190913201349.24332-4-armbru@redhat.com>
show more ...
|
Revision tags: v4.1.0, v4.1.0-rc5, v4.1.0-rc4, v3.1.1, v4.1.0-rc3, v4.1.0-rc2, v4.1.0-rc1, v4.1.0-rc0 |
|
#
8aa3a33e |
| 06-Jun-2019 |
Kevin Wolf <kwolf@redhat.com> |
tests/qapi-schema: Test for good feature lists in structs
Signed-off-by: Kevin Wolf <kwolf@redhat.com> Message-Id: <20190606153803.5278-3-armbru@redhat.com> Reviewed-by: Markus Armbruster <armbru@re
tests/qapi-schema: Test for good feature lists in structs
Signed-off-by: Kevin Wolf <kwolf@redhat.com> Message-Id: <20190606153803.5278-3-armbru@redhat.com> Reviewed-by: Markus Armbruster <armbru@redhat.com> Signed-off-by: Markus Armbruster <armbru@redhat.com>
show more ...
|
Revision tags: v4.0.0, v4.0.0-rc4, v3.0.1, v4.0.0-rc3, v4.0.0-rc2, v4.0.0-rc1, v4.0.0-rc0 |
|
#
5e12eb98 |
| 01-Mar-2019 |
Markus Armbruster <armbru@redhat.com> |
tests/qapi-schema: Cover forward reference to sub-module
The forward reference from the main module to the sub-module works fine, except for an issue visible in qapi-schema-test.out: the array type
tests/qapi-schema: Cover forward reference to sub-module
The forward reference from the main module to the sub-module works fine, except for an issue visible in qapi-schema-test.out: the array type wrapped around the forward reference ends up in the main module, not the sub-module. The next commit will explain why that's bad, and fix it.
Signed-off-by: Markus Armbruster <armbru@redhat.com> Message-Id: <20190301154051.23317-7-armbru@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com>
show more ...
|
#
b359f4b2 |
| 01-Mar-2019 |
Markus Armbruster <armbru@redhat.com> |
tests: Rename UserDefNativeListUnion to UserDefListUnion
The lists in UserDefNativeListUnion aren't "native", they're lists of built-in types. The next commit will add a list of a user-defined type
tests: Rename UserDefNativeListUnion to UserDefListUnion
The lists in UserDefNativeListUnion aren't "native", they're lists of built-in types. The next commit will add a list of a user-defined type. Drop "Native", and adjust the tests using the type.
Signed-off-by: Markus Armbruster <armbru@redhat.com> Message-Id: <20190301154051.23317-6-armbru@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com>
show more ...
|
#
709395f8 |
| 01-Mar-2019 |
Markus Armbruster <armbru@redhat.com> |
qapi: Fix code generation for sub-modules in other directories
The #include directives to pull in sub-modules use file names relative to the main module. Works only when all modules are in the same
qapi: Fix code generation for sub-modules in other directories
The #include directives to pull in sub-modules use file names relative to the main module. Works only when all modules are in the same directory, or the main module's output directory is in the compiler's include path. Use relative file names instead.
The dummy variable we generate to avoid empty .o files has an invalid name for sub-modules in other directories. Fix that.
Both messed up in commit 252dc3105fc "qapi: Generate separate .h, .c for each module". Escaped testing because tests/qapi-schema-test.json doesn't cover sub-modules in other directories, only tests/qapi-schema/include-relpath.json does, and we generate and compile C code only for the former, not the latter. Fold the latter into the former. This would have caught the mistakes fixed in this commit.
Signed-off-by: Markus Armbruster <armbru@redhat.com> Message-Id: <20190301154051.23317-5-armbru@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com>
show more ...
|
#
0f20628b |
| 01-Mar-2019 |
Markus Armbruster <armbru@redhat.com> |
tests/qapi-schema: Cover conditional arrays
Commit 967c885108f neglected to cover arrays of conditional types. Do that now.
Signed-off-by: Markus Armbruster <armbru@redhat.com> Message-Id: <201903
tests/qapi-schema: Cover conditional arrays
Commit 967c885108f neglected to cover arrays of conditional types. Do that now.
Signed-off-by: Markus Armbruster <armbru@redhat.com> Message-Id: <20190301154051.23317-3-armbru@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com>
show more ...
|
#
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 ...
|