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>
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);