x86/IO-APIC: adjust setting of destinations
authorJan Beulich <jbeulich@suse.com>
Mon, 16 Nov 2015 12:11:59 +0000 (13:11 +0100)
committerJan Beulich <jbeulich@suse.com>
Mon, 16 Nov 2015 12:11:59 +0000 (13:11 +0100)
setup_IO_APIC_irqs() runs before APs get brought up, so using
desc->arch.cpu_mask as best risks it being either empty or having bits
for CPUs other than the BP set. Just use the APIC ID of the only
online CPU directly.

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

index 511cd4014c7f24c0608a87b84172adc85ad4cc65..6a71cef7f8d78024bb551cf5030b50ed28147604 100644 (file)
@@ -1039,7 +1039,7 @@ static void __init setup_IO_APIC_irqs(void)
                 disable_8259A_irq(irq_to_desc(irq));
 
             desc = irq_to_desc(irq);
-            SET_DEST(entry, logical, cpu_mask_to_apicid(desc->arch.cpu_mask));
+            SET_DEST(entry, logical, get_apic_id());
             spin_lock_irqsave(&ioapic_lock, flags);
             __ioapic_write_entry(apic, pin, 0, entry);
             set_native_irq_info(irq, TARGET_CPUS);