diff options
author | Zachary Amsden <zamsden@redhat.com> | 2010-08-20 04:07:22 -0400 |
---|---|---|
committer | Avi Kivity <avi@redhat.com> | 2010-10-24 04:51:22 -0400 |
commit | 6755bae8e69093b2994b6f29cd3eaecdf610374e (patch) | |
tree | cab26685a09da818153e2ba04ac26f9616af62b5 /arch/x86/kvm/x86.c | |
parent | 8cfdc0008542b57caadbfe013da163131a8293f4 (diff) |
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>
Diffstat (limited to 'arch/x86/kvm/x86.c')
-rw-r--r-- | arch/x86/kvm/x86.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c index 699c6b89c1b4..a8dee58e8716 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) | |||
5457 | struct kvm_vcpu *kvm_arch_vcpu_create(struct kvm *kvm, | 5457 | struct kvm_vcpu *kvm_arch_vcpu_create(struct kvm *kvm, |
5458 | unsigned int id) | 5458 | unsigned int id) |
5459 | { | 5459 | { |
5460 | if (check_tsc_unstable() && atomic_read(&kvm->online_vcpus) != 0) | ||
5461 | printk_once(KERN_WARNING | ||
5462 | "kvm: SMP vm created on host with unstable TSC; " | ||
5463 | "guest TSC will not be reliable\n"); | ||
5460 | return kvm_x86_ops->vcpu_create(kvm, id); | 5464 | return kvm_x86_ops->vcpu_create(kvm, id); |
5461 | } | 5465 | } |
5462 | 5466 | ||