Received: by 2002:a05:6359:c8b:b0:c7:702f:21d4 with SMTP id go11csp834959rwb; Wed, 28 Sep 2022 09:39:11 -0700 (PDT) X-Google-Smtp-Source: AMsMyM5tOVltBAlIi5FKifNhtOPLpM3qKecku7YNUErcSEUnsHAzDSgtKaqToyQJsT5oEK3k2/+b X-Received: by 2002:a63:5853:0:b0:43b:e67b:969a with SMTP id i19-20020a635853000000b0043be67b969amr30138814pgm.354.1664383151484; Wed, 28 Sep 2022 09:39:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1664383151; cv=none; d=google.com; s=arc-20160816; b=Th46KJeNpD1qrxsp/YEMVIGm40m0N4UCSdR0Wi4DDBl923wNfb8vI8KF8BRASMy+uL O3pQijiONSzOnV2/IgGJtnjuzU0VUNQf7VIlyacle2Z26sgXgT7+YJJfx2YkNvVkWYVa bVYTPVHrR6s/ERPGRIwZJbNNTm6GU3HWm9gquPOEExCJaoHxyLmKjIw5CsSF7ble28+I nfg2Cpjqk4KW0oBw4jjaa9fHBX0fomFDdtILnngKqoJPRjqhNzNNdewsXNON35IrkGvi vmQTlDRfaeV9O7KLrunw1PqoTR76fYqADp7WzsIffsrPwvv1tKWyhX0mBhfrRylxZsES yY9Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=P39ljKLiwuQPwtDvDuKVanquI0RYkjP1D8LuyTjtJJs=; b=rvLRImdmToFjyHd1cxLCVIspE8pDNjDNpvj8wBUqZEEkEZSJFf/5dOAnJ8ds2RWatQ C7PGDtvYfBNpyOH++C2UefrHReSRcNb59RMGaKVsw5/MPJ4rCHemDP2FX+J7zfTK0MFo /Wg9YtcjSw7IyU8LQ+Dgh2TZWVQtxNM/C1e5ffC2RTkS1ICAckJL9IUljs87aGcRobhB F0hAP1YoMY7qJgDAtSe31Y3UUIOPtf4RCOHCrZX0V7GqWlc6RmoYrAejRGtGgwl756BE Hfnntb1jVWKtt2KyINzgbRPXO15EsB9JqMelBPlWbOb+nrINwp6pTnLgCNlqqNWq0GLa Bb3Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@alien8.de header.s=dkim header.b=Uao1ZphA; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=alien8.de Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id m3-20020a625803000000b0053a81f65dd3si3096456pfb.287.2022.09.28.09.39.00; Wed, 28 Sep 2022 09:39:11 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@alien8.de header.s=dkim header.b=Uao1ZphA; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=alien8.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234358AbiI1QMc (ORCPT + 99 others); Wed, 28 Sep 2022 12:12:32 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57110 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233749AbiI1QMa (ORCPT ); Wed, 28 Sep 2022 12:12:30 -0400 Received: from mail.skyhub.de (mail.skyhub.de [5.9.137.197]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 21AD36DF93 for ; Wed, 28 Sep 2022 09:12:30 -0700 (PDT) Received: from zn.tnic (p200300ea9733e7ee329c23fffea6a903.dip0.t-ipconnect.de [IPv6:2003:ea:9733:e7ee:329c:23ff:fea6:a903]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.skyhub.de (SuperMail on ZX Spectrum 128k) with ESMTPSA id 9D1671EC058B; Wed, 28 Sep 2022 18:12:24 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=alien8.de; s=dkim; t=1664381544; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:in-reply-to:in-reply-to: references:references; bh=P39ljKLiwuQPwtDvDuKVanquI0RYkjP1D8LuyTjtJJs=; b=Uao1ZphADuAsv6LM0PXKjLzWHVW6MpllBeF4uvmOQ+nQNKu9+hXBTS4RGyWezPZ0smbv/h IGZDd1BS828tjI6dOprjqWP0i4n19k+ZHCma3t7R0BXQ/TawsINhDvqGnP0458LIrxfMZX X0HwXQ23W2btK4ibPwovzxoqz5hFSFQ= Date: Wed, 28 Sep 2022 18:12:24 +0200 From: Borislav Petkov To: Juergen Gross Cc: xen-devel@lists.xenproject.org, x86@kernel.org, linux-kernel@vger.kernel.org, Thomas Gleixner , Ingo Molnar , Dave Hansen , "H. Peter Anvin" Subject: Re: [PATCH v3 08/10] x86/mtrr: let cache_aps_delayed_init replace mtrr_aps_delayed_init Message-ID: References: <314e3bd3-3405-c0c3-225c-646d88cbfb1a@suse.com> <73d8fabd-8b93-2e65-da4b-ea509818e666@suse.com> <24088a15-50a1-f818-8c3e-6010925bffbf@suse.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Sep 28, 2022 at 03:43:56PM +0200, Juergen Gross wrote: > Would you feel better with adding a new enum member CPUHP_AP_CACHECTRL_ONLINE? > > This would avoid a possible source of failure during resume in case no slot > for CPUHP_AP_ONLINE_DYN is found (quite improbable, but in theory possible). Let's keep that in the bag for the time when we get to cross that bridge. > You wouldn't want to do that there, as there are multiple places where > pm_sleep_enable_secondary_cpus() is being called. We want all of them, I'd say. They're all some sort of suspend AFAICT. But yes, if we get to do it, that would need a proper audit. > Additionally not all cases are coming in via > pm_sleep_enable_secondary_cpus(), as there is e.g. a call of > suspend_enable_secondary_cpus() from kernel_kexec(), which wants to > have the same handling. Which means, more hairy. > arch_thaw_secondary_cpus_begin() and arch_thaw_secondary_cpus_end() are > the functions to mark start and end of the special region where the > delayed MTRR setup should happen. Yap, it seems like the best solution at the moment. Want me to do a proper patch and test it on real hw? :-) Thx. -- Regards/Gruss, Boris. https://people.kernel.org/tglx/notes-about-netiquette