qemu/rust/hw/timer/hpet
Paolo Bonzini eb64a0c6ae rust: hpet: fully initialize object during instance_init
The array of BqlRefCell<HPETTimer> is not initialized yet at the
end of instance_init.  In particular, the "state" field is NonNull
and therefore it is invalid to have it as zero bytes.

Note that MaybeUninit is necessary because assigning to self.timers[index]
would trigger Drop of the old value.

Reviewed-by: Zhao Liu <zhao1.liu@intel.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2025-06-17 09:54:51 +02:00
..
src rust: hpet: fully initialize object during instance_init 2025-06-17 09:54:51 +02:00
Cargo.toml rust: centralize config in workspace root 2025-05-02 23:37:55 +02:00
meson.build rust/timer/hpet: define hpet_fw_cfg 2025-02-13 12:51:34 +01:00