aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/kvm/lapic.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/x86/kvm/lapic.c')
-rw-r--r--arch/x86/kvm/lapic.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/arch/x86/kvm/lapic.c b/arch/x86/kvm/lapic.c
index 2cbee9479ce4..68a6b1511934 100644
--- a/arch/x86/kvm/lapic.c
+++ b/arch/x86/kvm/lapic.c
@@ -647,6 +647,10 @@ static void start_apic_timer(struct kvm_lapic *apic)
647 apic->timer.period = apic_get_reg(apic, APIC_TMICT) * 647 apic->timer.period = apic_get_reg(apic, APIC_TMICT) *
648 APIC_BUS_CYCLE_NS * apic->timer.divide_count; 648 APIC_BUS_CYCLE_NS * apic->timer.divide_count;
649 atomic_set(&apic->timer.pending, 0); 649 atomic_set(&apic->timer.pending, 0);
650
651 if (!apic->timer.period)
652 return;
653
650 hrtimer_start(&apic->timer.dev, 654 hrtimer_start(&apic->timer.dev,
651 ktime_add_ns(now, apic->timer.period), 655 ktime_add_ns(now, apic->timer.period),
652 HRTIMER_MODE_ABS); 656 HRTIMER_MODE_ABS);