Re: [PATCH 1/1] arch/x86/microcode/intel: Remove unnecessary cache writeback and invalidation

Ashok Raj
2024-07-03T21:34:08Z

On Wed, Jul 03, 2024 at 02:11:34PM -0700, Dave Hansen wrote:
> On 7/3/24 14:03, Ashok Raj wrote:
> > On Wed, Jul 03, 2024 at 01:55:19PM -0700, Dave Hansen wrote:
> >> On 7/3/24 13:50, Ashok Raj wrote:
> >>> Agree that we must get wider testing. Only caveat is that you should find a
> >>> newer microcode to apply, which might be difficult for all products. Unless
> >>> there is a debug option to reload force the same rev in case you don't have
> >>> a newer ucode to test. Its good to get this in to reduce the big hammer
> >>> effect.
> >>
> >> Why is it hard to find a newer microcode to apply? Just because the
> >> BIOS-provided one is more likely to be the last update the other the CPU?
> >
> > Yes, sometimes that, or an earlier update has already been applied via
> > early loading (which seems most of the case). Someone needs to do some
> > extra work to remove it from initramfs copy, reboot and redo the test.
>
> This patch touches __apply_microcode(), which looks like it's used in
> both early and late loading.

In the old days we had a separate function for early and separate for late
loading. tglx consolidated them, so they all look pretty now.

When wbinvd() was introduced I do believe we added to both early and late.
Although I don't recall entirely.

>
> But it sounds like you're thinking that the WBINVD is (or was) primarily
> useful during late loading. Why is that?
>
> Or am I totally misreading the code again? :)

--
Cheers,
Ashok