]> git.proxmox.com Git - qemu.git/blobdiff - kvm-all.c
qcow2: lock on prealloc
[qemu.git] / kvm-all.c
index 5ff954abd7aa773ec7323a80622dd550ef1c870c..b8e9dc69de598dc2b8cd4774ccbb5cfe0861d86d 100644 (file)
--- a/kvm-all.c
+++ b/kvm-all.c
@@ -871,7 +871,7 @@ static void kvm_init_irq_routing(KVMState *s)
         unsigned int gsi_bits, i;
 
         /* Round up so we can search ints using ffs */
-        gsi_bits = (gsi_count + 31) / 32;
+        gsi_bits = ALIGN(gsi_count, 32);
         s->used_gsi_bitmap = g_malloc0(gsi_bits / 8);
         s->max_gsi = gsi_bits;