On Sun, Aug 23, 2009 at 02:46:38PM +0300, Avi Kivity wrote: > On 08/23/2009 02:36 PM, Gleb Natapov wrote: > >>> > >>>The problem is that at this level it is not known if GSI is MSI or not. > >>>Current code dials with this by arbitrary assuming that GSI is MSI if it > >>>is greater then KVM_IOAPIC_NUM_PINS, but this is not enforced when > >>>routing table is installed and userspace is free to use any GSI as MSI. > >>>Of cause this problem would not exist if MSIs were not linked to GSIs > >>>in the first place. > >>Does msi actually care about the states? I don't think it does. > >> > >That is the point. MSI doesn't care, but we don't know if GSI is MSI or > >not. > > So we toggle the bits needlessly. Just like with edge-triggered interrupts. If we can avoid it why not? > >>No, it's more correct at the GSI level, since all interrupt lines > >>connected to one GSI are shared. > >> > >Why? All interrupts connected to the same irqchip pin (through pci irq > >router or other onboard logic) are shared. GSI is pure logical > >abstraction. > > All interrupts connected through one GSI are shared, so why not keep > the level information shared as well? > If we will keep sharing info at irq routing table level how will we recalculate sharing state when irq routing table changes? -- 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