On Sun, Aug 09, 2009 at 06:10:07PM +0300, Avi Kivity wrote: > On 08/09/2009 05:57 PM, Gleb Natapov wrote: >> On Sun, Aug 09, 2009 at 05:54:30PM +0300, Avi Kivity wrote: >> >>> On 08/09/2009 03:41 PM, Gleb Natapov wrote: >>> >>>> Introduce new function kvm_notifier_set_irq() that should be used >>>> to change irq line level from irq notifiers. When irq notifier >>>> change irq line level it calls into irq chip code recursively. The >>>> function avoids taking a lock recursively. >>>> >>>> >>> This looks really horrible. I don't have an alternative yet, but I'll >>> think of one. >>> >> I agree this is not nice. This is needed only for device assignment >> case. That explains why I don't like device assignment :) > > Well, implementation problems can be fixed. Other issues with device > assignment cannot. > >> The problem >> is that the only communication channel from guest to assigned device that >> goes through the host is interrupt injection/acknowledgement, so we try to >> do things (lowering IRQ) on this path that usually are done somewhere else. >> > > You can queue the injection somehow (work struct? special purpose queue > examined after unlock?) and avoid the recursive locking. > We can't. Line status should be update here and now. Otherwise interrupt will be immediately reinjected. -- Gleb. -- 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