From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail.linutronix.de (146.0.238.70:993) by crypto-ml.lab.linutronix.de with IMAP4-SSL for ; 12 Jun 2018 20:44:12 -0000 Received: from aserp2130.oracle.com ([141.146.126.79]) by Galois.linutronix.de with esmtps (TLS1.2:RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1fSq9D-0004Eq-Bq for speck@linutronix.de; Tue, 12 Jun 2018 22:44:12 +0200 Received: from pps.filterd (aserp2130.oracle.com [127.0.0.1]) by aserp2130.oracle.com (8.16.0.22/8.16.0.22) with SMTP id w5CKfftN136363 for ; Tue, 12 Jun 2018 20:44:04 GMT Received: from aserv0021.oracle.com (aserv0021.oracle.com [141.146.126.233]) by aserp2130.oracle.com with ESMTP id 2jg4dm3yum-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Tue, 12 Jun 2018 20:44:04 +0000 Received: from userv0121.oracle.com (userv0121.oracle.com [156.151.31.72]) by aserv0021.oracle.com (8.14.4/8.14.4) with ESMTP id w5CKi3gB000740 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Tue, 12 Jun 2018 20:44:04 GMT Received: from abhmp0011.oracle.com (abhmp0011.oracle.com [141.146.116.17]) by userv0121.oracle.com (8.14.4/8.13.8) with ESMTP id w5CKi3OU004077 for ; Tue, 12 Jun 2018 20:44:03 GMT Date: Tue, 12 Jun 2018 16:44:01 -0400 From: Konrad Rzeszutek Wilk Subject: [MODERATED] Re: [patch V2 10/12] x86/cpu/intel: Evaluate smp_num_siblings early Message-ID: <20180612204401.GJ25607@char.us.oracle.com> References: <20180606192714.754943543@linutronix.de> <20180606192807.752811736@linutronix.de> MIME-Version: 1.0 In-Reply-To: <20180606192807.752811736@linutronix.de> Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit To: speck@linutronix.de List-ID: On Wed, Jun 06, 2018 at 09:27:24PM +0200, speck for Thomas Gleixner wrote: > Subject: [patch V2 10/12] x86/cpu/intel: Evaluate smp_num_siblings early > From: Thomas Gleixner > > Make use of the new early detection function to initialize smp_num_siblings > on the boot cpu before the MP-Table or ACPI/MADT scan happens. That's > required for force disabling SMT. > > Signed-off-by: Thomas Gleixner > --- > arch/x86/kernel/cpu/intel.c | 7 +++++++ > 1 file changed, 7 insertions(+) > > --- a/arch/x86/kernel/cpu/intel.c > +++ b/arch/x86/kernel/cpu/intel.c > @@ -301,6 +301,13 @@ static void early_init_intel(struct cpui > } > > check_mpx_erratum(c); > + > + /* > + * Get the number of SMT siblings early from the extended topology > + * leaf, if available > + */ > + if (detect_extended_topology_early(c) < 0 && IS_ENABLED(CONFIG_X86_32)) Shouldn't this be || ? That is you could run on a virtualized env where there is no XTOPOLOGY and you need to fallback to the earlier code-base (detect_ht_early) to figure out the SMT topology? (This being an X86_64 build)? > + detect_ht_early(c); > } > > #ifdef CONFIG_X86_32 >