aboutsummaryrefslogtreecommitdiffstats
path: root/virt/kvm
diff options
context:
space:
mode:
authorMichael S. Tsirkin <mst@redhat.com>2009-07-05 14:27:58 -0400
committerAvi Kivity <avi@redhat.com>2009-09-10 01:33:10 -0400
commit07fb8bb29f5269f30afa6f1b3d941406677f6ad2 (patch)
treee18ff9ca00dfb917f049cd349249d7bab71cae3b /virt/kvm
parentf7c6d140032ae7e80df36d350c6edc41f92b2f94 (diff)
KVM: ignore msi request if !level
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 <mst@redhat.com> Signed-off-by: Avi Kivity <avi@redhat.com>
Diffstat (limited to 'virt/kvm')
-rw-r--r--virt/kvm/irq_comm.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/virt/kvm/irq_comm.c b/virt/kvm/irq_comm.c
index 56e696104d43..a9d7fd1f1d6a 100644
--- a/virt/kvm/irq_comm.c
+++ b/virt/kvm/irq_comm.c
@@ -139,7 +139,9 @@ int kvm_set_irq(struct kvm *kvm, int irq_source_id, int irq, int level)
139 else 139 else
140 clear_bit(irq_source_id, irq_state); 140 clear_bit(irq_source_id, irq_state);
141 sig_level = !!(*irq_state); 141 sig_level = !!(*irq_state);
142 } else /* Deal with MSI/MSI-X */ 142 } else if (!level)
143 return ret;
144 else /* Deal with MSI/MSI-X */
143 sig_level = 1; 145 sig_level = 1;
144 146
145 /* Not possible to detect if the guest uses the PIC or the 147 /* Not possible to detect if the guest uses the PIC or the