]> xenbits.xensource.com Git - people/sstabellini/xen-unstable.git/.git/commitdiff
x86/x2APIC: tighten check in cluster mode IPI sending
authorJan Beulich <jbeulich@suse.com>
Mon, 17 Jun 2019 15:38:35 +0000 (17:38 +0200)
committerJan Beulich <jbeulich@suse.com>
Mon, 17 Jun 2019 15:38:35 +0000 (17:38 +0200)
It is only of limited use to check the full accumulated 32-bit value,
because the high halves are the cluster ID. What needs to be non-zero is
the bit map at the bottom, or else APIC errors will result.

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
xen/arch/x86/genapic/x2apic.c

index 334dae527e0052a9f0874585acb021bbc81b9d33..74907e6002661f09e9f3802f352cce3840a1f2d0 100644 (file)
@@ -154,7 +154,7 @@ static void send_IPI_mask_x2apic_cluster(const cpumask_t *cpumask, int vector)
             msr_content |= per_cpu(cpu_2_logical_apicid, cpu);
         }
 
-        BUG_ON(!msr_content);
+        BUG_ON(!(msr_content & 0xffff));
         msr_content = (msr_content << 32) | APIC_DM_FIXED |
                       APIC_DEST_LOGICAL | vector;
         apic_wrmsr(APIC_ICR, msr_content);