Re: [PATCH v4] x86/cpu: clear SME feature flag when not in use

From: Borislav Petkov
Date: Wed Feb 16 2022 - 05:33:56 EST


On Tue, Feb 15, 2022 at 09:44:46PM -0600, Mario Limonciello wrote:
> @@ -607,6 +609,9 @@ static void early_detect_mem_encrypt(struct cpuinfo_x86 *c)
> if (IS_ENABLED(CONFIG_X86_32))
> goto clear_all;
>
> + if (!sme_me_mask)
> + setup_clear_cpu_cap(X86_FEATURE_SME);

Why not "goto clear_all;" ?

--
Regards/Gruss,
Boris.

https://people.kernel.org/tglx/notes-about-netiquette