qemu/hw/i386/kvm
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
..
apic.c kvm: Change cpu_synchronize_state() argument to CPUState 2013-06-28 13:25:12 +02:00
clock.c kvmclock: clock should count only if vm is running 2013-07-03 10:41:32 +02:00
i8254.c i8254: Convert PITCommonState to QOM realizefn 2013-06-07 14:55:24 +02:00
i8259.c i8259: Convert PICCommonState to use QOM realizefn 2013-06-07 14:55:24 +02:00
ioapic.c KVM: PIC: Only commit irq routing when necessary 2013-07-01 01:11:14 +02:00
Makefile.objs
pci-assign.c pci-assign: remove the duplicate function name in debug message 2013-07-03 10:38:20 +02:00