summaryrefslogtreecommitdiffstats
path: root/qemu-timer.c
diff options
context:
space:
mode:
authorPavel Dovgalyuk <Pavel.Dovgaluk@ispras.ru>2014-11-26 13:40:50 +0300
committerPaolo Bonzini <pbonzini@redhat.com>2014-12-15 12:21:02 +0100
commit4e7fa73ec2516334b58e82f9a5649b1468b1eb7a (patch)
tree00920668f9759856ce14ecd476dab1144d2f2338 /qemu-timer.c
parentd8a499f17ee5f05407874f29f69f0e3e3198a853 (diff)
downloadhqemu-4e7fa73ec2516334b58e82f9a5649b1468b1eb7a.zip
hqemu-4e7fa73ec2516334b58e82f9a5649b1468b1eb7a.tar.gz
timer: introduce new QEMU_CLOCK_VIRTUAL_RT clock
This patch introduces new QEMU_CLOCK_VIRTUAL_RT clock, which should be used for icount warping. In the next patch, it will be used to avoid a huge icount warp when a virtual machine is stopped for a long time. Signed-off-by: Pavel Dovgalyuk <Pavel.Dovgaluk@ispras.ru> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'qemu-timer.c')
-rw-r--r--qemu-timer.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/qemu-timer.c b/qemu-timer.c
index 00a5d35..f4b4b6a 100644
--- a/qemu-timer.c
+++ b/qemu-timer.c
@@ -566,6 +566,8 @@ int64_t qemu_clock_get_ns(QEMUClockType type)
notifier_list_notify(&clock->reset_notifiers, &now);
}
return now;
+ case QEMU_CLOCK_VIRTUAL_RT:
+ return cpu_get_clock();
}
}
OpenPOWER on IntegriCloud