Re: [patch V3 01/30] x86/microcode/32: Move early loading after paging enable

From: Borislav Petkov
Date: Wed Sep 13 2023 - 11:06:57 EST


On Tue, Sep 12, 2023 at 09:57:44AM +0200, Thomas Gleixner wrote:
> 32-bit loads microcode before paging is enabled. The commit which
> introduced that has zero justification in the changelog. The cover letter
> has slightly more content, but it does not give any technical justification
> either:
>
> "The problem in current microcode loading method is that we load a
> microcode way, way too late; ideally we should load it before turning
> paging on. This may only be practical on 32 bits since we can't get to
> 64-bit mode without paging on, but we should still do it as early as at
> all possible."
>
> Handwaving word salad with zero technical content.
>
> Someone claimed in an offlist conversation that this is required for curing
> the ATOM erratum AAE44/AAF40/AAG38/AAH41. That erratum requires an
> microcode update in order to make the usage of PSE safe. But during early
> boot PSE is completely irrelevant and it is evaluated way later.

...

> Cure this and move the microcode loading after the early paging enable and
> remove the gunk in the microcode loader which is required to handle
> physical address mode.

That same someone from the offlist conversation loves this change - 32-bit
PA loading gunk has been a major PITA ever since it got added - just
look at the code you're removing and cringe.

> Signed-off-by: Thomas Gleixner <tglx@xxxxxxxxxxxxx>
> Cc: Fenghua Yu <fenghua.yu@xxxxxxxxx>
> Cc: Peter Anvin <hpa@xxxxxxxxx>

I guess those gents could chime in now - lemme put them in To:, perhaps
they'll look at this then.

If not, I'd say we do this. The erratum in question is for pretty much
dying hw anyway - Atom n270 of which I actually have *two* machines
even. I can "accidentally" drop them on the concrete floor while
carrying and problem solved => dying hardware.

:-P

Thx.

--
Regards/Gruss,
Boris.

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