Received: by 10.223.176.5 with SMTP id f5csp1037162wra; Wed, 7 Feb 2018 11:32:07 -0800 (PST) X-Google-Smtp-Source: AH8x225N48g/wRiJAgxms330341IOYGeyyShgEskVoxPKkH7S6fKeyHiPRPJuW7CU4Ax9ilvOhq1 X-Received: by 2002:a17:902:8a4:: with SMTP id 33-v6mr6861034pll.279.1518031926915; Wed, 07 Feb 2018 11:32:06 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1518031926; cv=none; d=google.com; s=arc-20160816; b=lMlukIx6I/qv0FN7Rn/47R0D4ZpdiDfdoj6aFhYJtbYVFhReDYhN7yjYZHlE642Fx8 niA3ac7nPs8svv8Xtgl+qGTnB1bVkoFeVs5a6yaecmrAcp93R1dyRfH4DuIRE93TVgCZ 4Kfy2jUw00BZEOZM+T/iRXnN6RiKIhYh8L/sl4N9Daek83werjvYPuqti7AyEybfsDVG c1GxkmqFeVJ59oK1OtWrbs2wgP40r2U1uWDbpGuVHKygRZIyvLEXc7YZ+D6CUR71XNQg oGreDj66HZ6KRkfKRQrGj2p9SgEUyQ9kkCy8IOFRyzhJnYX3kXk6Lni1yaaJj/qZNlRa Jh4w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:in-reply-to :mime-version:user-agent:date:message-id:from:cc:references:to :subject:arc-authentication-results; bh=1PnHNDP3QCWcbrhbSw41Lg0Xn+gYpM0TCTAgxVrU+VU=; b=B7OpSoRxZeGGyj/o0fdKUKcDLpfV0mBX1mdFeH2AE3V+QqdMNdD7HvrG9kxSjw6I0R Hxwe0Bw7jLnWOydwjr0rD2tYUFGkmdzdJgjMsUVGVvlotDOTL7s+vUW7u1+3kp09dtuc AcChFBvcKIPJQCmpPE/V22UldJaf7o06f8+bjVBc3rkVjXFjSDWkusmhcVdfuawSFQPH 1rs7PrsjmYYY8uUN2PdOohaqFkYcc7anR/htQQk7gRuvuZxw6jIyJEwlzXj8sn0LQjD1 EDVJ0epZjqYRfK1LZu9Rx2oq3rZ9rXX2GNUdlFl8ZItMYzRZsm8Kosu2y1pLvepDU1Pp tANg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id g9si198202pgu.43.2018.02.07.11.31.53; Wed, 07 Feb 2018 11:32:06 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754355AbeBGTbF (ORCPT + 99 others); Wed, 7 Feb 2018 14:31:05 -0500 Received: from mx3-rdu2.redhat.com ([66.187.233.73]:33994 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1753995AbeBGTbE (ORCPT ); Wed, 7 Feb 2018 14:31:04 -0500 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.rdu2.redhat.com [10.11.54.5]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 0B9F840201A0; Wed, 7 Feb 2018 19:31:04 +0000 (UTC) Received: from [10.16.186.145] (prarit-guest.khw.lab.eng.bos.redhat.com [10.16.186.145]) by smtp.corp.redhat.com (Postfix) with ESMTP id 81C29AEDEE; Wed, 7 Feb 2018 19:31:02 +0000 (UTC) Subject: Re: [v6,3/3] x86/smpboot: Fix __max_logical_packages estimate To: Simon Gaiser , xen-devel References: <20171114124257.22013-4-prarit@redhat.com> <370a7ab2-8f57-b99b-428b-d0b1dfe401e7@invisiblethingslab.com> <6fdee802-bf24-7fbb-c95a-a6e0d840fbde@redhat.com> Cc: linux-kernel@vger.kernel.org, Thomas Gleixner , Ingo Molnar , "H. Peter Anvin" , x86@kernel.org, Peter Zijlstra , Andi Kleen , Dave Hansen , Piotr Luc , Kan Liang , Borislav Petkov , Stephane Eranian , Arvind Yadav , Andy Lutomirski , Christian Borntraeger , "Kirill A. Shutemov" , Tom Lendacky , He Chen , Mathias Krause , Tim Chen , Vitaly Kuznetsov From: Prarit Bhargava Message-ID: <02ccc129-83b5-18e9-de5c-b3eff81a8f22@redhat.com> Date: Wed, 7 Feb 2018 14:31:02 -0500 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.7.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Scanned-By: MIMEDefang 2.79 on 10.11.54.5 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.6]); Wed, 07 Feb 2018 19:31:04 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.6]); Wed, 07 Feb 2018 19:31:04 +0000 (UTC) for IP:'10.11.54.5' DOMAIN:'int-mx05.intmail.prod.int.rdu2.redhat.com' HELO:'smtp.corp.redhat.com' FROM:'prarit@redhat.com' RCPT:'' Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 02/07/2018 02:26 PM, Simon Gaiser wrote: > Prarit Bhargava: >> On 02/07/2018 01:44 PM, Simon Gaiser wrote: >>> This breaks booting as Xen PV domain for me. The problem seems to be >>> that native_smp_cpus_done() is never called on a PV domain. So >>> __max_logical_packages is uninitialized and this leads to a NULL >>> pointer dereference in coretemp. >>> >> >> I'll see if I can figure out a way to test that. > > Ok, thanks. If you need some logs, or if I should test something just > ask. > Thanks, I may send you a patch off-list to test. >> Does 947134d9b00f >> ("x86/smpboot: Do not use smp_num_siblings in __max_logical_packages >> calculation") help? > > No. > Yeah, your description was absolutely correct. native_smp_cpus_done() is only called for HVM guests and not PV. I'm going to think about that and send you a patch in a bit. P.