diff options
Diffstat (limited to 'arch/x86/kvm/i8254.c')
-rw-r--r-- | arch/x86/kvm/i8254.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/arch/x86/kvm/i8254.c b/arch/x86/kvm/i8254.c index 59ebd37ad79e..580cc1d01c7d 100644 --- a/arch/x86/kvm/i8254.c +++ b/arch/x86/kvm/i8254.c | |||
@@ -603,10 +603,25 @@ void kvm_free_pit(struct kvm *kvm) | |||
603 | 603 | ||
604 | static void __inject_pit_timer_intr(struct kvm *kvm) | 604 | static void __inject_pit_timer_intr(struct kvm *kvm) |
605 | { | 605 | { |
606 | struct kvm_vcpu *vcpu; | ||
607 | int i; | ||
608 | |||
606 | mutex_lock(&kvm->lock); | 609 | mutex_lock(&kvm->lock); |
607 | kvm_set_irq(kvm, kvm->arch.vpit->irq_source_id, 0, 1); | 610 | kvm_set_irq(kvm, kvm->arch.vpit->irq_source_id, 0, 1); |
608 | kvm_set_irq(kvm, kvm->arch.vpit->irq_source_id, 0, 0); | 611 | kvm_set_irq(kvm, kvm->arch.vpit->irq_source_id, 0, 0); |
609 | mutex_unlock(&kvm->lock); | 612 | mutex_unlock(&kvm->lock); |
613 | |||
614 | /* | ||
615 | * Provides NMI watchdog support in IOAPIC mode. | ||
616 | * The route is: PIT -> PIC -> LVT0 in NMI mode, | ||
617 | * timer IRQs will continue to flow through the IOAPIC. | ||
618 | */ | ||
619 | for (i = 0; i < KVM_MAX_VCPUS; ++i) { | ||
620 | vcpu = kvm->vcpus[i]; | ||
621 | if (!vcpu) | ||
622 | continue; | ||
623 | kvm_apic_local_deliver(vcpu, APIC_LVT0); | ||
624 | } | ||
610 | } | 625 | } |
611 | 626 | ||
612 | void kvm_inject_pit_timer_irqs(struct kvm_vcpu *vcpu) | 627 | void kvm_inject_pit_timer_irqs(struct kvm_vcpu *vcpu) |