This won't work, as needed. Announce timer can't be enabled, because
it is set in post_load function. Therefore announce callbacks break
the replay, when virtio-net is used with snapshots.

On 11.03.2024 20:40, Nicholas Piggin wrote:
Using virtual time for announce ensures that guest visible effects
are deterministic and don't break replay.

Signed-off-by: Nicholas Piggin <npig...@gmail.com>
---
  net/announce.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/net/announce.c b/net/announce.c
index 9e99044422..70b5d5e822 100644
--- a/net/announce.c
+++ b/net/announce.c
@@ -187,7 +187,7 @@ static void qemu_announce_self_once(void *opaque)
void qemu_announce_self(AnnounceTimer *timer, AnnounceParameters *params)
  {
-    qemu_announce_timer_reset(timer, params, QEMU_CLOCK_REALTIME,
+    qemu_announce_timer_reset(timer, params, QEMU_CLOCK_VIRTUAL,
                                qemu_announce_self_once, timer);
      if (params->rounds) {
          qemu_announce_self_once(timer);


Reply via email to