Re: x86/amd late microcode thread loading slows down boot

From: Andrew Cooper
Date: Wed Nov 06 2024 - 13:52:31 EST


> Hi Borislav, all,
>
> I am encountering varying delays in the boot process

I recognise those symptoms.

https://xenbits.xen.org/gitweb/?p=xen.git;a=commitdiff;h=f19a199281a23725beb73bef61eb8964d8e225ce

We found it in Xen in 2019, and were instructed by AMD to insert a TLB
flush immediately after patchloading.

Looking at Linux, there's no such workaround.

It turns out that a side effect of patchloading on some CPUs leaves the
mapping of the blob in the TLB (at whatever granularity) as fully UC. 
When this happens to be a 2M/1G superpage, it causes whole lot of perf
problems in unrelated areas.

I suggest Linux take the same approach.

~Andrew