kvmclock: count total_sleep_time when updating guest clock
authorJason Wang <jasowang@redhat.com>
Wed, 27 Jan 2010 11:13:49 +0000 (19:13 +0800)
committerGreg Kroah-Hartman <gregkh@suse.de>
Tue, 23 Feb 2010 15:37:52 +0000 (07:37 -0800)
commitaa1dcdd6eb7f457dee130987d5d5229e5a67184c
treeecb4d102ebe031f19a80f9a2d4f2e7d6d78b94c6
parent1c63c20663a84b03a2dc47d1c1998f1883081162
kvmclock: count total_sleep_time when updating guest clock

commit 923de3cf5bf12049628019010e36623fca5ef6d1 upstream.

Current kvm wallclock does not consider the total_sleep_time which could cause
wrong wallclock in guest after host suspend/resume. This patch solve
this issue by counting total_sleep_time to get the correct host boot time.

Signed-off-by: Jason Wang <jasowang@redhat.com>
Acked-by: Glauber Costa <glommer@redhat.com>
Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
arch/x86/kvm/x86.c