]> xenbits.xensource.com Git - xen.git/commitdiff
x86: avoid wrong use of all-but-self IPI shorthand
authorJan Beulich <jbeulich@suse.com>
Fri, 10 Dec 2021 09:26:52 +0000 (10:26 +0100)
committerJan Beulich <jbeulich@suse.com>
Fri, 10 Dec 2021 09:26:52 +0000 (10:26 +0100)
With "nosmp" I did observe a flood of "APIC error on CPU0: 04(04), Send
accept error" log messages on an AMD system. And rightly so - nothing
excludes the use of the shorthand in send_IPI_mask() in this case. Set
"unaccounted_cpus" to "true" also when command line restrictions are the
cause.

Note that PV-shim mode is unaffected by this change, first and foremost
because "nosmp" and "maxcpus=" are ignored in this case.

Fixes: 5500d265a2a8 ("x86/smp: use APIC ALLBUT destination shorthand when possible")
Signed-off-by: Jan Beulich <jbeulich@suse.com>
Acked-by: Andrew Cooper <andrew.cooper3@citrix.com>
xen/arch/x86/mpparse.c

index 42b5ac7871b882999ba5f117c7c321427562f4e6..8faac289ea9b11f30365b09b262892c1178cf23f 100644 (file)
@@ -84,9 +84,14 @@ void __init set_nr_cpu_ids(unsigned int max_cpus)
        if (!park_offline_cpus)
                tot_cpus = max_cpus;
        nr_cpu_ids = min(tot_cpus, NR_CPUS + 0u);
-       if (park_offline_cpus && nr_cpu_ids < num_processors)
-               printk(XENLOG_WARNING "SMP: Cannot bring up %u further CPUs\n",
-                      num_processors - nr_cpu_ids);
+       if (nr_cpu_ids < num_processors)
+       {
+               unaccounted_cpus = true;
+               if (park_offline_cpus)
+                       printk(XENLOG_WARNING
+                              "SMP: Cannot bring up %u further CPUs\n",
+                              num_processors - nr_cpu_ids);
+       }
 
 #ifndef nr_cpumask_bits
        nr_cpumask_bits = ROUNDUP(nr_cpu_ids, BITS_PER_LONG);