summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZachary Amsden <zamsden@redhat.com>2010-08-19 22:07:22 -1000
committerAvi Kivity <avi@redhat.com>2010-10-24 10:51:22 +0200
commit6755bae8e69093b2994b6f29cd3eaecdf610374e (patch)
treecab26685a09da818153e2ba04ac26f9616af62b5
parent8cfdc0008542b57caadbfe013da163131a8293f4 (diff)
downloadop-kernel-dev-6755bae8e69093b2994b6f29cd3eaecdf610374e.zip
op-kernel-dev-6755bae8e69093b2994b6f29cd3eaecdf610374e.tar.gz
KVM: x86: Warn about unstable TSC
If creating an SMP guest with unstable host TSC, issue a warning Signed-off-by: Zachary Amsden <zamsden@redhat.com> Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
-rw-r--r--arch/x86/kvm/x86.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c
index 699c6b8..a8dee58 100644
--- a/arch/x86/kvm/x86.c
+++ b/arch/x86/kvm/x86.c
@@ -5457,6 +5457,10 @@ void kvm_arch_vcpu_free(struct kvm_vcpu *vcpu)
struct kvm_vcpu *kvm_arch_vcpu_create(struct kvm *kvm,
unsigned int id)
{
+ if (check_tsc_unstable() && atomic_read(&kvm->online_vcpus) != 0)
+ printk_once(KERN_WARNING
+ "kvm: SMP vm created on host with unstable TSC; "
+ "guest TSC will not be reliable\n");
return kvm_x86_ops->vcpu_create(kvm, id);
}
OpenPOWER on IntegriCloud