qemu/hw/i386
Marcelo Tosatti 00f4d64ee7 kvmclock: clock should count only if vm is running
kvmclock should not count while vm is paused, because:

1) if the vm is paused for long periods, timekeeping
math can overflow while converting the (large) clocksource
delta to nanoseconds.

2) Users rely on CLOCK_MONOTONIC to count run time, that is,
time which OS has been in a runnable state (see CLOCK_BOOTTIME).

Change kvmclock driver so as to save clock value when vm transitions
from runnable to stopped state, and to restore clock value from stopped
to runnable transition.

Cc: qemu-stable@nongnu.org
Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
Signed-off-by: Gleb Natapov <gleb@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2013-07-03 10:41:32 +02:00
..
kvm kvmclock: clock should count only if vm is running 2013-07-03 10:41:32 +02:00
kvmvapic.c kvm: Change cpu_synchronize_state() argument to CPUState 2013-06-28 13:25:12 +02:00
Makefile.objs hw: move hw/kvm/ to hw/i386/kvm 2013-04-08 18:13:16 +02:00
multiboot.c multiboot: Calculate upper_mem in the ROM 2013-06-28 14:01:52 -05:00
multiboot.h refer to FWCfgState explicitly 2013-06-02 18:14:02 +03:00
pc_piix.c Move hardcoded initialization of xen-platform device. 2013-06-25 12:00:53 +00:00
pc_q35.c target-i386: Update model values on Conroe/Penryn/Nehalem CPU models 2013-06-10 23:33:18 +02:00
pc.c cpu: Change cpu_exit() argument to CPUState 2013-06-28 13:25:12 +02:00
smbios.c smbios: Check R in -smbios type=0, release=R parses okay 2013-06-14 08:58:58 -05:00
xen_domainbuild.c hw: move private headers to hw/ subdirectories. 2013-04-08 18:13:16 +02:00
xen_domainbuild.h hw: move private headers to hw/ subdirectories. 2013-04-08 18:13:16 +02:00
xen_machine_pv.c xen_machine_pv: do not create a dummy CPU in machine->init 2013-06-03 15:41:26 +00:00