Re: [PATCH v2 1/2] x86/cpufeature: Add facility to match microcode revisions

From: Henrique de Moraes Holschuh
Date: Thu Oct 11 2018 - 07:43:38 EST


On Wed, 10 Oct 2018, Andi Kleen wrote:
> v2:
> Remove all CPU match, only check boot cpu

IMHO, since it looks like a v3 will be necessary anyway, it could
benefit from a comment reminding people about how to use it on older
systems where "mixed CPU stepping" configurations were common.

This is *not* a relevant limitation, and it is easy enough to handle.
But people writing quirks for very old Intel Xeon CPUs *today* (unlikely
as that might be) might well forget the mixed-stepping gotcha...

Note that while mixed-stepping SMP configurations are *not* current
practice, they *were* reasonably common practice more than a decade ago,
officially supported both by Intel (there are Intel documents detailing
the valid stepping combinations) and the server vendors.

Suggestion below.

> +/*
> + * Match specific microcodes
> + *
> + * vendor/family/model/stepping must be all set.
> + * min_ucode is optional and can be 0.

* only checks against the boot cpu. When mixed-stepping configs are
valid for a CPU model, add a quirk for every valid stepping and
do the fine-tuning in the quirk handler.

--
Henrique Holschuh