There is a bug in the APIC V09 patch when porting Xen find_highest_vector to find_highest_bit, here is the prototype fix. (Not tested)
diff --git a/drivers/kvm/lapic.c b/drivers/kvm/lapic.c index 602e94c..64264a0 100644 --- a/drivers/kvm/lapic.c +++ b/drivers/kvm/lapic.c @@ -62,12 +62,21 @@ struct kvm_kern_apic { void *regs; }; +static int find_highest_vector(void *bitmap) +{ + u32 *word = bitmap; + int word_offset = MAX_APIC_VECTOR / 32; + + /* Work backwards through the bitmap (first 32-bit word in every four). */ + while ( (word_offset != 0) && (word[(--word_offset)*4] == 0) ) + continue; + + return (fls(word[word_offset*4]) - 1) + (word_offset * 32); +} + static __inline__ int find_highest_bit(unsigned long *data, int nr_bits) { - int length = BITS_TO_LONGS(nr_bits); - while (length && !data[--length]) - continue; - return __ffs(data[length]) + (length * BITS_PER_LONG); + return find_highest_vector(data); } #define APIC_LVT_NUM 6 ------------------------------------------------------------------------- This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ _______________________________________________ kvm-devel mailing list kvm-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/kvm-devel