qemu/rust
Zhao Liu b7d1deefc3 rust/hpet: Explicitly initialize complex fields in init()
Explicitly initialize more fields which are complex structures.

For simple types (bool/u32/usize), they can be omitted since C has
already initialized memory to all zeros and this is the valid
initialization for those simple types.

Previously such complex fields (InterruptSource/BqlCell/BqlRefCell) were
not explicitly initialized in init() and it's fine, because simply
setting all memory to zero aligns with their default initialization
behavior. However, this behavior is not robust. When adding new complex
struct or modifying the initial values of existing structs, this default
behavior can easily be broken.

Thus, do explicit initialization for HPET to become a good example.

Signed-off-by: Zhao Liu <zhao1.liu@intel.com>
Link: https://lore.kernel.org/r/20251113051937.4017675-16-zhao1.liu@intel.com
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2025-12-27 10:11:10 +01:00
..
bits rust: remove unnecessary repetitive options 2025-12-27 10:11:09 +01:00
bql rust/bql: Ensure BQL locked early at BqlRefCell borrowing 2025-12-27 10:11:10 +01:00
chardev bql: add prelude 2025-12-27 10:11:10 +01:00
common common: add prelude 2025-12-27 10:11:09 +01:00
hw rust/hpet: Explicitly initialize complex fields in init() 2025-12-27 10:11:10 +01:00
migration rust/migration: Check name field in VMStateDescriptionBuilder 2025-12-27 10:11:10 +01:00
qemu-macros rust: remove unnecessary repetitive options 2025-12-27 10:11:09 +01:00
qom qom: add more to the prelude 2025-12-27 10:11:10 +01:00
system system: add prelude 2025-12-27 10:11:10 +01:00
tests bql: add prelude 2025-12-27 10:11:10 +01:00
trace rust: remove unnecessary repetitive options 2025-12-27 10:11:09 +01:00
util util: add prelude 2025-12-27 10:11:09 +01:00
.gitignore rust: add bindgen step as a meson dependency 2024-10-11 12:32:17 +02:00
Cargo.lock rust/hpet: add trace events 2025-12-27 10:11:10 +01:00
Cargo.toml rust: only leave leaf crates as workspace members 2025-10-28 13:02:26 +01:00
Kconfig rust: add PL011 device model 2024-11-05 14:18:15 +01:00
meson.build rust: move VMState from bql to migration 2025-10-14 11:04:00 +02:00
rustfmt.toml rust: add crate to expose bindings and interfaces 2024-10-11 12:32:17 +02:00