Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp6616130ybi; Wed, 29 May 2019 10:19:11 -0700 (PDT) X-Google-Smtp-Source: APXvYqzLHFqil4Xhx9jhSTAgf5c4VI1KwmNNTW5KJlyP+zbvRI13gV1rk/vfPjQvLUBVjwS2mvjO X-Received: by 2002:a17:90a:2e87:: with SMTP id r7mr13696693pjd.121.1559150350907; Wed, 29 May 2019 10:19:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1559150350; cv=none; d=google.com; s=arc-20160816; b=bE1PdipOyUX0qsImJuamv9ysEpwsRs/B4gRv9skUrq6hrXDzwWnHm42KvU1pyrnUZq eo+c2x/GZ1i4jd1uzpk0wuGP+RTjNFKP8XK8fkMFef2OU66IEAJ8UTA/JGNPXIadKh8M 2MLKNrVCzFGJF8SBZGwpVjqnK0D0+DhcA4SIaf2RKtCSaFnOT7zo+ERCK07+H6yfoKJY 0OQh7u5ockxdDnnMc9282QQWPoNzykVLfokjx71NpNH37F7FtzUEA2yfHduTFtTDPaAV r+G9jKyTXkoyB3XTsc2OEz1Vo43H2fEi4rXquTw8fVN8EC6B/geF4CNaIQHYEpz7Cv2M V8fA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=wO1xc9mvCnJ4TfjCrBd9qQQqzJE4PIsIWOBdkS/cqLA=; b=XTEZ54ulIOK6UB7P3wOp5ctkJYBzsgRH9W7Rjevnvdme2OsagP0gFXYmJd9HHAzkME O7brlbwyetNbGTys0XQY2T5hJq438edNEILQDbS/v8Bm8FwitPhv3s/j6xyldB3rx/gc GMtQb7pfzMdjGBepNpqT0u0akA/sAv3VUZtotTSXAge6TFUOEQme/IpJp6XaaROlEnku GbBNwV5J+1L5in78XMWujcMIDSl1JPdS5cTtXgAlThWJFvC7c4CT2/mcsyA58prMu8Bt LKzJNMj6hSYR+H686EMKfm1Tgs/3+n/U4RTuv+QQM3P5TpkM235ifUO7WX8n5MNeB1sT NYPw== 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 f3si201768pld.434.2019.05.29.10.18.54; Wed, 29 May 2019 10:19:10 -0700 (PDT) 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 S1726253AbfE2RRj (ORCPT + 99 others); Wed, 29 May 2019 13:17:39 -0400 Received: from mx1.redhat.com ([209.132.183.28]:15582 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725917AbfE2RRj (ORCPT ); Wed, 29 May 2019 13:17:39 -0400 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id A17B6309B15E; Wed, 29 May 2019 17:17:33 +0000 (UTC) Received: from treble (ovpn-123-24.rdu2.redhat.com [10.10.123.24]) by smtp.corp.redhat.com (Postfix) with ESMTPS id C4D0210027CA; Wed, 29 May 2019 17:17:28 +0000 (UTC) Date: Wed, 29 May 2019 12:17:26 -0500 From: Josh Poimboeuf To: Jiri Kosina Cc: "Rafael J. Wysocki" , Pavel Machek , Thomas Gleixner , Ingo Molnar , Borislav Petkov , "H. Peter Anvin" , Peter Zijlstra , x86@kernel.org, linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v2] x86/power: Fix 'nosmt' vs. hibernation triple fault during resume Message-ID: <20190529171726.obom7xql72bgbjhc@treble> References: <20190529161028.a6kpywzpjazgql5u@treble> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: User-Agent: NeoMutt/20180716 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.49]); Wed, 29 May 2019 17:17:38 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, May 29, 2019 at 06:26:59PM +0200, Jiri Kosina wrote: > On Wed, 29 May 2019, Josh Poimboeuf wrote: > > > hibernation_restore() is called by user space at runtime, via ioctl or > > sysfs. So I think this still doesn't fix the case where you've disabled > > CPUs at runtime via sysfs, and then resumed from hibernation. Or are we > > declaring that this is not a supported scenario? > > Yeah I personally find that scenario awkward :) Anyway, cpuhp_smt_enable() > is going to online even those potentially "manually" offlined CPUs, isn't > it? > > Are you perhaps suggesting to call enable_nonboot_cpus() instead of > cpuhp_smt_enable() here to make it more explicit? Maybe, but I guess that wouldn't work as-is because it relies on the frozen_cpus mask. But maybe this is just a scenario we don't care about anyway? I still have the question about whether we could make mwait_play_dead() monitor a fixed address. If we could get that to work, that seems more robust to me. Another question. With your patch, if booted with nosmt, is SMT still disabled after you resume from hibernation? I don't see how SMT would get disabled again. > > Is there are reason why maxcpus= doesn't do the CR4.MCE booted_once > > dance? > > I am not sure whether it's really needed. My understanding is that the MCE > issue happens only after primary sibling has been brought up; if that > never happened, MCE wouldn't be broadcasted to that core at all in the > first place. > > But this needs to be confirmed by Intel. Right, but can't maxcpus= create scenarios where only the primary sibling has been brought up? Anyway, Thomas indicated on IRC that maxcpus= may be deprecated and should probably be documented as such. So maybe it's another scenario we don't care about. -- Josh