On Mon, Oct 13, 2025 at 09:33:53AM -0500, David Kaplan wrote:
> Add function to reset spectre_v2 mitigations back to their boot-time
> defaults.
>
> Signed-off-by: David Kaplan <david.kaplan@amd.com>
> ---
> arch/x86/kernel/cpu/bugs.c | 19 +++++++++++++++++++
> 1 file changed, 19 insertions(+)
>
> diff --git a/arch/x86/kernel/cpu/bugs.c b/arch/x86/kernel/cpu/bugs.c
> index 9d5c6a3e50e1..0430635bb17d 100644
> --- a/arch/x86/kernel/cpu/bugs.c
> +++ b/arch/x86/kernel/cpu/bugs.c
> @@ -2477,6 +2477,24 @@ static void __init spectre_v2_apply_mitigation(void)
> }
> }
>
> +#ifdef CONFIG_DYNAMIC_MITIGATIONS
> +static void spectre_v2_reset_mitigation(void)
Yeah, the reset should definitely be a single function - this ifdeffery around
every single one is going to become yucky.
--
Regards/Gruss,
Boris.
https://people.kernel.org/tglx/notes-about-netiquette