aboutsummaryrefslogtreecommitdiff
path: root/hw/ppc/ppc.c
diff options
context:
space:
mode:
authorPaolo Bonzini <pbonzini@redhat.com>2014-11-26 15:01:01 +0100
committerAlexander Graf <agraf@suse.de>2015-01-07 16:16:26 +0100
commit77bad151fbd2b2eed1e959ecc2c3f2ee2f080f6c (patch)
tree80b6668b66eca6465e0b87ff26182fad95516d1d /hw/ppc/ppc.c
parent2bf9febc95e5bcef8edb10ebc967325917b9c958 (diff)
ppc: do not use get_clock_realtime()
Use the external qemu-timer API instead. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Alexander Graf <agraf@suse.de>
Diffstat (limited to 'hw/ppc/ppc.c')
-rw-r--r--hw/ppc/ppc.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/hw/ppc/ppc.c b/hw/ppc/ppc.c
index bec82cd7a9..5ce565d5ec 100644
--- a/hw/ppc/ppc.c
+++ b/hw/ppc/ppc.c
@@ -844,7 +844,7 @@ static void timebase_pre_save(void *opaque)
return;
}
- tb->time_of_the_day_ns = get_clock_realtime();
+ tb->time_of_the_day_ns = qemu_clock_get_ns(QEMU_CLOCK_HOST);
/*
* tb_offset is only expected to be changed by migration so
* there is no need to update it from KVM here
@@ -873,7 +873,7 @@ static int timebase_post_load(void *opaque, int version_id)
* We try to adjust timebase by downtime if host clocks are not
* too much out of sync (1 second for now).
*/
- host_ns = get_clock_realtime();
+ host_ns = qemu_clock_get_ns(QEMU_CLOCK_HOST);
ns_diff = MAX(0, host_ns - tb_remote->time_of_the_day_ns);
migration_duration_ns = MIN(NSEC_PER_SEC, ns_diff);
migration_duration_tb = muldiv64(migration_duration_ns, freq, NSEC_PER_SEC);