On 26/01/2022 13:47, Andrew Cooper wrote: > On 26/01/2022 13:37, Andrew Cooper wrote: >> On 26/01/2022 12:44, Roger Pau Monné wrote: >>> On Wed, Jan 26, 2022 at 08:44:46AM +0000, Andrew Cooper wrote: >>>> All AMD IBRS-related features are in CPUID.0x80000008.ebx. Collect them in >>>> early_cpu_init() so init_speculative_mitigations() can use them. >>>> >>>> Rework the existing logic structure to fill in c->extended_cpuid_level and >>>> separate out the ambiguous use of ebx in an otherwise 0x80000008-specific >>>> logic block. >>>> >>>> Signed-off-by: Andrew Cooper <[email protected]> >>> Reviewed-by: Roger Pau Monné <[email protected]> >>> >>> It would be good to update the comment ahead of early_cpu_init to >>> mention it now also gather speculation-related fields from CPUID in >>> order to do early setup of mitigations. >>> >>> I think you could also use boot_cpu_data in spec_ctrl.c print_details >>> instead of fetching again the cpuid leafs? >> Hmm - I may have a mistake here. >> >> Boot time CPUID handling is giant mess, and I haven't had time to finish >> my work to make BSP microcode loading dependent on xmalloc(), allowing > Sorry. I mean "independent" here. > > ~Andrew > >> it to move far earlier, and removing the early/late CPUID split. >> >> However, init_speculative_mitigations() is called after late CPUID >> setup, so e8b should be suitably collected. Let me try to figure out >> what's going on.
And testing shows that everything works fine without this patch. I must have had some breakage during development which has resolved itself as part of cleaning the series up. Anyway, I'll withdraw this patch. ~Andrew
