From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id BA8BEC32771 for ; Wed, 28 Sep 2022 16:12:34 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234378AbiI1QMd (ORCPT ); Wed, 28 Sep 2022 12:12:33 -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: 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