]> Git Repo - qemu.git/commitdiff
hw/ppc: Do not re-read the clock on pre_save if doing savevm
authorGreg Kurz <[email protected]>
Wed, 2 Dec 2020 17:28:26 +0000 (18:28 +0100)
committerDavid Gibson <[email protected]>
Mon, 14 Dec 2020 04:54:12 +0000 (15:54 +1100)
A guest with enough RAM, eg. 128G, is likely to detect savevm downtime
and to complain about stalled CPUs. This happens because we re-read
the timebase just before migrating it and we thus don't account for
all the time between VM stop and pre-save.

A very similar situation was already addressed for live migration of
paused guests (commit d14f33976282). Extend the logic to do the same
with savevm.

Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=1893787
Signed-off-by: Greg Kurz <[email protected]>
Message-Id: <160693010619.1111945.632640981169395440[email protected]>
Signed-off-by: David Gibson <[email protected]>
hw/ppc/ppc.c

index 1b9827207676941f5f36ba6ac4d247e416136f45..5cbbff1f8d0c30ddbed3a0dae47a20e6129a5901 100644 (file)
@@ -1027,7 +1027,8 @@ static void timebase_save(PPCTimebase *tb)
      */
     tb->guest_timebase = ticks + first_ppc_cpu->env.tb_env->tb_offset;
 
-    tb->runstate_paused = runstate_check(RUN_STATE_PAUSED);
+    tb->runstate_paused =
+        runstate_check(RUN_STATE_PAUSED) || runstate_check(RUN_STATE_SAVE_VM);
 }
 
 static void timebase_load(PPCTimebase *tb)
@@ -1088,7 +1089,7 @@ static int timebase_pre_save(void *opaque)
 {
     PPCTimebase *tb = opaque;
 
-    /* guest_timebase won't be overridden in case of paused guest */
+    /* guest_timebase won't be overridden in case of paused guest or savevm */
     if (!tb->runstate_paused) {
         timebase_save(tb);
     }
This page took 0.028729 seconds and 4 git commands to generate.