I found vmstate_array_of_pointer_to_struct missed a `info` field, and I
could submit a patch to fix this nit next week (along with other cleanup
you and other miantainers suggested for HPET).
I wouldn't worry too much about VMState, it's not in its final form and anything that isn't needed to pass qtests can wait.
Paolo
> for which my idea is to implement a trait on
> types to retrieve a basic VMStateField (for example something like
> vmstate_uint32 would become an implementation of the VMState trait on u32).
This makes sense.
> Then you'd write something like "vmstate_of!(Type,
> field).with_version_id(2)" (i.e. vmstate_of retrieves the basic field and
> fills in the offset, then you apply more changes on top). But that may take
> a while, and I think it cannot be done without the const_refs_to_static
> feature, which is only stable in 1.83.0.
I also like this idea!
Thanks,
Zhao