From: Michael S. Tsirkin Date: Sun, 5 Jul 2009 18:27:58 +0000 (+0300) Subject: KVM: ignore msi request if !level X-Git-Tag: firefly_0821_release~12973^2~92 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=07fb8bb29f5269f30afa6f1b3d941406677f6ad2;p=firefly-linux-kernel-4.4.55.git 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 Signed-off-by: Avi Kivity --- 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) 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