[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <f8da6988-afa3-1e85-b47d-d91fc4113803@suse.com>
Date: Wed, 28 Sep 2022 13:14:11 +0200
From: Juergen Gross <jgross@...e.com>
To: Borislav Petkov <bp@...en8.de>
Cc: xen-devel@...ts.xenproject.org, x86@...nel.org,
linux-kernel@...r.kernel.org, Thomas Gleixner <tglx@...utronix.de>,
Ingo Molnar <mingo@...hat.com>,
Dave Hansen <dave.hansen@...ux.intel.com>,
"H. Peter Anvin" <hpa@...or.com>
Subject: Re: [PATCH v3 08/10] x86/mtrr: let cache_aps_delayed_init replace
mtrr_aps_delayed_init
On 28.09.22 12:48, Borislav Petkov wrote:
> On Wed, Sep 28, 2022 at 08:16:53AM +0200, Juergen Gross wrote:
>>> Are sure the hotplug notifier doesn't get called in the boot and in the
>
> It doesn't because it gets registered after smp_init()...
>
>>> resume cases?
>
> ... but it gets called during resume because by that time the notifier
> has been registered already. See my notes at the end of this mail of
> what the code does currently.
>
>> In case my suspicion is correct: this can still be solved by adding the
>> hotplug notifier only in mtrr_aps_init(), and removing it again in
>> arch_thaw_secondary_cpus_begin().
>
> Pretty much. Yeah, we still need a bool. ;-(
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);
+}
Juergen
Download attachment "OpenPGP_0xB0DE9DD628BF132F.asc" of type "application/pgp-keys" (3099 bytes)
Download attachment "OpenPGP_signature" of type "application/pgp-signature" (496 bytes)
Powered by blists - more mailing lists