mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-09 18:44:58 -06:00
kvm: set gsi_bits and max_gsi correctly
The current kvm_init_irq_routing() doesn't set up the used_gsi_bitmap correctly, and as a consequence pins max_gsi to 32 when it really should be 1024. I ran into this limitation while testing pci passthrough, where I consistently got an -ENOSPC return from kvm_get_irq_route_gsi() called from assigned_dev_update_msix_mmio(). Signed-off-by: Jason Baron <jbaron@redhat.com> Acked-by: Alex Williamson <alex.williamson@redhat.com> Acked-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
This commit is contained in:
parent
c73b00973b
commit
bc8c6788b6
1 changed files with 1 additions and 1 deletions
|
@ -871,7 +871,7 @@ static void kvm_init_irq_routing(KVMState *s)
|
||||||
unsigned int gsi_bits, i;
|
unsigned int gsi_bits, i;
|
||||||
|
|
||||||
/* Round up so we can search ints using ffs */
|
/* 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->used_gsi_bitmap = g_malloc0(gsi_bits / 8);
|
||||||
s->max_gsi = gsi_bits;
|
s->max_gsi = gsi_bits;
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue