From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andrew Cooper Subject: Re: [PATCH] x86/IO-APIC: fix setting of destinations Date: Thu, 19 Nov 2015 14:39:19 +0000 Message-ID: <564DDF17.8040106@citrix.com> References: <564DA86A02000078000B6A96@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 1ZzQMv-0001Dm-2x for xen-devel@lists.xenproject.org; Thu, 19 Nov 2015 14:39:25 +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: Keir Fraser List-Id: xen-devel@lists.xenproject.org On 19/11/15 09:46, 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 I also missed that while reviewing. 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, 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); > > >