Re: [PATCH 2/2] x86, microcode: Make reload interface per system

From: Markus Trippelsdorf
Date: Fri Jun 22 2012 - 02:41:45 EST


On 2012.06.22 at 05:36 +0200, Borislav Petkov wrote:
> On Thu, Jun 21, 2012 at 08:19:04PM -0700, H. Peter Anvin wrote:
> > On 06/21/2012 07:56 PM, Borislav Petkov wrote:
> > >>
> > >> That is orthogonal. Anyway, my only concern about the request_firmware
> > >> interface is that the timing will be inherently wrong.
> > >
> > > Timing? Please elaborate.
> > >
> >
> > The request_firmware will happen as soon as the driver is loaded; with
> > the early microcode blob scheme the driver will need to be built in and
> > so the request_firmware will happen, redundantly, immediately...
>
> What if BIOS has patch version 1 (numbers are only for showing what I
> mean), then early scheme applies patch v2 but there is a newer patch
> version 3 in /lib/firmware?
>
> If the ucode driver is built in, we don't get to update to v3
> automatically. User has to do it.
>
> The current fix for this situation is have the microcode.ko as module
> (and only allow it as M) which then automatically does request_firmware
> at module init time and loads v3.
>
> Which doesn't help people who don't build modules...

People who don't use modules have:
echo -n 1 > /sys/devices/system/cpu/cpu0/microcode/reload
...
in their init script already.

That will have to change to a single:
echo -n 1 >| /sys/devices/system/cpu/microcode/reload
in your new scheme.

Of course the best solution would be to get rid of that manual reload
altogether and to automatically load the firmware during boot (even
without modules)...

--
Markus
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/