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 <mark.cave-ayl...@ilande.co.uk> --- 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