* [PATCH] kvm: set gsi_bits and max_gsi correctly
@ 2012-03-28 18:18 ` Jason Baron
0 siblings, 0 replies; 7+ messages in thread
From: Jason Baron @ 2012-03-28 18:18 UTC (permalink / raw)
To: kvm; +Cc: qemu-devel, jan.kiszka, alex.williamson
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>
---
kvm-all.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/kvm-all.c b/kvm-all.c
index ab88c7c..b616c7d 100644
--- a/kvm-all.c
+++ b/kvm-all.c
@@ -873,7 +873,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.1
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [Qemu-devel] [PATCH] kvm: set gsi_bits and max_gsi correctly
@ 2012-03-28 18:18 ` Jason Baron
0 siblings, 0 replies; 7+ messages in thread
From: Jason Baron @ 2012-03-28 18:18 UTC (permalink / raw)
To: kvm; +Cc: jan.kiszka, alex.williamson, qemu-devel
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>
---
kvm-all.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/kvm-all.c b/kvm-all.c
index ab88c7c..b616c7d 100644
--- a/kvm-all.c
+++ b/kvm-all.c
@@ -873,7 +873,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.1
^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [PATCH] kvm: set gsi_bits and max_gsi correctly
2012-03-28 18:18 ` [Qemu-devel] " Jason Baron
@ 2012-03-28 18:20 ` Alex Williamson
-1 siblings, 0 replies; 7+ messages in thread
From: Alex Williamson @ 2012-03-28 18:20 UTC (permalink / raw)
To: Jason Baron; +Cc: kvm, qemu-devel, jan.kiszka
On Wed, 2012-03-28 at 14:18 -0400, Jason Baron wrote:
> 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>
> ---
> kvm-all.c | 2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/kvm-all.c b/kvm-all.c
> index ab88c7c..b616c7d 100644
> --- a/kvm-all.c
> +++ b/kvm-all.c
> @@ -873,7 +873,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;
>
Acked-by: Alex Williamson <alex.williamson@redhat.com>
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [Qemu-devel] [PATCH] kvm: set gsi_bits and max_gsi correctly
@ 2012-03-28 18:20 ` Alex Williamson
0 siblings, 0 replies; 7+ messages in thread
From: Alex Williamson @ 2012-03-28 18:20 UTC (permalink / raw)
To: Jason Baron; +Cc: jan.kiszka, qemu-devel, kvm
On Wed, 2012-03-28 at 14:18 -0400, Jason Baron wrote:
> 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>
> ---
> kvm-all.c | 2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/kvm-all.c b/kvm-all.c
> index ab88c7c..b616c7d 100644
> --- a/kvm-all.c
> +++ b/kvm-all.c
> @@ -873,7 +873,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;
>
Acked-by: Alex Williamson <alex.williamson@redhat.com>
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] kvm: set gsi_bits and max_gsi correctly
2012-03-28 18:20 ` [Qemu-devel] " Alex Williamson
@ 2012-03-28 18:27 ` Jan Kiszka
-1 siblings, 0 replies; 7+ messages in thread
From: Jan Kiszka @ 2012-03-28 18:27 UTC (permalink / raw)
To: Avi Kivity, Marcelo Tosatti; +Cc: Alex Williamson, Jason Baron, kvm, qemu-devel
On 2012-03-28 20:20, Alex Williamson wrote:
> On Wed, 2012-03-28 at 14:18 -0400, Jason Baron wrote:
>> 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>
>> ---
>> kvm-all.c | 2 +-
>> 1 files changed, 1 insertions(+), 1 deletions(-)
>>
>> diff --git a/kvm-all.c b/kvm-all.c
>> index ab88c7c..b616c7d 100644
>> --- a/kvm-all.c
>> +++ b/kvm-all.c
>> @@ -873,7 +873,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;
>>
>
> Acked-by: Alex Williamson <alex.williamson@redhat.com>
>
Acked-by: Jan Kiszka <jan.kiszka@siemens.com>
Tagging this as "PATCH uq/master" may help Avi and Marcelo to identify
and pick it up for that queue.
Thanks,
Jan
--
Siemens AG, Corporate Technology, CT T DE IT 1
Corporate Competence Center Embedded Linux
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [Qemu-devel] [PATCH] kvm: set gsi_bits and max_gsi correctly
@ 2012-03-28 18:27 ` Jan Kiszka
0 siblings, 0 replies; 7+ messages in thread
From: Jan Kiszka @ 2012-03-28 18:27 UTC (permalink / raw)
To: Avi Kivity, Marcelo Tosatti; +Cc: Alex Williamson, Jason Baron, kvm, qemu-devel
On 2012-03-28 20:20, Alex Williamson wrote:
> On Wed, 2012-03-28 at 14:18 -0400, Jason Baron wrote:
>> 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>
>> ---
>> kvm-all.c | 2 +-
>> 1 files changed, 1 insertions(+), 1 deletions(-)
>>
>> diff --git a/kvm-all.c b/kvm-all.c
>> index ab88c7c..b616c7d 100644
>> --- a/kvm-all.c
>> +++ b/kvm-all.c
>> @@ -873,7 +873,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;
>>
>
> Acked-by: Alex Williamson <alex.williamson@redhat.com>
>
Acked-by: Jan Kiszka <jan.kiszka@siemens.com>
Tagging this as "PATCH uq/master" may help Avi and Marcelo to identify
and pick it up for that queue.
Thanks,
Jan
--
Siemens AG, Corporate Technology, CT T DE IT 1
Corporate Competence Center Embedded Linux
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] kvm: set gsi_bits and max_gsi correctly
2012-03-28 18:18 ` [Qemu-devel] " Jason Baron
(?)
(?)
@ 2012-04-11 2:14 ` Marcelo Tosatti
-1 siblings, 0 replies; 7+ messages in thread
From: Marcelo Tosatti @ 2012-04-11 2:14 UTC (permalink / raw)
To: Jason Baron; +Cc: kvm, qemu-devel, jan.kiszka, alex.williamson
On Wed, Mar 28, 2012 at 02:18:05PM -0400, Jason Baron wrote:
> 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>
Applied to uq/master, thanks.
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2012-04-11 2:18 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-03-28 18:18 [PATCH] kvm: set gsi_bits and max_gsi correctly Jason Baron
2012-03-28 18:18 ` [Qemu-devel] " Jason Baron
2012-03-28 18:20 ` Alex Williamson
2012-03-28 18:20 ` [Qemu-devel] " Alex Williamson
2012-03-28 18:27 ` Jan Kiszka
2012-03-28 18:27 ` [Qemu-devel] " Jan Kiszka
2012-04-11 2:14 ` Marcelo Tosatti
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.