Re: [PATCH 2/5] x86/microcode: Simplify init path even more
From: Ashok Raj
Date: Wed Oct 19 2022 - 15:23:12 EST
On Wed, Oct 19, 2022 at 07:54:23PM +0200, Borislav Petkov wrote:
> From: Borislav Petkov <bp@xxxxxxx>
>
> Get rid of all the IPI-sending functions and their wrappers and use
> those which are supposed to be called on each CPU.
Good cleanup overall!.. Trying to apply them and do a quick test.
[snip]
>
> + /*
> + * Try to load microcode once on the BSP in case the initrd has older revision.
> + * Frankly, I have no clue how that can happen but hey, loading here is cheap so
> + * why not.
> + */
> + microcode_ops->request_microcode_fw(boot_cpu_data.cpu_index, µcode_pdev->dev, true);
> +
You need to call a microcode_ops->apply_microcode() too if you want to
apply. But you also want to pay attention to the return code too and call
it appropriately.
> /* Do per-CPU setup */
> cpus_read_lock();
> on_each_cpu(setup_online_cpu, NULL, 0);
> --
> 2.35.1
>