]> git.ipfire.org Git - thirdparty/qemu.git/commit
kvm: i8254: Finish time conversion fix
authorJan Kiszka <jan.kiszka@siemens.com>
Tue, 14 Aug 2012 08:24:47 +0000 (10:24 +0200)
committerMichael Roth <mdroth@linux.vnet.ibm.com>
Tue, 21 Aug 2012 20:42:32 +0000 (15:42 -0500)
commitffc7565c81b010683c3cab8efe9accd0eb90aa0d
tree347d0bdbad96f12c7a945204613d3a60294d20b0
parent393d4c921464c2a791b6662b8b664feba9104cce
kvm: i8254: Finish time conversion fix

0cdd3d1444 fixed reading back the counter load time from the kernel
while assuming the kernel would always update its load time on writing
the state. That is only true for channel 1, and so pit_get_channel_info
returned wrong output pin states for high counter values.

Fix this by applying the offset also on kvm_pit_put. Now we also need to
update the offset when we write the state while the VM is stopped as it
keeps on changing in that state.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
(cherry picked from commit 050a46065de8e3d4ee5a04f5598d666f63d34800)

Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
hw/kvm/i8254.c