diff options
Diffstat (limited to 'arch/x86/kvm/i8254.c')
-rw-r--r-- | arch/x86/kvm/i8254.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/arch/x86/kvm/i8254.c b/arch/x86/kvm/i8254.c index b6fcf5a9e502..e665d1c623ca 100644 --- a/arch/x86/kvm/i8254.c +++ b/arch/x86/kvm/i8254.c | |||
@@ -620,11 +620,12 @@ static void __inject_pit_timer_intr(struct kvm *kvm) | |||
620 | * LVT0 to NMI delivery. Other PIC interrupts are just sent to | 620 | * LVT0 to NMI delivery. Other PIC interrupts are just sent to |
621 | * VCPU0, and only if its LVT0 is in EXTINT mode. | 621 | * VCPU0, and only if its LVT0 is in EXTINT mode. |
622 | */ | 622 | */ |
623 | for (i = 0; i < KVM_MAX_VCPUS; ++i) { | 623 | if (kvm->arch.vapics_in_nmi_mode > 0) |
624 | vcpu = kvm->vcpus[i]; | 624 | for (i = 0; i < KVM_MAX_VCPUS; ++i) { |
625 | if (vcpu) | 625 | vcpu = kvm->vcpus[i]; |
626 | kvm_apic_nmi_wd_deliver(vcpu); | 626 | if (vcpu) |
627 | } | 627 | kvm_apic_nmi_wd_deliver(vcpu); |
628 | } | ||
628 | } | 629 | } |
629 | 630 | ||
630 | void kvm_inject_pit_timer_irqs(struct kvm_vcpu *vcpu) | 631 | void kvm_inject_pit_timer_irqs(struct kvm_vcpu *vcpu) |