|
|
|
|
|
|
|
|
|
|
xen-changelog
[Xen-changelog] [xen-4.1-testing] xen: if mapping GSIs we run out of pir
# HG changeset patch
# User Stefano Stabellini <stefano.stabellini@xxxxxxxxxxxxx>
# Date 1315906544 -3600
# Node ID 08568ad1140addd33566b2ec51230459efd96629
# Parent 78d8c5227bb1b575e299ef76fcbe97676bd2a4fb
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.
Signed-off-by: Stefano Stabellini <stefano.stabellini@xxxxxxxxxxxxx>
Tested-by: Benjamin Schweikert <b.schweikert@xxxxxxxxxxxxxx>
xen-unstable changeset: 23832:ad3b4bb097cb
xen-unstable date: Tue Sep 13 10:32:24 2011 +0100
---
diff -r 78d8c5227bb1 -r 08568ad1140a xen/arch/x86/irq.c
--- a/xen/arch/x86/irq.c Thu Sep 08 12:24:35 2011 +0100
+++ b/xen/arch/x86/irq.c Tue Sep 13 10:35:44 2011 +0100
@@ -1463,24 +1463,18 @@
{
if ( !is_hvm_domain(d) ||
d->arch.pirq_emuirq[i] == IRQ_UNBOUND )
- break;
+ return i;
}
- if ( i == nr_irqs_gsi )
- return -ENOSPC;
}
- else
- {
- for ( i = d->nr_pirqs - 1; i >= nr_irqs_gsi; i-- )
- if ( !d->arch.pirq_irq[i] )
- {
- if ( !is_hvm_domain(d) ||
- d->arch.pirq_emuirq[i] == IRQ_UNBOUND )
- break;
- }
- if ( i < nr_irqs_gsi )
- return -ENOSPC;
- }
-
+ for ( i = d->nr_pirqs - 1; i >= nr_irqs_gsi; i-- )
+ if ( !d->arch.pirq_irq[i] )
+ {
+ if ( !is_hvm_domain(d) ||
+ d->arch.pirq_emuirq[i] == IRQ_UNBOUND )
+ break;
+ }
+ if ( i < nr_irqs_gsi )
+ return -ENOSPC;
return i;
}
_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog
|
<Prev in Thread] |
Current Thread |
[Next in Thread> |
- [Xen-changelog] [xen-4.1-testing] xen: if mapping GSIs we run out of pirq < nr_irqs_gsi, use the others,
Xen patchbot-4 . 1-testing <=
|
|
|
|
|