]> xenbits.xensource.com Git - xen.git/commit
x86: don't pass negative time to gtime_to_gtsc() (try 2)
authorJan Beulich <jbeulich@suse.com>
Tue, 2 Jul 2013 06:48:03 +0000 (08:48 +0200)
committerJan Beulich <jbeulich@suse.com>
Tue, 2 Jul 2013 06:48:03 +0000 (08:48 +0200)
commit5ad914bc867c5a6a4957869c89918f4e1f9dd9c4
tree2f27da7d381043bd197186ad4ca09da3bce5b356
parent6b104d91b81ac460a0a862f02c7cbeff82e14430
x86: don't pass negative time to gtime_to_gtsc() (try 2)

This mostly reverts commit eb60be3d ("x86: don't pass negative time to
gtime_to_gtsc()") and instead corrects __update_vcpu_system_time()'s
handling of this_cpu(cpu_time).stime_local_stamp dating back before the
start of a HVM guest (which would otherwise lead to a negative value
getting passed to gtime_to_gtsc(), causing scale_delta() to produce
meaningless output).

Flushing the value to zero was wrong, and printing a message for
something that can validly happen wasn't very useful either.

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Acked-by: Keir Fraser <keir@xen.org>
xen/arch/x86/time.c