mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-02 07:13:54 -06:00
rust/hpet: Support migration
Based on commit 1433e38cc8
("hpet: do not overwrite properties on
post_load"), add the basic migration support to Rust HPET.
The current migration implementation introduces multiple unsafe
callbacks. Before the vmstate builder, one possible cleanup approach is
to wrap callbacks in the vmstate binding using a method similar to the
vmstate_exist_fn macro.
However, this approach would also create a lot of repetitive code (since
vmstate has so many callbacks: pre_load, post_load, pre_save, post_save,
needed and dev_unplug_pending). Although it would be cleaner, it would
somewhat deviate from the path of the vmstate builder.
Therefore, firstly focus on completing the functionality of HPET, and
those current unsafe callbacks can at least clearly indicate the needed
functionality of vmstate. The next step is to consider refactoring
vmstate to move towards the vmstate builder direction.
Additionally, update rust.rst about Rust HPET can support migration.
Signed-off-by: Zhao Liu <zhao1.liu@intel.com>
Link: https://lore.kernel.org/r/20250414144943.1112885-9-zhao1.liu@intel.com
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
This commit is contained in:
parent
8d9502b4e9
commit
db46654af8
2 changed files with 146 additions and 3 deletions
|
@ -153,8 +153,7 @@ QEMU includes four crates:
|
|||
|
||||
.. [#issues] The ``pl011`` crate is synchronized with ``hw/char/pl011.c``
|
||||
as of commit 02b1f7f61928. The ``hpet`` crate is synchronized as of
|
||||
commit f32352ff9e. Both are lacking tracing functionality; ``hpet``
|
||||
is also lacking support for migration.
|
||||
commit 1433e38cc8. Both are lacking tracing functionality.
|
||||
|
||||
This section explains how to work with them.
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue