Re: [PATCH v7 013/120] x86/cpu: Use parsed CPUID(0x80000000)
From: Borislav Petkov
Date: Tue Jun 02 2026 - 13:13:11 EST
On Tue, Jun 02, 2026 at 03:28:36PM +0200, Ahmed S. Darwish wrote:
> He is correct.
So I went forward to look a bit... the whole point of that code in
microcode_check() is to rescan the *full* CPUID leafage into a separate copy
of cpuinfo_x86.cpuid.
And then compare the old and the new one and see whether microcode changed
anything.
I see you're doing something in patch 106 and I'll know much better when I get
to it but my gut feeling right now tells me, you should leave that code alone
and do it separately, ontop, when we start removing ->x86_capability.
AFAICT, the CPUID parser can simply do:
struct cpuid_table *table = &second_copy.cpuid;
cpuid_fill_table(table, cpuid_parse_entries, nr_entries);
and fill the table. Then we'll need to go over that table and compare it with
the existing one. I guess adding a __cmp_range() or so in the same manner like
you do iterate over ranges right now.
Something along those lines I guess...
Thx.
--
Regards/Gruss,
Boris.
https://people.kernel.org/tglx/notes-about-netiquette