From mboxrd@z Thu Jan 1 00:00:00 1970 From: Boris Ostrovsky Subject: Re: [PATCH] x86/IO-APIC: fix setting of destinations Date: Thu, 19 Nov 2015 09:19:34 -0500 Message-ID: <564DDA76.90001@oracle.com> References: <564DA86A02000078000B6A96@prv-mh.provo.novell.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; Format="flowed" Content-Transfer-Encoding: 7bit Return-path: Received: from mail6.bemta14.messagelabs.com ([193.109.254.103]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1ZzQ3q-0000bA-5G for xen-devel@lists.xenproject.org; Thu, 19 Nov 2015 14:19:42 +0000 In-Reply-To: <564DA86A02000078000B6A96@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: Andrew Cooper , Keir Fraser List-Id: xen-devel@lists.xenproject.org On 11/19/2015 04:46 AM, Jan Beulich wrote: > In commit a85da715cf ("x86/IO-APIC: adjust setting of destinations") I > made a pretty blatant mistake: get_apic_id() can be used there only > when running APICs in physical mode. For both flat and clustered modes > the change was wrong, causing different kinds of boot problems on > affected systems. Don't revert that change though, but use TARGET_CPUS > (equaling cpu_online_map, and with there only being a single online CPU > fulfilling the original commits intention). > > Signed-off-by: Jan Beulich > > --- 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, get_apic_id()); > + SET_DEST(entry, logical, cpu_mask_to_apicid(TARGET_CPUS)); > spin_lock_irqsave(&ioapic_lock, flags); > __ioapic_write_entry(apic, pin, 0, entry); > set_native_irq_info(irq, TARGET_CPUS); Tested-by: Boris Ostrovsky (One of our systems started failing and I bisected it yesterday to a85da715c but didn't get to actually debug it. Now I don't need to). -boris