diff options
Diffstat (limited to 'arch/x86/kvm/lapic.c')
-rw-r--r-- | arch/x86/kvm/lapic.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/arch/x86/kvm/lapic.c b/arch/x86/kvm/lapic.c index a23f42e550af..44f20cdb5709 100644 --- a/arch/x86/kvm/lapic.c +++ b/arch/x86/kvm/lapic.c | |||
@@ -424,7 +424,9 @@ static void apic_set_eoi(struct kvm_lapic *apic) | |||
424 | trigger_mode = IOAPIC_LEVEL_TRIG; | 424 | trigger_mode = IOAPIC_LEVEL_TRIG; |
425 | else | 425 | else |
426 | trigger_mode = IOAPIC_EDGE_TRIG; | 426 | trigger_mode = IOAPIC_EDGE_TRIG; |
427 | mutex_lock(&apic->vcpu->kvm->irq_lock); | ||
427 | kvm_ioapic_update_eoi(apic->vcpu->kvm, vector, trigger_mode); | 428 | kvm_ioapic_update_eoi(apic->vcpu->kvm, vector, trigger_mode); |
429 | mutex_unlock(&apic->vcpu->kvm->irq_lock); | ||
428 | } | 430 | } |
429 | 431 | ||
430 | static void apic_send_ipi(struct kvm_lapic *apic) | 432 | static void apic_send_ipi(struct kvm_lapic *apic) |
@@ -448,7 +450,9 @@ static void apic_send_ipi(struct kvm_lapic *apic) | |||
448 | irq.trig_mode, irq.level, irq.dest_mode, irq.delivery_mode, | 450 | irq.trig_mode, irq.level, irq.dest_mode, irq.delivery_mode, |
449 | irq.vector); | 451 | irq.vector); |
450 | 452 | ||
453 | mutex_lock(&apic->vcpu->kvm->irq_lock); | ||
451 | kvm_irq_delivery_to_apic(apic->vcpu->kvm, apic, &irq); | 454 | kvm_irq_delivery_to_apic(apic->vcpu->kvm, apic, &irq); |
455 | mutex_unlock(&apic->vcpu->kvm->irq_lock); | ||
452 | } | 456 | } |
453 | 457 | ||
454 | static u32 apic_get_tmcct(struct kvm_lapic *apic) | 458 | static u32 apic_get_tmcct(struct kvm_lapic *apic) |