kvm: i8254: Cache kernel clock offset in KVMPITState
commit205df4d1a87cbb14a50655fb2c0a987467fb29d6
authorJan Kiszka <jan.kiszka@siemens.com>
Tue, 14 Aug 2012 08:24:03 +0000 (14 10:24 +0200)
committerMarcelo Tosatti <mtosatti@redhat.com>
Tue, 14 Aug 2012 22:23:16 +0000 (14 19:23 -0300)
tree83d118f404509796a2c18189cb152e46bca8d454
parent873359d411eeb380906761e46839a2b705dbcf75
kvm: i8254: Cache kernel clock offset in KVMPITState

To prepare the final fix for clock calibration issues with the in-kernel
PIT, we want to cache the offset between vmclock and the clock used by
the in-kernel PIT. So far, we only need to update it when the VM state
changes between running and stopped because we only read the in-kernel
PIT state while the VM is running.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
hw/kvm/i8254.c