[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 5/7] kvm: set gsi_bits and max_gsi correctly
From: |
Marcelo Tosatti |
Subject: |
[Qemu-devel] [PATCH 5/7] kvm: set gsi_bits and max_gsi correctly |
Date: |
Thu, 12 Apr 2012 22:32:40 -0300 |
From: Jason Baron <address@hidden>
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 <address@hidden>
Acked-by: Alex Williamson <address@hidden>
Acked-by: Jan Kiszka <address@hidden>
Signed-off-by: Marcelo Tosatti <address@hidden>
---
kvm-all.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/kvm-all.c b/kvm-all.c
index 5ff954a..b8e9dc6 100644
--- 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;
--
1.7.6.4
- [Qemu-devel] [PATCH 0/7] [PULL] qemu-kvm.git uq/master queue, Marcelo Tosatti, 2012/04/12
- [Qemu-devel] [PATCH 6/7] kvm: update linux headers, Marcelo Tosatti, 2012/04/12
- [Qemu-devel] [PATCH 2/7] kvm: Drop redundant kvm_enabled from cpu_thread_is_idle, Marcelo Tosatti, 2012/04/12
- [Qemu-devel] [PATCH 3/7] kvm: allow arbitrarily sized mmio ioeventfd, Marcelo Tosatti, 2012/04/12
- [Qemu-devel] [PATCH 1/7] kvm: add flightrecorder script, Marcelo Tosatti, 2012/04/12
- [Qemu-devel] [PATCH 5/7] kvm: set gsi_bits and max_gsi correctly,
Marcelo Tosatti <=
- [Qemu-devel] [PATCH 7/7] kvmclock: guest stop notification, Marcelo Tosatti, 2012/04/12
- [Qemu-devel] [PATCH 4/7] kvm: Drop unused kvm_pit_in_kernel, Marcelo Tosatti, 2012/04/12
- Re: [Qemu-devel] [PATCH 0/7] [PULL] qemu-kvm.git uq/master queue, Anthony Liguori, 2012/04/13