]> xenbits.xensource.com Git - people/aperard/qemu-dm.git/commit
rust/hpet: convert HPETTimer index to u8 type
authorZhao Liu <zhao1.liu@intel.com>
Mon, 14 Apr 2025 14:49:41 +0000 (22:49 +0800)
committerPaolo Bonzini <pbonzini@redhat.com>
Wed, 23 Apr 2025 08:35:23 +0000 (10:35 +0200)
commit64e1256b21395eb7c8a9419faba4187dea73970d
treef96e08c64f7807e34fc2e2b0de1c007bee82337b
parent8163eeee4e5b6ce5ecb2f7300b80ae8a6f868afd
rust/hpet: convert HPETTimer index to u8 type

The C version of HPET uses the uint8_t type for timer index ("tn"), and
usize type in Rust version will break migration between the C and Rust
versions.

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

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