From: Owen Hofmann Date: Tue, 4 Nov 2014 00:57:18 +0000 (-0800) Subject: kvm: x86: Fix kvm clock versioning. X-Git-Tag: omap-for-v3.20/drop-legacy-3517~40^2~69 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=09a0c3f110b2fbe3bd03817c416d00968666fd74;p=pandora-kernel.git kvm: x86: Fix kvm clock versioning. kvm updates the version number for the guest paravirt clock structure by incrementing the version of its private copy. It does not read the guest version, so will write version = 2 in the first update for every new VM, including after restoring a saved state. If guest state is saved during reading the clock, it could read and accept struct fields and guest TSC from two different updates. This changes the code to increment the guest version and write it back. Signed-off-by: Owen Hofmann Reviewed-by: Marcelo Tosatti Signed-off-by: Paolo Bonzini --- Reading git-diff-tree failed