diff options
author | Zhao Liu <zhao1.liu@intel.com> | 2025-09-21 00:05:16 +0800 |
---|---|---|
committer | Paolo Bonzini <pbonzini@redhat.com> | 2025-09-22 17:17:19 +0200 |
commit | 9686aa9a05d9ef25c13ddc0af0123e2fc569b0ac (patch) | |
tree | 221731847ab15ac177b35cc75cc4e8b4f2d20e81 /scripts/lib/kdoc/kdoc_files.py | |
parent | b4221e88a9a497c3d72c4dfad1bcc12468f3fd01 (diff) | |
download | qemu-9686aa9a05d9ef25c13ddc0af0123e2fc569b0ac.zip qemu-9686aa9a05d9ef25c13ddc0af0123e2fc569b0ac.tar.gz qemu-9686aa9a05d9ef25c13ddc0af0123e2fc569b0ac.tar.bz2 |
rust/qdev: Support bit property in #property macro
Add BIT_INFO to QDevProp trait, so that bit related property info could
be bound to u32 & u64.
Then add "bit=*" field in #property attributes macro to allow device to
configure bit property.
In addtion, convert the #property field parsing from `if-else` pattern
to `match` pattern, to help readability. And note, the `bitnr` member of
`Property` struct is generated by manual TokenStream construction,
instead of conditional repetition (like #(bitnr: #bitnr,)?) since
`quote` doesn't support this.
In addtion, rename VALUE member of QDevProp trait to BASE_INFO.
And update the test cases about qdev property.
Signed-off-by: Zhao Liu <zhao1.liu@intel.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Link: https://lore.kernel.org/r/20250920160520.3699591-9-zhao1.liu@intel.com
Diffstat (limited to 'scripts/lib/kdoc/kdoc_files.py')
0 files changed, 0 insertions, 0 deletions