aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/kvm
diff options
context:
space:
mode:
Diffstat (limited to 'arch/x86/kvm')
-rw-r--r--arch/x86/kvm/lapic.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/arch/x86/kvm/lapic.c b/arch/x86/kvm/lapic.c
index 6aa8d20f9eeb..afc59b2e7e02 100644
--- a/arch/x86/kvm/lapic.c
+++ b/arch/x86/kvm/lapic.c
@@ -483,9 +483,10 @@ static void apic_send_ipi(struct kvm_lapic *apic)
483 483
484 struct kvm_vcpu *target; 484 struct kvm_vcpu *target;
485 struct kvm_vcpu *vcpu; 485 struct kvm_vcpu *vcpu;
486 unsigned long lpr_map = 0; 486 DECLARE_BITMAP(lpr_map, KVM_MAX_VCPUS);
487 int i; 487 int i;
488 488
489 bitmap_zero(lpr_map, KVM_MAX_VCPUS);
489 apic_debug("icr_high 0x%x, icr_low 0x%x, " 490 apic_debug("icr_high 0x%x, icr_low 0x%x, "
490 "short_hand 0x%x, dest 0x%x, trig_mode 0x%x, level 0x%x, " 491 "short_hand 0x%x, dest 0x%x, trig_mode 0x%x, level 0x%x, "
491 "dest_mode 0x%x, delivery_mode 0x%x, vector 0x%x\n", 492 "dest_mode 0x%x, delivery_mode 0x%x, vector 0x%x\n",
@@ -500,7 +501,7 @@ static void apic_send_ipi(struct kvm_lapic *apic)
500 if (vcpu->arch.apic && 501 if (vcpu->arch.apic &&
501 apic_match_dest(vcpu, apic, short_hand, dest, dest_mode)) { 502 apic_match_dest(vcpu, apic, short_hand, dest, dest_mode)) {
502 if (delivery_mode == APIC_DM_LOWEST) 503 if (delivery_mode == APIC_DM_LOWEST)
503 set_bit(vcpu->vcpu_id, &lpr_map); 504 __set_bit(vcpu->vcpu_id, lpr_map);
504 else 505 else
505 __apic_accept_irq(vcpu->arch.apic, delivery_mode, 506 __apic_accept_irq(vcpu->arch.apic, delivery_mode,
506 vector, level, trig_mode); 507 vector, level, trig_mode);
@@ -508,7 +509,7 @@ static void apic_send_ipi(struct kvm_lapic *apic)
508 } 509 }
509 510
510 if (delivery_mode == APIC_DM_LOWEST) { 511 if (delivery_mode == APIC_DM_LOWEST) {
511 target = kvm_get_lowest_prio_vcpu(vcpu->kvm, vector, &lpr_map); 512 target = kvm_get_lowest_prio_vcpu(vcpu->kvm, vector, lpr_map);
512 if (target != NULL) 513 if (target != NULL)
513 __apic_accept_irq(target->arch.apic, delivery_mode, 514 __apic_accept_irq(target->arch.apic, delivery_mode,
514 vector, level, trig_mode); 515 vector, level, trig_mode);