diff options
Diffstat (limited to 'arch/x86/kvm/lapic.c')
-rw-r--r-- | arch/x86/kvm/lapic.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/arch/x86/kvm/lapic.c b/arch/x86/kvm/lapic.c index 9fde0ac24268..be94f93a73f6 100644 --- a/arch/x86/kvm/lapic.c +++ b/arch/x86/kvm/lapic.c | |||
@@ -439,7 +439,7 @@ struct kvm_vcpu *kvm_get_lowest_prio_vcpu(struct kvm *kvm, u8 vector, | |||
439 | static void apic_set_eoi(struct kvm_lapic *apic) | 439 | static void apic_set_eoi(struct kvm_lapic *apic) |
440 | { | 440 | { |
441 | int vector = apic_find_highest_isr(apic); | 441 | int vector = apic_find_highest_isr(apic); |
442 | 442 | int trigger_mode; | |
443 | /* | 443 | /* |
444 | * Not every write EOI will has corresponding ISR, | 444 | * Not every write EOI will has corresponding ISR, |
445 | * one example is when Kernel check timer on setup_IO_APIC | 445 | * one example is when Kernel check timer on setup_IO_APIC |
@@ -451,7 +451,10 @@ static void apic_set_eoi(struct kvm_lapic *apic) | |||
451 | apic_update_ppr(apic); | 451 | apic_update_ppr(apic); |
452 | 452 | ||
453 | if (apic_test_and_clear_vector(vector, apic->regs + APIC_TMR)) | 453 | if (apic_test_and_clear_vector(vector, apic->regs + APIC_TMR)) |
454 | kvm_ioapic_update_eoi(apic->vcpu->kvm, vector); | 454 | trigger_mode = IOAPIC_LEVEL_TRIG; |
455 | else | ||
456 | trigger_mode = IOAPIC_EDGE_TRIG; | ||
457 | kvm_ioapic_update_eoi(apic->vcpu->kvm, vector, trigger_mode); | ||
455 | } | 458 | } |
456 | 459 | ||
457 | static void apic_send_ipi(struct kvm_lapic *apic) | 460 | static void apic_send_ipi(struct kvm_lapic *apic) |