From: Paolo Bonzini <pbonzini@redhat.com>
To: Zhao Liu <zhao1.liu@intel.com>
Cc: qemu-devel@nongnu.org, qemu-rust@nongnu.org,
Dapeng Mi <dapeng1.mi@intel.com>
Subject: Re: [PATCH 0/9] rust/hpet: Initial support for migration
Date: Tue, 15 Apr 2025 12:24:50 +0200 [thread overview]
Message-ID: <57d8e9f6-01dc-4a11-861f-96906d302199@redhat.com> (raw)
In-Reply-To: <20250414144943.1112885-1-zhao1.liu@intel.com>
On 4/14/25 16:49, Zhao Liu wrote:
> Hi all,
>
> This series add the *initial* support for HPET migration.
>
> This is *initial* because the current migration implementation
> introduces multiple *unsafe* callbacks (please refer Patch 8).
>
> 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.
Merged 4/6/7/9 for now, thanks! I'll reply to patch 2 with a review.
Paolo
> Test this series with 3 migration cases:
> * q35 (Rust HPET) -> q35 (Rust HPET)
> * q35 (Rust HPET) -> q35 (C HPET)
> * q35 (C HPET) -> q35 (Rust HPET)
>
> Thanks and Best Regards,
> Zhao
> ---
> Zhao Liu (9):
> rust/vmstate: Support field_exists check in vmstate_struct macro
> rust/vmstate: Support varray's num field wrapped in BqlCell
> rust/vmstate_test: Test varray with num field wrapped in BqlCell
> rust/vmstate_test: Fix typo in
> test_vmstate_macro_array_of_pointer_wrapped()
> rust/timer: Define NANOSECONDS_PER_SECOND binding as u64
> rust/hpet: convert num_timers to u8 type
> rust/hpet: convert HPETTimer index to u8 type
> rust/hpet: Support migration
> rust/hpet: Fix a clippy error
>
> docs/devel/rust.rst | 3 +-
> rust/hw/timer/hpet/src/hpet.rs | 189 ++++++++++++++++++++++++---
> rust/qemu-api/src/assertions.rs | 30 ++++-
> rust/qemu-api/src/cell.rs | 23 ++++
> rust/qemu-api/src/timer.rs | 2 +
> rust/qemu-api/src/vmstate.rs | 67 +++++-----
> rust/qemu-api/tests/vmstate_tests.rs | 45 +++++--
> 7 files changed, 294 insertions(+), 65 deletions(-)
>
prev parent reply other threads:[~2025-04-15 10:25 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-04-14 14:49 [PATCH 0/9] rust/hpet: Initial support for migration Zhao Liu
2025-04-14 14:49 ` [PATCH 1/9] rust/vmstate: Support field_exists check in vmstate_struct macro Zhao Liu
2025-04-16 14:54 ` Paolo Bonzini
2025-04-14 14:49 ` [PATCH 2/9] rust/vmstate: Support varray's num field wrapped in BqlCell Zhao Liu
2025-04-15 10:54 ` Paolo Bonzini
2025-04-16 9:43 ` Zhao Liu
2025-04-16 12:34 ` Zhao Liu
2025-04-16 14:24 ` Paolo Bonzini
2025-05-16 8:25 ` Zhao Liu
2025-04-14 14:49 ` [PATCH 3/9] rust/vmstate_test: Test varray with " Zhao Liu
2025-04-14 14:49 ` [PATCH 4/9] rust/vmstate_test: Fix typo in test_vmstate_macro_array_of_pointer_wrapped() Zhao Liu
2025-04-14 14:49 ` [PATCH 5/9] rust/timer: Define NANOSECONDS_PER_SECOND binding as u64 Zhao Liu
2025-04-14 14:49 ` [PATCH 6/9] rust/hpet: convert num_timers to u8 type Zhao Liu
2025-04-14 14:49 ` [PATCH 7/9] rust/hpet: convert HPETTimer index " Zhao Liu
2025-04-14 14:49 ` [PATCH 8/9] rust/hpet: Support migration Zhao Liu
2025-04-15 12:01 ` Zhao Liu
2025-04-15 14:21 ` Paolo Bonzini
2025-04-15 17:43 ` Paolo Bonzini
2025-04-16 10:20 ` Zhao Liu
2025-04-16 14:40 ` Paolo Bonzini
2025-04-16 10:33 ` Zhao Liu
2025-04-14 14:49 ` [PATCH 9/9] rust/hpet: Fix a clippy error Zhao Liu
2025-04-15 10:24 ` Paolo Bonzini [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=57d8e9f6-01dc-4a11-861f-96906d302199@redhat.com \
--to=pbonzini@redhat.com \
--cc=dapeng1.mi@intel.com \
--cc=qemu-devel@nongnu.org \
--cc=qemu-rust@nongnu.org \
--cc=zhao1.liu@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).