Stefano Stabellini
2011-Sep-09 16:14 UTC
[Xen-devel] [PATCH] xen: if mapping GSIs we run out of pirq < nr_irqs_gsi, use the others
PV on HVM guests can have more GSIs than the host, in that case we could
run out of pirq < nr_irqs_gsi. When that happens use pirq >nr_irqs_gsi
rather than returning an error.
This patch should be backported to xen 4.1, the backport is attached.
Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Tested-by: Benjamin Schweikert <b.schweikert@googlemail.com>
diff -r 5260d04148cb xen/arch/x86/irq.c
--- a/xen/arch/x86/irq.c Fri Sep 09 11:03:38 2011 +0000
+++ b/xen/arch/x86/irq.c Fri Sep 09 15:06:40 2011 +0000
@@ -1646,15 +1646,12 @@ int get_free_pirq(struct domain *d, int
return i;
}
}
- else
- {
- for ( i = d->nr_pirqs - 1; i >= nr_irqs_gsi; i-- )
- if ( is_free_pirq(d, pirq_info(d, i)) )
- {
- pirq_get_info(d, i);
- return i;
- }
- }
+ for ( i = d->nr_pirqs - 1; i >= nr_irqs_gsi; i-- )
+ if ( is_free_pirq(d, pirq_info(d, i)) )
+ {
+ pirq_get_info(d, i);
+ return i;
+ }
return -ENOSPC;
}
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xensource.com
http://lists.xensource.com/xen-devel