On real hardware, edge-triggered interrupts don't set a bit in TMR,
which means that IOAPIC isn't notified on EOI.  Do the same here.
Staying in guest/kernel mode after edge EOI is what we want for most
devices.  If some bugs could be nicely worked around with edge EOI
notifications, we should invest in a better interface.
Signed-off-by: Radim Krčmář <rkrcmar@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
        for (i = 0; i < nr_ioapic_pins; ++i) {
                hlist_for_each_entry(entry, &table->map[i], link) {
                        u32 dest_id, dest_mode;
+                       bool level;
 
                        if (entry->type != KVM_IRQ_ROUTING_MSI)
                                continue;
                        dest_id = (entry->msi.address_lo >> 12) & 0xff;
                        dest_mode = (entry->msi.address_lo >> 2) & 0x1;
-                       if (kvm_apic_match_dest(vcpu, NULL, 0, dest_id,
-                                               dest_mode)) {
+                       level = entry->msi.data & MSI_DATA_TRIGGER_LEVEL;
+                       if (level && kvm_apic_match_dest(vcpu, NULL, 0,
+                                               dest_id, dest_mode)) {
                                u32 vector = entry->msi.data & 0xff;
 
                                __set_bit(vector,