VMX: x86: handle host TSC calibration failure
authorMarcelo Tosatti <mtosatti@redhat.com>
Tue, 12 Mar 2013 02:10:24 +0000 (23:10 -0300)
committerGleb Natapov <gleb@redhat.com>
Tue, 12 Mar 2013 11:18:00 +0000 (13:18 +0200)
commit03ba32cae66e3798d697e582633af2c7dd6907e5
treef57ea6a992f4032a83af79f20a5dd63818bf0b99
parent0fa24ce3f57144e390a1566774c23434975a52a9
VMX: x86: handle host TSC calibration failure

If the host TSC calibration fails, tsc_khz is zero (see tsc_init.c).
Handle such case properly in KVM (instead of dividing by zero).

https://bugzilla.redhat.com/show_bug.cgi?id=859282

Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
Signed-off-by: Gleb Natapov <gleb@redhat.com>
arch/x86/kvm/x86.c