Use a bitmap for tracking used GSIs
commit8ea45650455de769872647900964a406876db405
authorAlex Williamson <alex.williamson@hp.com>
Tue, 19 May 2009 20:48:56 +0000 (19 14:48 -0600)
committerAvi Kivity <avi@redhat.com>
Wed, 20 May 2009 14:32:17 +0000 (20 17:32 +0300)
tree4cd687386d9d515aa5bc4617d26e2d54296323f8
parenta9cf44e07211adb97edffbe04061b8179a238f61
Use a bitmap for tracking used GSIs

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
(such as Linux kernels 2.6.21-26).  This can mean only a few minutes
of usable run time.  Instead, track used GSIs in a bitmap.

Signed-off-by: Alex Williamson <alex.williamson@hp.com>
Signed-off-by: Avi Kivity <avi@redhat.com>
kvm/libkvm/kvm-common.h
kvm/libkvm/libkvm.c