From: Zachary Amsden Date: Fri, 20 Aug 2010 08:07:30 +0000 (-1000) Subject: KVM: x86: Fix a possible backwards warp of kvmclock X-Git-Tag: v2.6.37-rc1~142^2~159 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1d5f066e0b63271b67eac6d3752f8aa96adcbddb;p=pandora-kernel.git KVM: x86: Fix a possible backwards warp of kvmclock Kernel time, which advances in discrete steps may progress much slower than TSC. As a result, when kvmclock is adjusted to a new base, the apparent time to the guest, which runs at a much higher, nsec scaled rate based on the current TSC, may have already been observed to have a larger value (kernel_ns + scaled tsc) than the value to which we are setting it (kernel_ns + 0). We must instead compute the clock as potentially observed by the guest for kernel_ns to make sure it does not go backwards. Signed-off-by: Zachary Amsden Signed-off-by: Marcelo Tosatti --- Reading git-diff-tree failed