On 12/06/2023 4:16 pm, Jan Beulich wrote: > On 05.06.2023 19:08, Alejandro Vallejo wrote: > >> --- a/xen/arch/x86/cpu/microcode/core.c >> +++ b/xen/arch/x86/cpu/microcode/core.c >> @@ -854,8 +854,14 @@ int __init early_microcode_init(unsigned long >> *module_map, >> break; >> >> case X86_VENDOR_INTEL: >> - if ( c->x86 >= 6 ) >> - ucode_ops = intel_ucode_ops; >> + /* >> + * Intel introduced microcode loading with family 6. Because we >> + * don't support compiling Xen for 32bit machines we're guaranteed >> + * that at this point we're either in family 15 (Pentium 4) or 6 >> + * (everything since then), so microcode facilities are always >> + * present. >> + */ >> + ucode_ops = intel_ucode_ops; >> break; >> } > There are many places where we make such connections / assumptions without > long comments. I'd be okay with a brief one, but I'm not convinced we need > one at all.
I agree. I don't think we need a comment here. I'd also tweak the commit message to say "All 64bit-capable Intel CPUs are supported as far as microcode loading goes" or similar. It's subtly different IMO. The Intel microcode driver already relies on 64bit-ness to exclude and early case (on 32bit CPUs only) which lack Platform Flags. I'm happy to fix both of these up on commit. ~Andrew