]> git.karo-electronics.de Git - karo-tx-linux.git/commit
KVM: SVM: Adjust tsc_offset only if tsc_unstable
authorJoerg Roedel <joerg.roedel@amd.com>
Thu, 28 Oct 2010 18:48:13 +0000 (16:48 -0200)
committerGreg Kroah-Hartman <gregkh@suse.de>
Mon, 22 Nov 2010 18:47:34 +0000 (10:47 -0800)
commitcd80c840270c7b57bc38d6e2e1647e84ce23075d
tree14a8ed02bde77ca9b2e5c5ecd8fdcbe690948475
parentffc109c28a6a4cb5047df82b1d18ad7a13d3e247
KVM: SVM: Adjust tsc_offset only if tsc_unstable

commit 953899b659adce62cbe83d6a7527550ab8797c48 upstream.

The tsc_offset adjustment in svm_vcpu_load is executed
unconditionally even if Linux considers the host tsc as
stable. This causes a Linux guest detecting an unstable tsc
in any case.
This patch removes the tsc_offset adjustment if the host tsc
is stable. The guest will now get the benefit of a stable
tsc too.

Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
Signed-off-by: Avi Kivity <avi@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
arch/x86/kvm/svm.c