On 27.03.2023 21:41, Andrew Cooper wrote:
> When microcode_scan_module() is used, it's used twice.
> 
> The caching of the bootstrap_map() pointer in ucode_blob.data is buggy for
> multiple reasons and is going to be removed.

As before I'm not convinced of "buggy".

> Right now, the boot flow depends on the second pass over
> bootstrap_map()/find_cpio_data() altering ucode_blob.data to use the directmap
> alias of the CPIO module, where previously it caches the early boostrap
> mapping.
> 
> If the scan is successful, it will be successful the second time too, but
> there's no point repeating the work.  Cache the module index, offset and size
> to short circuit things the second time around.

If the scan failed, it will fail the 2nd time too. Maybe deal with
this case as well, e.g. by clearing ucode_scan at the end of
microcode_scan_module() when nothing was found?

Jan

Reply via email to