]> git.ipfire.org Git - thirdparty/qemu.git/commit
rust/hpet: convert num_timers to u8 type
authorZhao Liu <zhao1.liu@intel.com>
Mon, 14 Apr 2025 14:49:40 +0000 (22:49 +0800)
committerPaolo Bonzini <pbonzini@redhat.com>
Wed, 23 Apr 2025 08:35:23 +0000 (10:35 +0200)
commit8163eeee4e5b6ce5ecb2f7300b80ae8a6f868afd
treedacb642e5c56fe7655d0c017a7cc1eaf7999cf80
parentae39acef49e29169f90cd3a799d6cd0b50bc65d2
rust/hpet: convert num_timers to u8 type

The C version of HPET uses the uint8_t type for num_timers, and usize
type in Rust version will break migration between the C and Rust
versions.

So convert num_timers' type to u8 (consistent with the C version of
HPET) to make it friendly for vmstate support.

Note the commit 7bda68e8e2b0 ("qdev, rust/hpet: fix type of HPET
'timers property") supports the usize type property, but the uint8
property has to be re-supported now.

Signed-off-by: Zhao Liu <zhao1.liu@intel.com>
Link: https://lore.kernel.org/r/20250414144943.1112885-7-zhao1.liu@intel.com
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
rust/hw/timer/hpet/src/hpet.rs