qemu-devel
[Top][All Lists]
Advanced

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

[Qemu-devel] [PATCH 1/3] ppc: fix timebase adjustment during migration


From: Mark Cave-Ayland
Subject: [Qemu-devel] [PATCH 1/3] ppc: fix timebase adjustment during migration
Date: Sun, 31 Jan 2016 19:19:34 +0000

ns_diff is already clamped to a minimum of 0 to prevent the timebase going
backwards during migration due to misaligned clocks. Following on from this
migration_duration_tb is also subject to the same constraint; hence the
expression MIN(0, migration_duration_tb) always evaluates to 0 and so no
timebase adjustment ever takes place.

Signed-off-by: Mark Cave-Ayland <address@hidden>
---
 hw/ppc/ppc.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/hw/ppc/ppc.c b/hw/ppc/ppc.c
index ce90b09..19f4570 100644
--- a/hw/ppc/ppc.c
+++ b/hw/ppc/ppc.c
@@ -877,7 +877,7 @@ static int timebase_post_load(void *opaque, int version_id)
     migration_duration_ns = MIN(NANOSECONDS_PER_SECOND, ns_diff);
     migration_duration_tb = muldiv64(migration_duration_ns, freq,
                                      NANOSECONDS_PER_SECOND);
-    guest_tb = tb_remote->guest_timebase + MIN(0, migration_duration_tb);
+    guest_tb = tb_remote->guest_timebase + migration_duration_tb;
 
     tb_off_adj = guest_tb - cpu_get_host_ticks();
 
-- 
1.7.10.4




reply via email to

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