On Sun, 2009-05-17 at 23:54 +0300, Avi Kivity wrote: > Alex Williamson wrote: > > We're currently using a counter to track the most recent GSI we've > > handed out. This quickly hits KVM_MAX_IRQ_ROUTES when using device > > assignment with a driver that regularly toggles the MSI enable bit. > > This can mean only a few minutes of usable run time. Instead, track > > used GSIs in a bitmap. > > > > v6: Make use of ALIGN macro, per Michael > > Define KVM_IOAPIC_NUM_PINS if not already, per Michael > > > > Due to me being slow I nacked this after you prepared the new patch. Sorry. > > We could define have platform_gsis passed from qemu to tell us how many > GSIs to reserve (let's pretend libkvm isn't on death row for a moment). Perhaps we should update the bitmap on entry points that everyone uses so we don't have to worry about preallocating. We could set the bitmap in kvm_add_routing_entry() and clear it in kvm_del_routing_entry(). This would mean that kvm_del_routing_entry() implicitly gives up a GSI obtained via kvm_get_irq_route_gsi(), which seems to be the assumption already. That would eliminate any need for proliferating KVM_CAP_IRQ_ROUTING ifdefs or doing anything based on KVM_IOAPIC_NUM_PINS, but should I keep the KVM_CAP_IRQ_ROUTING around the new code for documentation purposes? Thanks, Alex -- 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