diff options
| -rw-r--r-- | arch/x86/kvm/lapic.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/arch/x86/kvm/lapic.c b/arch/x86/kvm/lapic.c index 5439117d5c4c..89b52ec7d09c 100644 --- a/arch/x86/kvm/lapic.c +++ b/arch/x86/kvm/lapic.c | |||
| @@ -841,7 +841,8 @@ static u32 apic_get_tmcct(struct kvm_lapic *apic) | |||
| 841 | ASSERT(apic != NULL); | 841 | ASSERT(apic != NULL); |
| 842 | 842 | ||
| 843 | /* if initial count is 0, current count should also be 0 */ | 843 | /* if initial count is 0, current count should also be 0 */ |
| 844 | if (kvm_apic_get_reg(apic, APIC_TMICT) == 0) | 844 | if (kvm_apic_get_reg(apic, APIC_TMICT) == 0 || |
| 845 | apic->lapic_timer.period == 0) | ||
| 845 | return 0; | 846 | return 0; |
| 846 | 847 | ||
| 847 | remaining = hrtimer_get_remaining(&apic->lapic_timer.timer); | 848 | remaining = hrtimer_get_remaining(&apic->lapic_timer.timer); |
