The guest calls assign_irq_vector() to assign one if it doesn't have one,
and to find out the vector if it does have one.
If the cpu mask passed intersects with the existing mask, the old vector
is simply returned.
However, if the irq happens to be in transit at the time, this returns
EBUSY. This is unnecessary if, as soon as the irq migration succeeds,
the logic would just return the old vector anyway.
This patch makes two changes:
* Switch the checks, so if the mask overlaps it always returns
* Return -EAGAIN instead of -EBUSY for moving irqs, to let the caller
know that the failure is temporary and may work if repeated.
This fixes a bug where on certain hardware, using the credit2 scheduler,
a pvops kernel with multiple vcpus doesn't boot.
Signed-off-by: George Dunlap <george.dunlap@xxxxxxxxxxxxx>
diff -r 79b71c77907b -r 250fa1558b16 xen/arch/x86/irq.c
--- a/xen/arch/x86/irq.c Wed Nov 24 10:20:03 2010 +0000
+++ b/xen/arch/x86/irq.c Thu Nov 25 18:07:05 2010 +0000
@@ -348,9 +348,6 @@
int cpu, err;
cpumask_t tmp_mask;
- if ((cfg->move_in_progress) || cfg->move_cleanup_count)
- return -EBUSY;
-
old_vector = irq_to_vector(irq);
if (old_vector) {
cpus_and(tmp_mask, mask, cpu_online_map);
@@ -361,6 +358,9 @@
}
}
+ if ((cfg->move_in_progress) || cfg->move_cleanup_count)
+ return -EAGAIN;
+
/* Only try and allocate irqs on cpus that are present */
cpus_and(mask, mask, cpu_online_map);
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel
|