qemu/rust
Paolo Bonzini fff99a88be rust: assertions: Support index field wrapped in BqlCell
Currently, if the `num` field of a varray is not a numeric type, such as
being placed in a wrapper, the array variant of assert_field_type will
fail the check.

HPET currently wraps num_timers in BqlCell<>. Although BqlCell<> is not
necessary from strictly speaking, it makes sense for vmstate to respect
BqlCell.

The failure of assert_field_type is because it cannot convert BqlCell<T>
into usize for use as the index.  Use a constant 0 instead for the index,
by avoiding $(...)? and extracting the common parts of
assert_field_type! into an internal case.

Commit message based on a patch by Zhao Liu <zhao1.liu@intel.com>.

Link: https://lore.kernel.org/r/20250414144943.1112885-3-zhao1.liu@intel.com
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2025-05-02 17:37:46 +02:00
..
hw rust/hw/char/pl011: Extract DR write logic into separate function 2025-04-23 10:35:23 +02:00
qemu-api rust: assertions: Support index field wrapped in BqlCell 2025-05-02 17:37:46 +02:00
qemu-api-macros rust: qemu_api_macros: add Wrapper derive macro 2025-03-06 12:44:46 +01:00
.gitignore rust: add bindgen step as a meson dependency 2024-10-11 12:32:17 +02:00
Cargo.lock rust: subprojects: add libc crate 2025-02-25 10:49:23 +01:00
Cargo.toml rust: hpet: decode HPET registers into enums 2025-03-06 12:44:47 +01:00
clippy.toml rust: add clippy configuration file 2025-02-07 15:51:01 +01:00
Kconfig rust: add PL011 device model 2024-11-05 14:18:15 +01:00
meson.build rust: build: add "make clippy", "make rustfmt", "make rustdoc" 2024-12-10 18:44:06 +01:00
rustfmt.toml rust: add crate to expose bindings and interfaces 2024-10-11 12:32:17 +02:00
wrapper.h include/system: Move exec/address-spaces.h to system/address-spaces.h 2025-04-23 14:08:21 -07:00