[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-changelog] on_selected_cpus() must not send IPIs with empty target masks.



# HG changeset patch
# User kaf24@xxxxxxxxxxxxxxxxxxxx
# Node ID b7295a83206e7924d7703a9b22ffe6392dc8fdb8
# Parent  8f722ac17efa4ba84eb6c678c7f33dab82fceb3e
on_selected_cpus() must not send IPIs with empty target masks.
This causes send accept errors on Pentium/P6 .

Signed-off-by: Keir Fraser <keir@xxxxxxxxxxxxx>

diff -r 8f722ac17efa -r b7295a83206e xen/arch/x86/smp.c
--- a/xen/arch/x86/smp.c        Thu Mar 23 16:37:37 2006
+++ b/xen/arch/x86/smp.c        Thu Mar 23 17:47:43 2006
@@ -106,6 +106,16 @@
     __send_IPI_shortcut(APIC_DEST_SELF, vector);
 }
 
+static inline void check_IPI_mask(cpumask_t cpumask)
+{
+    /*
+     * Sanity, and necessary. An IPI with no target generates a send accept
+     * error with Pentium and P6 APICs.
+     */
+    ASSERT(cpus_subset(cpumask, cpu_online_map));
+    ASSERT(!cpus_empty(cpumask));
+}
+
 /*
  * This is only used on smaller machines.
  */
@@ -115,6 +125,8 @@
     unsigned long cfg;
     unsigned long flags;
 
+    check_IPI_mask(cpumask);
+
     local_irq_save(flags);
 
     /*
@@ -145,6 +157,8 @@
 {
     unsigned long cfg, flags;
     unsigned int query_cpu;
+
+    check_IPI_mask(mask);
 
     /*
      * Hack. The clustered APIC addressing mode doesn't allow us to send 
@@ -304,6 +318,9 @@
 
     ASSERT(local_irq_is_enabled());
 
+    if ( nr_cpus == 0 )
+        return 0;
+
     data.func = func;
     data.info = info;
     data.wait = wait;

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.