From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758665AbcEFTib (ORCPT ); Fri, 6 May 2016 15:38:31 -0400 Received: from youngberry.canonical.com ([91.189.89.112]:45198 "EHLO youngberry.canonical.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1758152AbcEFTi3 (ORCPT ); Fri, 6 May 2016 15:38:29 -0400 Subject: Re: [v4.6-rc1 Regression] x86/topology: Create logical package id To: Boris Ostrovsky , Thomas Gleixner References: <572CDF53.7040301@canonical.com> <572CECCD.2010205@oracle.com> Cc: "Peter Zijlstra (Intel)" , Andi Kleen , Andrew Morton , Andy Lutomirski , Arnaldo Carvalho de Melo , Borislav Petkov , Brian Gerst , Denys Vlasenko , "H. Peter Anvin" , Harish Chegondi , Jacob Pan , Jiri Olsa , Kan Liang , Linus Torvalds , "Luis R. Rodriguez" , Stephane Eranian , Toshi Kani , Vince Weaver , LKML , yingying.zhao@intel.com, "Zhang, Xiong Y" , 1573231@bugs.launchpad.net, 1397880@bugs.launchpad.net, Ingo Molnar , x86@kernel.org, Andy Shevchenko , Chen Yucong , Laura Abbott , David Vrabel From: Joseph Salisbury Message-ID: <572CF2A1.9040209@canonical.com> Date: Fri, 6 May 2016 15:38:09 -0400 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.6.0 MIME-Version: 1.0 In-Reply-To: <572CECCD.2010205@oracle.com> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 05/06/2016 03:13 PM, Boris Ostrovsky wrote: > On 05/06/2016 02:48 PM, Thomas Gleixner wrote: >> On Fri, 6 May 2016, Joseph Salisbury wrote: >>> A kernel bug report was opened against Ubuntu [0]. After a kernel >>> bisect, it was found that reverting the following commit resolved this bug: >>> >>> commit 1f12e32f4cd5243ae46d8b933181be0d022c6793 >>> Author: Thomas Gleixner >>> Date: Mon Feb 22 22:19:15 2016 +0000 >>> >>> x86/topology: Create logical package id >>> >>> To build successfully with this commit reverted, I also had to revert >>> commits: e7ee3e8,2d4de83,87f01cc and 33c3cc7. >>> >>> The regression was introduced as of v4.6-rc1. >>> >>> I was hoping to get your feedback, since you are the patch author. Do >>> you think gathering any additional data will help diagnose this issue, >>> or would it be best to submit a revert request? >> Yuck. That dies with a divide error. And that looks like XEN is supplying crap >> data in the CPUID. > Joe, do you have > > ed6069b xen/apic: Provide Xen-specific version of cpu_present_to_apicid > APIC op > > -boris Yes the commit is in the 4.4 based Ubuntu kernel. This bug also happens with the vanilla 4.6-rc5 kernel, which also has that commit. > > >> Does the patch below cure the issue? >> >> Thanks, >> >> tglx >> >> 8<--------------- >> >> --- a/arch/x86/kernel/smpboot.c >> +++ b/arch/x86/kernel/smpboot.c >> @@ -332,6 +332,11 @@ static void __init smp_init_package_map( >> * primary cores. >> */ >> ncpus = boot_cpu_data.x86_max_cores; >> + if (!ncpus) { >> + pr_warn("x86_max_cores == zero !?!?"); >> + ncpus = 1; >> + } >> + >> __max_logical_packages = DIV_ROUND_UP(total_cpus, ncpus); >> >> /* >