Re: [tip: x86/urgent] x86/microcode: Consolidate the loader enablement checking

From: Ingo Molnar
Date: Sun May 04 2025 - 02:14:36 EST



* tip-bot2 for Borislav Petkov (AMD) <tip-bot2@xxxxxxxxxxxxx> wrote:

> The following commit has been merged into the x86/urgent branch of tip:
>
> Commit-ID: eb72bdfbd0a757f30ebe4f9ec161cb246d19e5ed
> Gitweb: https://git.kernel.org/tip/eb72bdfbd0a757f30ebe4f9ec161cb246d19e5ed
> Author: Borislav Petkov (AMD) <bp@xxxxxxxxx>
> AuthorDate: Mon, 14 Apr 2025 11:59:33 +02:00
> Committer: Borislav Petkov (AMD) <bp@xxxxxxxxx>
> CommitterDate: Sat, 03 May 2025 16:40:56 +02:00
>
> x86/microcode: Consolidate the loader enablement checking
>
> Consolidate the whole logic which determines whether the microcode loader
> should be enabled or not into a single function and call it everywhere.
>
> Well, almost everywhere - not in mk_early_pgtbl_32() because there the kernel
> is running without paging enabled and checking dis_ucode_ldr et al would
> require physical addresses and uglification of the code.
>
> But since this is 32-bit, the easier thing to do is to simply map the initrd
> unconditionally especially since that mapping is getting removed later anyway
> by zap_early_initrd_mapping() and avoid the uglification.
>
> Fixes: 4c585af7180c1 ("x86/boot/32: Temporarily map initrd for microcode loading")
> Signed-off-by: Borislav Petkov (AMD) <bp@xxxxxxxxx>
> Cc: <stable@xxxxxxxxxx>
> Link: https://lore.kernel.org/r/CANpbe9Wm3z8fy9HbgS8cuhoj0TREYEEkBipDuhgkWFvqX0UoVQ@xxxxxxxxxxxxxx

So the title claims this 'consolidates' microcode loader enablement,
which is basically a code refactoring, but then there's a Fixes tag -
what exactly does it fix? There's no explanation in the changelog that
I can see that justifies that tag and why it's in x86/urgent.

Thanks,

Ingo