Revision tags: v9.2.0, v9.1.2, v9.1.1 |
|
#
b8eada54 |
| 10-Sep-2024 |
Peter Maydell <peter.maydell@linaro.org> |
Merge tag 'pull-qapi-2024-09-10' of https://repo.or.cz/qemu/armbru into staging
QAPI patches patches for 2024-09-10
# -----BEGIN PGP SIGNATURE----- # # iQJGBAABCAAwFiEENUvIs9frKmtoZ05fOHC0AOuRhlMFA
Merge tag 'pull-qapi-2024-09-10' of https://repo.or.cz/qemu/armbru into staging
QAPI patches patches for 2024-09-10
# -----BEGIN PGP SIGNATURE----- # # iQJGBAABCAAwFiEENUvIs9frKmtoZ05fOHC0AOuRhlMFAmbgS0ASHGFybWJydUBy # ZWRoYXQuY29tAAoJEDhwtADrkYZTm+sP/1kEuGdbjjVLQC7U+gCClhALpYUtIMHQ # qNZWmnxFyW9Jx6Lk8+FZBRJegNlmA9AJ2ZzD/2I/WoNtcrNiE53rIRG71Lcy8I6U # CRjekLPn0jhFuYhmRfwz6ilcLkyMJ15Yi7iG6ssFsO1joBtU5Q1qpzQmFUl9UbV9 # 9iBe7mE99VzNwi3hMELEM9YuSgAs8st4Itnn8SiHkJ3s6hlmF8N4HwNKfQrseGfb # FuJNN4p8Gcu0aF/dkGE8ADJBvtgzkFnavXt0GQPC7SjGOF7rUXxnUQlszNZM0OcK # UAfWU06sIyiOholQQt8H8jawT+rGCLomfgPUBVq5K8WByd21IeQeS0upSPeTjxS+ # d/C8wzpcbhdNOECwC/wDtgZHvCC95cHNrxuC4+4/Q1KIVVr+1cWqe8hQzFvm3TIg # dduEFTQDIxhpE0GO1ZWNf90upzBYBWwIsh4bqsMZS7SpaYIZ6QV45yViZ1w2WfbH # m3/F34Z3yqgFuZQrZv4OPo7xHK0+y7uZ60RrhSJtE0X080syRJKBbGmNBRidoVyu # JOONWH44I/XN5enZV8StJnqJr9MCV0DBZUCi9ZhP/kAhBjLc5cQ6NByEa9/rebYX # 1bLTiA1JDLzDVIan+A8dz0riWmHBvTyBwhLnEXvXb9lcB3ozgHTb7axE5RnZSYLI # YQgBOBMFuQKM # =YO/Q # -----END PGP SIGNATURE----- # gpg: Signature made Tue 10 Sep 2024 14:36:00 BST # gpg: using RSA key 354BC8B3D7EB2A6B68674E5F3870B400EB918653 # gpg: issuer "armbru@redhat.com" # gpg: Good signature from "Markus Armbruster <armbru@redhat.com>" [full] # gpg: aka "Markus Armbruster <armbru@pond.sub.org>" [full] # Primary key fingerprint: 354B C8B3 D7EB 2A6B 6867 4E5F 3870 B400 EB91 8653
* tag 'pull-qapi-2024-09-10' of https://repo.or.cz/qemu/armbru: qapi/vfio: Rename VfioMigrationState to Qapi*, and drop prefix qapi/cryptodev: Rename QCryptodevBackendAlgType to *Algo, and drop prefix qapi/cryptodev: Drop unwanted 'prefix' qapi/crypto: Rename QCryptoAFAlg to QCryptoAFAlgo qapi/crypto: Rename QCryptoRSAPaddingAlgorithm to *Algo, and drop prefix qapi/crypto: Rename QCryptoAkCipherAlgorithm to *Algo, and drop prefix qapi/crypto: Rename QCryptoIVGenAlgorithm to *Algo, and drop prefix qapi/crypto: Rename QCryptoCipherAlgorithm to *Algo, and drop prefix qapi/crypto: Rename QCryptoHashAlgorithm to *Algo, and drop prefix qapi/crypto: Drop unwanted 'prefix' qapi/machine: Rename CpuS390* to S390Cpu*, and drop 'prefix' qapi/ui: Drop temporary 'prefix' qapi/machine: Drop temporary 'prefix' qapi/ebpf: Drop temporary 'prefix' qapi/crypto: Drop temporary 'prefix' qapi/common: Drop temporary 'prefix' qapi/block-core: Drop temporary 'prefix' tests/qapi-schema: Drop temporary 'prefix' qapi: Smarter camel_to_upper() to reduce need for 'prefix'
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
show more ...
|
#
a25b2312 |
| 04-Sep-2024 |
Markus Armbruster <armbru@redhat.com> |
tests/qapi-schema: Drop temporary 'prefix'
Recent commit "qapi: Smarter camel_to_upper() to reduce need for 'prefix'" added a temporary 'prefix' to delay changing the generated code.
Revert it. Th
tests/qapi-schema: Drop temporary 'prefix'
Recent commit "qapi: Smarter camel_to_upper() to reduce need for 'prefix'" added a temporary 'prefix' to delay changing the generated code.
Revert it. This changes TestUnionEnumA's generated enumeration constant prefix from TEST_UNION_ENUMA to TEST_UNION_ENUM_A.
Signed-off-by: Markus Armbruster <armbru@redhat.com> Reviewed-by: Thomas Huth <thuth@redhat.com> Message-ID: <20240904111836.3273842-3-armbru@redhat.com>
show more ...
|
#
7b29353f |
| 04-Sep-2024 |
Markus Armbruster <armbru@redhat.com> |
qapi: Smarter camel_to_upper() to reduce need for 'prefix'
camel_to_upper() converts its argument from camel case to upper case with '_' between words. Used for generated enumeration constant prefi
qapi: Smarter camel_to_upper() to reduce need for 'prefix'
camel_to_upper() converts its argument from camel case to upper case with '_' between words. Used for generated enumeration constant prefixes.
When some of the words are spelled all caps, where exactly to insert '_' is guesswork. camel_to_upper()'s guesses are bad enough in places to make people override them with a 'prefix' in the schema.
Rewrite it to guess better:
1. Insert '_' after a non-upper case character followed by an upper case character:
OneTwo -> ONE_TWO One2Three -> ONE2_THREE
2. Insert '_' before the last upper case character followed by a non-upper case character:
ACRONYMWord -> ACRONYM_Word
Except at the beginning (as in OneTwo above), or when there is already one:
AbCd -> AB_CD
This changes the default enumeration constant prefix for a number of enums. Generated enumeration constants change only where the default is not overridden with 'prefix'.
The following enumerations without a 'prefix' change:
enum old camel_to_upper() new camel_to_upper() ------------------------------------------------------------------ DisplayGLMode DISPLAYGL_MODE DISPLAY_GL_MODE EbpfProgramID EBPF_PROGRAMID EBPF_PROGRAM_ID HmatLBDataType HMATLB_DATA_TYPE HMAT_LB_DATA_TYPE HmatLBMemoryHierarchy HMATLB_MEMORY_HIERARCHY HMAT_LB_MEMORY_HIERARCHY MultiFDCompression MULTIFD_COMPRESSION MULTI_FD_COMPRESSION OffAutoPCIBAR OFF_AUTOPCIBAR OFF_AUTO_PCIBAR QCryptoBlockFormat Q_CRYPTO_BLOCK_FORMAT QCRYPTO_BLOCK_FORMAT QCryptoBlockLUKSKeyslotState Q_CRYPTO_BLOCKLUKS_KEYSLOT_STATE QCRYPTO_BLOCK_LUKS_KEYSLOT_STATE QKeyCode Q_KEY_CODE QKEY_CODE XDbgBlockGraphNodeType X_DBG_BLOCK_GRAPH_NODE_TYPE XDBG_BLOCK_GRAPH_NODE_TYPE TestUnionEnumA TEST_UNION_ENUMA TEST_UNION_ENUM_A
Add a 'prefix' so generated code doesn't change now. Subsequent commits will remove most of them again. Two will remain: MULTIFD_COMPRESSION, because migration code generally spells "multifd" that way, and Q_KEY_CODE, because that one is baked into subprojects/keycodemapdb/tools/keymap-gen.
The following enumerations with a 'prefix' change so that the prefix is now superfluous:
enum old camel_to_upper() new camel_to_upper() [equal to prefix] ------------------------------------------------------------------ BlkdebugIOType BLKDEBUGIO_TYPE BLKDEBUG_IO_TYPE QCryptoTLSCredsEndpoint Q_CRYPTOTLS_CREDS_ENDPOINT QCRYPTO_TLS_CREDS_ENDPOINT QCryptoSecretFormat Q_CRYPTO_SECRET_FORMAT QCRYPTO_SECRET_FORMAT QCryptoCipherMode Q_CRYPTO_CIPHER_MODE QCRYPTO_CIPHER_MODE QCryptodevBackendType Q_CRYPTODEV_BACKEND_TYPE QCRYPTODEV_BACKEND_TYPE QType [builtin] Q_TYPE QTYPE
Drop these prefixes.
The following enumerations with a 'prefix' change without making the 'prefix' superfluous:
enum old camel_to_upper() new camel_to_upper() [equal to prefix] prefix ------------------------------------------------------------------ CpuS390Entitlement CPUS390_ENTITLEMENT CPU_S390_ENTITLEMENT S390_CPU_ENTITLEMENT CpuS390Polarization CPUS390_POLARIZATION CPU_S390_POLARIZATION S390_CPU_POLARIZATION CpuS390State CPUS390_STATE CPU_S390_STATE S390_CPU_STATE QAuthZListFormat Q_AUTHZ_LIST_FORMAT QAUTH_Z_LIST_FORMAT QAUTHZ_LIST_FORMAT QAuthZListPolicy Q_AUTHZ_LIST_POLICY QAUTH_Z_LIST_POLICY QAUTHZ_LIST_POLICY QCryptoAkCipherAlgorithm Q_CRYPTO_AK_CIPHER_ALGORITHM QCRYPTO_AK_CIPHER_ALGORITHM QCRYPTO_AKCIPHER_ALG QCryptoAkCipherKeyType Q_CRYPTO_AK_CIPHER_KEY_TYPE QCRYPTO_AK_CIPHER_KEY_TYPE QCRYPTO_AKCIPHER_KEY_TYPE QCryptoCipherAlgorithm Q_CRYPTO_CIPHER_ALGORITHM QCRYPTO_CIPHER_ALGORITHM QCRYPTO_CIPHER_ALG QCryptoHashAlgorithm Q_CRYPTO_HASH_ALGORITHM QCRYPTO_HASH_ALGORITHM QCRYPTO_HASH_ALG QCryptoIVGenAlgorithm Q_CRYPTOIV_GEN_ALGORITHM QCRYPTO_IV_GEN_ALGORITHM QCRYPTO_IVGEN_ALG QCryptoRSAPaddingAlgorithm Q_CRYPTORSA_PADDING_ALGORITHM QCRYPTO_RSA_PADDING_ALGORITHM QCRYPTO_RSA_PADDING_ALG QCryptodevBackendAlgType Q_CRYPTODEV_BACKEND_ALG_TYPE QCRYPTODEV_BACKEND_ALG_TYPE QCRYPTODEV_BACKEND_ALG QCryptodevBackendServiceType Q_CRYPTODEV_BACKEND_SERVICE_TYPE QCRYPTODEV_BACKEND_SERVICE_TYPE QCRYPTODEV_BACKEND_SERVICE
Subsequent commits will tweak things to remove most of these prefixes. Only QAUTHZ_LIST_FORMAT and QAUTHZ_LIST_POLICY will remain.
Signed-off-by: Markus Armbruster <armbru@redhat.com> Reviewed-by: Daniel P. Berrangé <berrange@redhat.com> Message-ID: <20240904111836.3273842-2-armbru@redhat.com>
show more ...
|
Revision tags: v9.1.0 |
|
#
c3f9aa8e |
| 26-Apr-2023 |
Richard Henderson <richard.henderson@linaro.org> |
Merge tag 'pull-qapi-2023-04-26' of https://repo.or.cz/qemu/armbru into staging
QAPI patches patches for 2023-04-26
# -----BEGIN PGP SIGNATURE----- # # iQJGBAABCAAwFiEENUvIs9frKmtoZ05fOHC0AOuRhlMFA
Merge tag 'pull-qapi-2023-04-26' of https://repo.or.cz/qemu/armbru into staging
QAPI patches patches for 2023-04-26
# -----BEGIN PGP SIGNATURE----- # # iQJGBAABCAAwFiEENUvIs9frKmtoZ05fOHC0AOuRhlMFAmRIvOkSHGFybWJydUBy # ZWRoYXQuY29tAAoJEDhwtADrkYZTX3MQAIqrKQbOzQ81/cDZ7aeLOroDoGYf1Cs0 # 0NiEVlyoblWNzL3HraGgXiNRTP+zaG/TcFKza1nz8qjdkxWxBjdbfF5Lm6mQf5Zo # tcHUjksmnUlPkLYSOyEjfY9SNvcS6g7djE/NF5lbJtzYGZScZpLarELR7oUvrcXR # AEiw8N5FZXp+j6cTeWvrLzSqz9qBsFJUCGcGER0T/Mt5MlUwDexE1xe7g8oD5l+b # s0jeQr1PTZm5k6ehajQtgbHvAkgH8xVTKqbB/U5iz4VhYriH+IPEOtfCFt6/1soz # pVkYikJpazCvQMjqnWu9dE1onthgSsEIOV29kFU0Kr8ATZuJBQMuLVp4hSsbKANj # BUVyL2/fUsIp7gd+KikXUOjKYajxek6Q2YLAPpL+1pBCTql/PBQ7td8CECdiv/9e # Xh50q+BGvyEiyoyf4EEpaLXUZog605WHEaODj9uPtNHJP9x6Rqt93FUsdWUtt/k9 # hJ8RSKy8njr0vxGoJkj89m2XfCwtuX3VQ5IXvv/If4U5Y4+JhcLtiqW+Njh8fAM4 # ZwIrlUYG7inLUKFVcQ3sEGpaj611i5ixIxctUvEiggZX+fPeSFKYUr+Rq8WXM8gv # suLXz7VF6H4Sw30lCvdQ4LSungbzlYAtQYpmdEQGoM8iasIi4PoDf0cTYBbMYHDX # +pZvWC50cVtf # =wLx6 # -----END PGP SIGNATURE----- # gpg: Signature made Wed 26 Apr 2023 06:55:53 AM BST # gpg: using RSA key 354BC8B3D7EB2A6B68674E5F3870B400EB918653 # gpg: issuer "armbru@redhat.com" # gpg: Good signature from "Markus Armbruster <armbru@redhat.com>" [undefined] # gpg: aka "Markus Armbruster <armbru@pond.sub.org>" [undefined] # gpg: WARNING: This key is not certified with a trusted signature! # gpg: There is no indication that the signature belongs to the owner. # Primary key fingerprint: 354B C8B3 D7EB 2A6B 6867 4E5F 3870 B400 EB91 8653
* tag 'pull-qapi-2023-04-26' of https://repo.or.cz/qemu/armbru: qapi: allow unions to contain further unions qapi: Improve specificity of type/member descriptions qapi: support updating expected test output via make qapi: Require boxed for conditional command and event arguments qapi: Fix code generated for optional conditional struct member tests/qapi-schema: Cover optional conditional struct member tests/qapi-schema: Clean up positive test for conditionals tests/qapi-schema: Rename a few conditionals tests/qapi-schema: Improve union discriminator coverage qapi: Fix to reject 'data': 'mumble' in struct qapi: Fix error message when type name or array is expected qapi: Simplify code a bit after previous commits qapi: Improve error message for unexpected array types qapi: Split up check_type() qapi: Clean up after removal of simple unions qapi/schema: Use super() qapi: Fix error message format regression
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
show more ...
|
#
a17dbc4b |
| 20-Apr-2023 |
Daniel P. Berrangé <berrange@redhat.com> |
qapi: allow unions to contain further unions
This extends the QAPI schema validation to permit unions inside unions, provided the checks for clashing fields pass.
Reviewed-by: Markus Armbruster <ar
qapi: allow unions to contain further unions
This extends the QAPI schema validation to permit unions inside unions, provided the checks for clashing fields pass.
Reviewed-by: Markus Armbruster <armbru@redhat.com> Signed-off-by: Daniel P. Berrangé <berrange@redhat.com> Message-Id: <20230420102619.348173-4-berrange@redhat.com> Signed-off-by: Markus Armbruster <armbru@redhat.com>
show more ...
|
Revision tags: v8.0.0 |
|
#
de3b3f52 |
| 16-Mar-2023 |
Markus Armbruster <armbru@redhat.com> |
qapi: Require boxed for conditional command and event arguments
The C code generator fails to honor 'if' conditions of command and event arguments.
For instance, tests/qapi-schema/qapi-schema-test.
qapi: Require boxed for conditional command and event arguments
The C code generator fails to honor 'if' conditions of command and event arguments.
For instance, tests/qapi-schema/qapi-schema-test.json has
{ 'event': 'TEST_IF_EVENT', 'data': { 'foo': 'TestIfStruct', 'bar': { 'type': ['str'], 'if': 'TEST_IF_EVT_ARG' } }, 'if': { 'all': ['TEST_IF_EVT', 'TEST_IF_STRUCT'] } }
Generated tests/test-qapi-events.h fails to honor the TEST_IF_EVT_ARG condition:
#if defined(TEST_IF_EVT) && defined(TEST_IF_STRUCT) void qapi_event_send_test_if_event(TestIfStruct *foo, strList *bar); #endif /* defined(TEST_IF_EVT) && defined(TEST_IF_STRUCT) */
Only uses so far are in tests/.
We could fix the generator to emit something like
#if defined(TEST_IF_EVT) && defined(TEST_IF_STRUCT) void qapi_event_send_test_if_event(TestIfStruct *foo #if defined(TEST_IF_EVT_ARG) , strList *bar #endif ); #endif /* defined(TEST_IF_EVT) && defined(TEST_IF_STRUCT) */
Ugly. Calls become similarly ugly. Not worth fixing.
Conditional arguments work fine with 'boxed': true, simply because complex types with conditional members work fine. Not worth breaking.
Reject conditional arguments unless boxed.
Move the tests cases covering unboxed conditional arguments out of tests/qapi-schema/qapi-schema-test.json. Cover boxed conditional arguments there instead.
Signed-off-by: Markus Armbruster <armbru@redhat.com> Message-Id: <20230316071325.492471-15-armbru@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com>
show more ...
|
#
fa32eb90 |
| 16-Mar-2023 |
Markus Armbruster <armbru@redhat.com> |
tests/qapi-schema: Cover optional conditional struct member
Signed-off-by: Markus Armbruster <armbru@redhat.com> Message-Id: <20230316071325.492471-13-armbru@redhat.com> Reviewed-by: Philippe Mathie
tests/qapi-schema: Cover optional conditional struct member
Signed-off-by: Markus Armbruster <armbru@redhat.com> Message-Id: <20230316071325.492471-13-armbru@redhat.com> Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
show more ...
|
#
39d2cc8e |
| 16-Mar-2023 |
Markus Armbruster <armbru@redhat.com> |
tests/qapi-schema: Clean up positive test for conditionals
Union TestIfUnion is conditional on macros TEST_IF_UNION and TEST_IF_STRUCT. It uses TestIfEnum, which is conditional on macro TEST_IF_ENU
tests/qapi-schema: Clean up positive test for conditionals
Union TestIfUnion is conditional on macros TEST_IF_UNION and TEST_IF_STRUCT. It uses TestIfEnum, which is conditional on macro TEST_IF_ENUM. If TEST_IF_UNION and TEST_IF_STRUCT are defined, but TEST_IF_ENUM isn't, the generated code won't compile.
Command test-if-cmd is conditional an macros TEST_IF_CMD and TEST_IF_STRUCT, and uses TestIfEnum. Similar issue.
Event TEST_IF_EVENT is conditional an macros TEST_IF_EVT and TEST_IF_STRUCT, and uses TestIfEnum. Similar issue.
Replace the uses of TestIfEnum in the latter two by str.
TestIfUnion is now TestIfEnum's only user. Change TestIfEnum's condition to TEST_IF_UNION.
Signed-off-by: Markus Armbruster <armbru@redhat.com> Message-Id: <20230316071325.492471-12-armbru@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> [Commit message corrected]
show more ...
|
#
40e350f0 |
| 16-Mar-2023 |
Markus Armbruster <armbru@redhat.com> |
tests/qapi-schema: Rename a few conditionals
Positive test case
{ 'enum': 'TestIfEnum', 'data': [ 'foo', { 'name' : 'bar', 'if': 'TEST_IF_ENUM_BAR' } ], 'if': 'TEST_IF_ENUM' }
gene
tests/qapi-schema: Rename a few conditionals
Positive test case
{ 'enum': 'TestIfEnum', 'data': [ 'foo', { 'name' : 'bar', 'if': 'TEST_IF_ENUM_BAR' } ], 'if': 'TEST_IF_ENUM' }
generates
#if defined(TEST_IF_ENUM) typedef enum TestIfEnum { TEST_IF_ENUM_FOO, #if defined(TEST_IF_ENUM_BAR) TEST_IF_ENUM_BAR, #endif /* defined(TEST_IF_ENUM_BAR) */ TEST_IF_ENUM__MAX, } TestIfEnum;
Macro TEST_IF_ENUM_BAR clashes with the enumeration constant. Wouldn't compile with -DTEST_IF_BAR.
Rename the macro to TEST_IF_ENUM_MEMBER. For consistency, rename similar macros elsewhere as well.
Signed-off-by: Markus Armbruster <armbru@redhat.com> Message-Id: <20230316071325.492471-11-armbru@redhat.com> Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
show more ...
|
Revision tags: v7.2.0 |
|
#
378f973a |
| 21-Apr-2022 |
Richard Henderson <richard.henderson@linaro.org> |
Merge tag 'pull-qapi-2022-04-21' of git://repo.or.cz/qemu/armbru into staging
QAPI patches patches for 2022-04-21
# -----BEGIN PGP SIGNATURE----- # # iQJGBAABCAAwFiEENUvIs9frKmtoZ05fOHC0AOuRhlMFAmJ
Merge tag 'pull-qapi-2022-04-21' of git://repo.or.cz/qemu/armbru into staging
QAPI patches patches for 2022-04-21
# -----BEGIN PGP SIGNATURE----- # # iQJGBAABCAAwFiEENUvIs9frKmtoZ05fOHC0AOuRhlMFAmJhZgISHGFybWJydUBy # ZWRoYXQuY29tAAoJEDhwtADrkYZTuZQP/iesk/r4ytyk+q+ksNCQHTZl4B4uZcbI # TgbA1dwbwkKOfNaqByKZzXvbymL9Y4RpZavZ0i1qa3hK5orKHThLK4omRaFD+SPp # sH53TeTgkG/UNUQk00dim1BzuWJefqFo1rYSqvTzaXVPyx1Q9Gk9193q5zDTlMJs # w6UKD+q+Yxne9aoi1IH2NzzEKElHz7MMFeBDsnxDbkedzBxY1Ka05IOI2ucXhJ7X # mYTZxHsrjncW4qJNkf57u9y4faNDIBeT3vkFqBaIeTXSSqm+xO1rkLanGOLQKtIM # zD6JDMcqsIkZttEy0QCOrjKvMueWaOTZsS0sbdCC+JpBAbyVeS83kmRyYwEhyGre # FJzf81zcEH6FtnDYudWWUT7hKV6sHWbw+4ho5WTkCYnr/Cfqr3TyDbSW+f/eIxUK # vaujP/8MTypS4p0mx4QfM2/eO05oZHwEaslOn0gkg7siAJWuC7KUkkWSwz6ZNZCp # qj/+jtDRGhvB4bGFusciqwtbnLNtVPX2meUuVxK74lmKa00+zXraNFfvGIxfzzC0 # pJ6weJj2jMLo5OEsZ2xWfNqhDigFQYxbGR8X3N2hg5GZTx1k5WXx7mRz3GlAwd8Q # /4hcTBXKTFxDNxXqzL2eHBtaruKHjnHoVo2eAodyF+9FqErInjr/wisVm6I+R8NR # Z94UBs8lvMIC # =a3AD # -----END PGP SIGNATURE----- # gpg: Signature made Thu 21 Apr 2022 07:11:14 AM PDT # gpg: using RSA key 354BC8B3D7EB2A6B68674E5F3870B400EB918653 # gpg: issuer "armbru@redhat.com" # gpg: Good signature from "Markus Armbruster <armbru@redhat.com>" [undefined] # gpg: aka "Markus Armbruster <armbru@pond.sub.org>" [undefined] # gpg: WARNING: This key is not certified with a trusted signature! # gpg: There is no indication that the signature belongs to the owner. # Primary key fingerprint: 354B C8B3 D7EB 2A6B 6867 4E5F 3870 B400 EB91 8653
* tag 'pull-qapi-2022-04-21' of git://repo.or.cz/qemu/armbru: qapi: Fix version of cpu0-id field qapi: Fix typo qapi: Fix documentation for query-xen-replication-status docs: qapi: Remove outdated reference to simple unions qapi-schema: test: add a unit test for parsing array alternates qapi-schema: test: add a qapi-schema-test for array alternates qapi-schema: support alternates with array type
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
show more ...
|
Revision tags: v7.0.0 |
|
#
79db9948 |
| 21-Mar-2022 |
Paolo Bonzini <pbonzini@redhat.com> |
qapi-schema: test: add a unit test for parsing array alternates
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Message-Id: <20220321164243.200569-4-pbonzini@redhat.com> Reviewed-by: Markus Armbr
qapi-schema: test: add a unit test for parsing array alternates
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Message-Id: <20220321164243.200569-4-pbonzini@redhat.com> Reviewed-by: Markus Armbruster <armbru@redhat.com> [Dead code dropped in test_visitor_in_alternate_list()] Signed-off-by: Markus Armbruster <armbru@redhat.com>
show more ...
|
Revision tags: v6.2.0 |
|
#
dd61b91c |
| 29-Oct-2021 |
Richard Henderson <richard.henderson@linaro.org> |
Merge remote-tracking branch 'remotes/armbru/tags/pull-qapi-2021-10-29' into staging
QAPI patches patches for 2021-10-29
# gpg: Signature made Fri 29 Oct 2021 12:28:53 PM PDT # gpg:
Merge remote-tracking branch 'remotes/armbru/tags/pull-qapi-2021-10-29' into staging
QAPI patches patches for 2021-10-29
# gpg: Signature made Fri 29 Oct 2021 12:28:53 PM PDT # gpg: using RSA key 354BC8B3D7EB2A6B68674E5F3870B400EB918653 # gpg: issuer "armbru@redhat.com" # gpg: Good signature from "Markus Armbruster <armbru@redhat.com>" [full] # gpg: aka "Markus Armbruster <armbru@pond.sub.org>" [full]
* remotes/armbru/tags/pull-qapi-2021-10-29: qapi: Extend -compat to set policy for unstable interfaces qapi: Factor out compat_policy_input_ok() qapi: Generalize enum member policy checking qapi: Generalize command policy checking qapi: Generalize struct member policy checking qapi: Tools for sets of special feature flags in generated code qapi: Eliminate QCO_NO_OPTIONS for a slight simplification qapi: Mark unstable QMP parts with feature 'unstable' qapi: New special feature flag "unstable"
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
show more ...
|
#
a3c45b3e |
| 28-Oct-2021 |
Markus Armbruster <armbru@redhat.com> |
qapi: New special feature flag "unstable"
By convention, names starting with "x-" are experimental. The parts of external interfaces so named may be withdrawn or changed incompatibly in future rele
qapi: New special feature flag "unstable"
By convention, names starting with "x-" are experimental. The parts of external interfaces so named may be withdrawn or changed incompatibly in future releases.
The naming convention makes unstable interfaces easy to recognize. Promoting something from experimental to stable involves a name change. Client code needs to be updated. Occasionally bothersome.
Worse, the convention is not universally observed:
* QOM type "input-barrier" has properties "x-origin", "y-origin". Looks accidental, but it's ABI since 4.2.
* QOM types "memory-backend-file", "memory-backend-memfd", "memory-backend-ram", and "memory-backend-epc" have a property "x-use-canonical-path-for-ramblock-id" that is documented to be stable despite its name.
We could document these exceptions, but documentation helps only humans. We want to recognize "unstable" in code, like "deprecated".
So support recognizing it the same way: introduce new special feature flag "unstable". It will be treated specially by the QAPI generator, like the existing feature flag "deprecated", and unlike regular feature flags.
This commit updates documentation and prepares tests. The next commit updates the QAPI schema. The remaining patches update the QAPI generator and wire up -compat policy checking.
Management applications can then use query-qmp-schema and -compat to manage or guard against use of unstable interfaces the same way as for deprecated interfaces.
docs/devel/qapi-code-gen.txt no longer mandates the naming convention. Using it anyway might help writers of programs that aren't full-fledged management applications. Not using it can save us bothersome renames. We'll see how that shakes out.
Signed-off-by: Markus Armbruster <armbru@redhat.com> Reviewed-by: Juan Quintela <quintela@redhat.com> Reviewed-by: John Snow <jsnow@redhat.com> Message-Id: <20211028102520.747396-2-armbru@redhat.com>
show more ...
|
#
5c49c6c2 |
| 27-Oct-2021 |
Richard Henderson <richard.henderson@linaro.org> |
Merge remote-tracking branch 'remotes/armbru/tags/pull-qapi-2021-10-27' into staging
QAPI patches patches for 2021-10-27
# gpg: Signature made Wed 27 Oct 2021 08:21:54 AM PDT # gpg:
Merge remote-tracking branch 'remotes/armbru/tags/pull-qapi-2021-10-27' into staging
QAPI patches patches for 2021-10-27
# gpg: Signature made Wed 27 Oct 2021 08:21:54 AM PDT # gpg: using RSA key 354BC8B3D7EB2A6B68674E5F3870B400EB918653 # gpg: issuer "armbru@redhat.com" # gpg: Good signature from "Markus Armbruster <armbru@redhat.com>" [full] # gpg: aka "Markus Armbruster <armbru@pond.sub.org>" [full]
* remotes/armbru/tags/pull-qapi-2021-10-27: qapi: Implement deprecated-input={reject,crash} for enum values qapi: Move compat policy from QObject to generic visitor qapi: Add feature flags to enum members qapi: Enable enum member introspection to show more than name qapi: Improve input_type_enum()'s error message
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
show more ...
|
#
b6c18755 |
| 24-Oct-2021 |
Markus Armbruster <armbru@redhat.com> |
qapi: Add feature flags to enum members
This is quite similar to commit 84ab008687 "qapi: Add feature flags to struct members", only for enums instead of structs.
Special feature flag 'deprecated'
qapi: Add feature flags to enum members
This is quite similar to commit 84ab008687 "qapi: Add feature flags to struct members", only for enums instead of structs.
Special feature flag 'deprecated' is silently ignored there. This is okay only because it will be implemented shortly.
Signed-off-by: Markus Armbruster <armbru@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Message-Id: <20211025042405.3762351-3-armbru@redhat.com> Reviewed-by: John Snow <jsnow@redhat.com>
show more ...
|
#
de8ed105 |
| 27-Sep-2021 |
Peter Maydell <peter.maydell@linaro.org> |
Merge remote-tracking branch 'remotes/armbru/tags/pull-qapi-2021-09-25-v2' into staging
QAPI patches patches for 2021-09-25
# gpg: Signature made Mon 27 Sep 2021 13:44:23 BST # gpg:
Merge remote-tracking branch 'remotes/armbru/tags/pull-qapi-2021-09-25-v2' into staging
QAPI patches patches for 2021-09-25
# gpg: Signature made Mon 27 Sep 2021 13:44:23 BST # gpg: using RSA key 354BC8B3D7EB2A6B68674E5F3870B400EB918653 # gpg: issuer "armbru@redhat.com" # gpg: Good signature from "Markus Armbruster <armbru@redhat.com>" [full] # gpg: aka "Markus Armbruster <armbru@pond.sub.org>" [full] # Primary key fingerprint: 354B C8B3 D7EB 2A6B 6867 4E5F 3870 B400 EB91 8653
* remotes/armbru/tags/pull-qapi-2021-09-25-v2: (25 commits) tests/qapi-schema: Make test-qapi.py -u work when files are absent tests/qapi-schema: Use Python OSError instead of outmoded IOError test-clone-visitor: Correct an accidental rename tests/qapi-schema: Rename flat-union-* test cases to union-* qapi: Drop simple unions tests/qapi-schema: Purge simple unions from tests tests/qapi-schema: Drop simple union __org.qemu_x-Union1 test-clone-visitor: Wean off __org.qemu_x-Union1 tests/qapi-schema: Rewrite simple union TestIfUnion to be flat tests/qapi-schema: Simple union UserDefListUnion is now unused, drop tests/qapi-schema: Wean off UserDefListUnion test-clone-visitor: Wean off UserDefListUnion test-qobject-output-visitor: Wean off UserDefListUnion test-qobject-input-visitor: Wean off UserDefListUnion tests/qapi-schema: Prepare for simple union UserDefListUnion removal qapi: Convert simple union TransactionAction to flat one qapi: Convert simple union ImageInfoSpecific to flat one qapi: Convert simple union SocketAddressLegacy to flat one qapi: Convert simple union ChardevBackend to flat one qapi: Convert simple union MemoryDeviceInfo to flat one ...
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
show more ...
|
#
bb5821dd |
| 17-Sep-2021 |
Markus Armbruster <armbru@redhat.com> |
tests/qapi-schema: Drop simple union __org.qemu_x-Union1
Replace simple union __org.qemu_x-Union1 with flat union __org.qemu_x-Union2, except drop it from __org.qemu_x-command, because there it's on
tests/qapi-schema: Drop simple union __org.qemu_x-Union1
Replace simple union __org.qemu_x-Union1 with flat union __org.qemu_x-Union2, except drop it from __org.qemu_x-command, because there it's only used to pull it into QMP. Now drop the unused -Union1, and rename -Union2 to -Union.
Signed-off-by: Markus Armbruster <armbru@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Message-Id: <20210917143134.412106-20-armbru@redhat.com>
show more ...
|
#
54501863 |
| 17-Sep-2021 |
Markus Armbruster <armbru@redhat.com> |
tests/qapi-schema: Rewrite simple union TestIfUnion to be flat
Simple unions predate flat unions. Having both complicates the QAPI schema language and the QAPI generator. We haven't been using sim
tests/qapi-schema: Rewrite simple union TestIfUnion to be flat
Simple unions predate flat unions. Having both complicates the QAPI schema language and the QAPI generator. We haven't been using simple unions in new code for a long time, because they are less flexible and somewhat awkward on the wire.
To prepare for their removal, rewrite TestIfUnion to be flat.
Signed-off-by: Markus Armbruster <armbru@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Message-Id: <20210917143134.412106-18-armbru@redhat.com>
show more ...
|
#
def1d1f5 |
| 17-Sep-2021 |
Markus Armbruster <armbru@redhat.com> |
tests/qapi-schema: Simple union UserDefListUnion is now unused, drop
Signed-off-by: Markus Armbruster <armbru@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Message-Id: <20210917143134.4121
tests/qapi-schema: Simple union UserDefListUnion is now unused, drop
Signed-off-by: Markus Armbruster <armbru@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Message-Id: <20210917143134.412106-17-armbru@redhat.com>
show more ...
|
#
1e65e16c |
| 17-Sep-2021 |
Markus Armbruster <armbru@redhat.com> |
tests/qapi-schema: Wean off UserDefListUnion
Command boxed-union uses simple union UserDefListUnion to cover unions. Use UserDefFlatUnion instead.
Signed-off-by: Markus Armbruster <armbru@redhat.c
tests/qapi-schema: Wean off UserDefListUnion
Command boxed-union uses simple union UserDefListUnion to cover unions. Use UserDefFlatUnion instead.
Signed-off-by: Markus Armbruster <armbru@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Message-Id: <20210917143134.412106-16-armbru@redhat.com>
show more ...
|
#
dffd8ff9 |
| 17-Sep-2021 |
Markus Armbruster <armbru@redhat.com> |
tests/qapi-schema: Prepare for simple union UserDefListUnion removal
Simple unions predate flat unions. Having both complicates the QAPI schema language and the QAPI generator. We haven't been usi
tests/qapi-schema: Prepare for simple union UserDefListUnion removal
Simple unions predate flat unions. Having both complicates the QAPI schema language and the QAPI generator. We haven't been using simple unions in new code for a long time, because they are less flexible and somewhat awkward on the wire.
To prepare for their removal, simple union UserDefListUnion has to go. It is used to cover arrays. The next few commits will eliminate its uses, and then it gets deleted. As a first step, provide struct ArrayStruct for the tests to be rewritten.
Signed-off-by: Markus Armbruster <armbru@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Message-Id: <20210917143134.412106-12-armbru@redhat.com>
show more ...
|
#
31ebff51 |
| 04-Sep-2021 |
Peter Maydell <peter.maydell@linaro.org> |
Merge remote-tracking branch 'remotes/armbru/tags/pull-qapi-2021-09-03' into staging
QAPI patches patches for 2021-09-03
# gpg: Signature made Fri 03 Sep 2021 16:20:49 BST # gpg: usi
Merge remote-tracking branch 'remotes/armbru/tags/pull-qapi-2021-09-03' into staging
QAPI patches patches for 2021-09-03
# gpg: Signature made Fri 03 Sep 2021 16:20:49 BST # gpg: using RSA key 354BC8B3D7EB2A6B68674E5F3870B400EB918653 # gpg: issuer "armbru@redhat.com" # gpg: Good signature from "Markus Armbruster <armbru@redhat.com>" [full] # gpg: aka "Markus Armbruster <armbru@pond.sub.org>" [full] # Primary key fingerprint: 354B C8B3 D7EB 2A6B 6867 4E5F 3870 B400 EB91 8653
* remotes/armbru/tags/pull-qapi-2021-09-03: qapi: Tweak error messages for unknown / conflicting 'if' keys qapi: Tweak error messages for missing / conflicting meta-type tests/qapi-schema: Hide OrderedDict in test output qapi: Use re.fullmatch() where appropriate qapi: Use "not COND" instead of "!COND" for generated documentation qapi: Avoid redundant parens in code generated for conditionals qapi: Factor common recursion out of cgen_ifcond(), docgen_ifcond() qapi: Fix C code generation for 'if' tests/qapi-schema: Demonstrate broken C code for 'if' tests/qapi-schema: Correct two 'if' conditionals qapi: Simplify how QAPISchemaIfCond represents "no condition" qapi: Simplify QAPISchemaIfCond's interface for generating C qapi: Set boolean value correctly in examples
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
show more ...
|
#
9c629fa8 |
| 31-Aug-2021 |
Markus Armbruster <armbru@redhat.com> |
tests/qapi-schema: Hide OrderedDict in test output
Since commit 5d83b9a130 "qapi: replace if condition list with dict {'all': [...]}", we represent if conditionals as trees consisting of OrderedDict
tests/qapi-schema: Hide OrderedDict in test output
Since commit 5d83b9a130 "qapi: replace if condition list with dict {'all': [...]}", we represent if conditionals as trees consisting of OrderedDict, list and str. This results in less than legible test output. For instance:
if OrderedDict([('not', OrderedDict([('any', [OrderedDict([('not', 'TEST_IF_EVT')]), OrderedDict([('not', 'TEST_IF_STRUCT')])])]))])
We intend to replace OrderedDict by dict when we get Python 3.7, which will result in more legible output:
if {'not': {'any': [{'not': 'TEST_IF_EVT'}, {'not': 'TEST_IF_STRUCT'}]}}
Can't wait: put in a hack to get that now, with a comment to revert it when we replace OrderedDict.
Signed-off-by: Markus Armbruster <armbru@redhat.com> Message-Id: <20210831123809.1107782-11-armbru@redhat.com> Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
show more ...
|
#
dd044023 |
| 31-Aug-2021 |
Markus Armbruster <armbru@redhat.com> |
tests/qapi-schema: Demonstrate broken C code for 'if'
The C code generated for 'if' conditionals is incorrectly parenthesized. For instance,
'if': { 'not': { 'any': [ { 'not': 'TEST_IF_EVT' },
tests/qapi-schema: Demonstrate broken C code for 'if'
The C code generated for 'if' conditionals is incorrectly parenthesized. For instance,
'if': { 'not': { 'any': [ { 'not': 'TEST_IF_EVT' }, { 'not': 'TEST_IF_STRUCT' } ] } } }
generates
#if !(!defined(TEST_IF_EVT)) || (!defined(TEST_IF_STRUCT))
This is wrong. Correct would be:
#if !(!defined(TEST_IF_EVT) || !defined(TEST_IF_STRUCT))
Cover the issue in qapi-schema-test.json. This generates bad #if in tests/test-qapi-events.h and other files.
Add a similar condition to doc-good.json. The generated documentation is fine.
Signed-off-by: Markus Armbruster <armbru@redhat.com> Message-Id: <20210831123809.1107782-5-armbru@redhat.com> Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
show more ...
|
#
cdcc04fa |
| 31-Aug-2021 |
Markus Armbruster <armbru@redhat.com> |
tests/qapi-schema: Correct two 'if' conditionals
A definition's conditional should imply the conditionals of types it uses. If it doesn't, some configurations won't compile.
Example (from tests/qa
tests/qapi-schema: Correct two 'if' conditionals
A definition's conditional should imply the conditionals of types it uses. If it doesn't, some configurations won't compile.
Example (from tests/qapi-schema/qapi-schema-test.json):
{ 'union': 'TestIfUnion', 'data': { 'foo': 'TestStruct', 'bar': { 'type': 'str', 'if': 'TEST_IF_UNION_BAR'} }, 'if': { 'all': ['TEST_IF_UNION', 'TEST_IF_STRUCT'] } }
{ 'command': 'test-if-union-cmd', 'data': { 'union-cmd-arg': 'TestIfUnion' }, 'if': 'TEST_IF_UNION' }
generates
#if (defined(TEST_IF_UNION)) && (defined(TEST_IF_STRUCT)) typedef struct TestIfUnion TestIfUnion; #endif /* (defined(TEST_IF_UNION)) && (defined(TEST_IF_STRUCT)) */
and
#if defined(TEST_IF_UNION) void qmp_test_if_union_cmd(TestIfUnion *union_cmd_arg, Error **errp); void qmp_marshal_test_if_union_cmd(QDict *args, QObject **ret, Error **errp); #endif /* defined(TEST_IF_UNION) */
which doesn't compile when !defined(TEST_IF_STRUCT).
Messed up in f8c4fdd6ae "tests/qapi: Cover commands with 'if' and union / alternate 'data'", v4.0.0. Harmless, as we don't actually use this configuration. Correct it anyway, along with another instance.
This loses coverage for 'not'. The next commit will bring it back.
Signed-off-by: Markus Armbruster <armbru@redhat.com> Message-Id: <20210831123809.1107782-4-armbru@redhat.com> Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
show more ...
|