Skip to content

Commit

Permalink
KVM: ignore msi request if !level
Browse files Browse the repository at this point in the history
Irqfd sets level for interrupt to 1 and then to 0.
For MSI, check level so that a single message is sent.

Signed-off-by: Michael S. Tsirkin <[email protected]>
Signed-off-by: Avi Kivity <[email protected]>
  • Loading branch information
mstsirkin authored and avikivity committed Sep 10, 2009
1 parent f7c6d14 commit 07fb8bb
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion virt/kvm/irq_comm.c
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,9 @@ int kvm_set_irq(struct kvm *kvm, int irq_source_id, int irq, int level)
else
clear_bit(irq_source_id, irq_state);
sig_level = !!(*irq_state);
} else /* Deal with MSI/MSI-X */
} else if (!level)
return ret;
else /* Deal with MSI/MSI-X */
sig_level = 1;

/* Not possible to detect if the guest uses the PIC or the
Expand Down

0 comments on commit 07fb8bb

Please sign in to comment.