Skip to contentSkip to conversation

kvm: fail msi request if !level

PATCH Applied Michael S. Tsirkin 2 participants 2 messages Jul 5, 2009 – Jul 7, 2009 KVM

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 kvm: fail 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.

---
 virt/kvm/irq_comm.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)
virt/kvm/irq_comm.c +3 -1
index c380bf0..7af18b8 100644
@@ -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
Signature · 1 line
1.6.2.5
Applied
#1 lore raw
Quoted 3 lines · Michael S. Tsirkin

Irqfd sets level for interrupt to 1 and then to 0. For MSI, check level so that a single message is sent.

Applied, thanks.

Signature · 1 line
error compiling committee.c: too many arguments to function