From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andrew Cooper Subject: Re: [PATCH] x86/IO-APIC: adjust setting of destinations Date: Fri, 13 Nov 2015 16:26:04 +0000 Message-ID: <56460F1C.2070305@citrix.com> References: <5646136202000078000B4CDE@prv-mh.provo.novell.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail6.bemta3.messagelabs.com ([195.245.230.39]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1ZxHAx-0005JI-J1 for xen-devel@lists.xenproject.org; Fri, 13 Nov 2015 16:26:11 +0000 In-Reply-To: <5646136202000078000B4CDE@prv-mh.provo.novell.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Jan Beulich , xen-devel Cc: Keir Fraser List-Id: xen-devel@lists.xenproject.org On 13/11/15 15:44, Jan Beulich wrote: > 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. Replace a stray hard_smp_processor_id() at once. > > Signed-off-by: Jan Beulich Surely this stray hard_smp_processor_id() needs to be merged into your previous patch to remove hard_smp_processor_id() ? As for the setup_IO_APIC_irqs() change, Reviewed-by: Andrew Cooper > > --- a/xen/arch/x86/io_apic.c > +++ b/xen/arch/x86/io_apic.c > @@ -1039,7 +1039,7 @@ static void __init setup_IO_APIC_irqs(vo > 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); > @@ -1843,7 +1843,7 @@ static void __init unlock_ExtINT_logic(v > > entry1.dest_mode = 0; /* physical delivery */ > entry1.mask = 0; /* unmask IRQ now */ > - SET_DEST(entry1, physical, hard_smp_processor_id()); > + SET_DEST(entry1, physical, get_apic_id()); > entry1.delivery_mode = dest_ExtINT; > entry1.polarity = entry0.polarity; > entry1.trigger = 0; > > >