Received: by 2002:a05:6359:c8b:b0:c7:702f:21d4 with SMTP id go11csp451689rwb; Wed, 28 Sep 2022 05:08:01 -0700 (PDT) X-Google-Smtp-Source: AMsMyM494fh2aJQWymQDnJ/r81+kBFDIZq37zf3Yws6lSfqc2hwh/HZRQh7ctsbuTBcGlgMe4U5L X-Received: by 2002:a50:ee12:0:b0:457:cdf6:af0a with SMTP id g18-20020a50ee12000000b00457cdf6af0amr6305067eds.24.1664366881040; Wed, 28 Sep 2022 05:08:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1664366881; cv=none; d=google.com; s=arc-20160816; b=b18tMHpq8K68P8+txU6BI0F8Xz7CY8Strh+A98+oPO29NDRL6lQM1FjNMjUNZWfEWy 9ntvvYs0DLksHci0ZZHA6UN3InDeBP6aZzgOb3JNLP+Ns1B/qC+zPiEE9t6ssMBUfwsI QTJq9KfyY0wzeG2h2R4JxIcUSuo39MWZAEOpWGAC2ztvDf4NQMTrgTuo28jWF9nD3vrn zOhiqNir5ZGG5EibSz1ZgHQq/sFtUIQ3kOmd7WJaCwJKRHfksU9eunYp6VD5T5S6/VB8 1v2wB5X98MXAelLqRkf7udwjCPVpwtiXKbg0Oof4lgmQ5Xo98CoCgOfrI3iFLgK/ochm ZZuQ== 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=H37L9qeZmmgh4Ob+dcO4c+wKevaFARZE41KleCoIqh0=; b=ZI1eJbTw6T2sW+Yo/tBwD4ndZmuGDu+XsIARA4w7u/73mrVnBOARf9ZU8eiCkQs1OH ofTvnX+6Ni9TwBRp+QHJRuLAPDwzrcSZ9md3KoptMGJx2BH2g/ItsUDk47NsJve6DMj9 NqgsJIgAeah1OZmDkdk6AMdc/daPtUe34FOA74Dckt9IB4+G7sWc0xgDzvZkumaysItv JsWaGOh7rYZTNACgz4HKYZrvdyRh4kKz/U018B9ZC9mcRjTKoa+6lT9VwAQI28BnkzJA 51YHcGGbGiJYS4oqjFnklyyRFq4m5cqIt0AIUnjo5++tgtdJm6FamKiaMC61ZTqf0cmL zwog== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@alien8.de header.s=dkim header.b="Upn/lR31"; 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 t2-20020a50ab42000000b0044ea27b0ffbsi4199341edc.465.2022.09.28.05.07.33; Wed, 28 Sep 2022 05:08:01 -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="Upn/lR31"; 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 S233445AbiI1LXE (ORCPT + 99 others); Wed, 28 Sep 2022 07:23:04 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60922 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233354AbiI1LXC (ORCPT ); Wed, 28 Sep 2022 07:23:02 -0400 Received: from mail.skyhub.de (mail.skyhub.de [5.9.137.197]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 82A9CDDD8D for ; Wed, 28 Sep 2022 04:23:00 -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 163261EC059D; Wed, 28 Sep 2022 13:22:55 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=alien8.de; s=dkim; t=1664364175; 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=H37L9qeZmmgh4Ob+dcO4c+wKevaFARZE41KleCoIqh0=; b=Upn/lR31WevfgW+y3+vXEVtSERdEAVv/TI3lRbXaQBdP4yBNc507x/E5NXBTUD1mwJTAbQ 6zfe5r3uYXbWUJqZJiPVDGL5Dvj5kw89TVpkzyfSUWsk/fehuAYYHghSVpYZf/aLwUyx4E 9zruyDj1Sf7rvxpqHONY003jfJTdkpM= Date: Wed, 28 Sep 2022 13:22:51 +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 01:14:11PM +0200, Juergen Gross wrote: > No, we don't. > > Using basically your patch, but with > > + mtrr_online = cpuhp_setup_state_nocalls(CPUHP_AP_ONLINE_DYN, > + "x86/mtrr:online", > + mtrr_ap_init, NULL); > > moved to the end of mtrr_aps_init(), and: > > +void mtrr_aps_thaw(void) > +{ > + cpuhp_remove_state_nocalls(mtrr_online); > +} Yes, so you said. I'm not sure I like this toggling of notifier registration like that. Optimally, I'd like to be able to query the suspend code whether it is in the process of resuming. This here: static int resume_target_kernel(bool platform_mode) { ... Enable_irqs: system_state = SYSTEM_RUNNING; local_irq_enable(); Enable_cpus: pm_sleep_enable_secondary_cpus(); but being able to do: pm_sleep_enable_secondary_cpus(); system_state = SYSTEM_RUNNING | SYSTEM_RUNNING_APS_UP; which can't work, obviously. But something like that. -- Regards/Gruss, Boris. https://people.kernel.org/tglx/notes-about-netiquette