On Thu, Oct 02, 2008 at 04:27:18PM +0300, Avi Kivity wrote: > Yang, Sheng wrote: >> To deal with guest shared interrupt bug in in-kernel irqchip, we should: >> >> 1. Identify each level trig interrupt source. >> 2. Implement logical OR on the same IRQ line for each interrupt source. >> >> Here I chose a simple method: the caller of kvm_set_irq() has responsiblity >> to identify interrupt sources, and IOAPIC/PIC ensure logical OR on IRQ line. >> > > The downside is that every caller has to do this edge detection. > > How about allocating a vector of u32s (one per irq), and each source > will allocate a bit within this vector. The 'or' operation becomes > (word != 0).
Oh, that's what I called the "alternative" one... I just think the request/allocation/free make thing complicate and unnecessary for now, for we are already ensure that kvm_set_irq() are called in pair. I once think if we use resource allocating method, the irqs should bind with the resources, and it's unnecessary. But I think your method is better, reserve one bit for each source on every irq_state make things simpler. OK, I will update the patch following this method. -- regards Yang, Sheng -- To unsubscribe from this list: send the line "unsubscribe kvm" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
