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

Tom Lendacky
2022-02-16T15:05:14Z

On 2/15/22 21:44, Mario Limonciello wrote:
> Currently the SME CPU feature flag is reflective of whether the CPU
> supports the feature but not whether is has been activated by the
> kernel.
>
> Change this around to clear the SME feature flag if the kernel is not
> using it so userspace can determine if it is available and in use
> from `/proc/cpuinfo`.
>
> As the feature flag is cleared on systems where SME isn't active use
> CPUID 0x8000001f to confirm SME availability before calling
> `native_wbinvd`.
>
> Signed-off-by: Mario Limonciello <mario.limonciello@amd.com>

Acked-by: Tom Lendacky <thomas.lendacky@amd.com>

> ---