qemu-rust
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH 19/26] rust: rename qemu-api modules to follow C code a bit m


From: Paolo Bonzini
Subject: Re: [PATCH 19/26] rust: rename qemu-api modules to follow C code a bit more
Date: Fri, 13 Dec 2024 12:24:53 +0100



Il ven 13 dic 2024, 10:01 Zhao Liu <zhao1.liu@intel.com> ha scritto:
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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]