On Wed, Sep 29, 2010 at 09:17:14AM +0800, Sheng Yang wrote: > > > + else { > > > + enable_irq(irq); > > > + if (assigned_dev->guest_msix_entries[index].flags & > > > + KVM_ASSIGNED_MSIX_PENDING) > > > + schedule_work(&assigned_dev->interrupt_work); > > > + } > > > > Hmm, won't this lose interrupts which were sent while bit was pending? > > It is also pretty heavy if as you say guests touch the mask a lot. > > I think we must keep the interrupt disabled, just set a bit > > and delay interrupt injection until vector is unmasked > > or deleted. The interface to do this will need more thought: > > e.g. how can userspace clear this bit then? > > I think it's fine. Because we didn't modify pending bit here, and the interrupt > handler would schedule an work to check it regardless of if the IRQ is disable. By > this meaning, no interrupt would be lose. AFAICS unmasking the host irq will trigger pending message. If thats correct, it should be fine. -- To unsubscribe from this list: send the line "unsubscribe kvm" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html