x86/pvclock: Zero last_value on resume
authorJeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
Mon, 25 Oct 2010 23:53:46 +0000 (16:53 -0700)
committerGreg Kroah-Hartman <gregkh@suse.de>
Wed, 2 Mar 2011 14:46:36 +0000 (09:46 -0500)
commit595b62a8acfb289a5d2fcc70464ba0995b55fdd7
tree5bfa0b8f080ec60f707658ea671fe680fe840f64
parent5f528de0ef9b3e092e276d95930830b847b33dc4
x86/pvclock: Zero last_value on resume

commit e7a3481c0246c8e45e79c629efd63b168e91fcda upstream.

If the guest domain has been suspend/resumed or migrated, then the
system clock backing the pvclock clocksource may revert to a smaller
value (ie, can be non-monotonic across the migration/save-restore).

Make sure we zero last_value in that case so that the domain
continues to see clock updates.

Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
arch/x86/include/asm/pvclock.h
arch/x86/kernel/pvclock.c
arch/x86/xen/time.c