Re: [PATCH v3] x86/cpu/hygon: Work around XSAVES Erratum 1386
From: Borislav Petkov
Date: Wed Nov 25 2026 - 23:47:53 EST
On Tue, Nov 24, 2026 at 10:26:32PM +0800, Tina Zhang wrote:
> static void init_hygon(struct cpuinfo_x86 *c)
> {
> u64 vm_cr;
>
> early_init_hygon(c);
> + /*
> + * Model 00h is a valid Hygon processor model, but x86_match_cpu()
> + * treats a model value of 0 as X86_MODEL_ANY. Match Model 00h
> + * explicitly.
> + */
> + if ((c->x86 == 0x18 && c->x86_model == 0x00) ||
> + x86_match_cpu(erratum_1386_cpus))
So this can be:
if ((c->x86 == 0x18) &&
(c->x86_model <= 0x6 || c->x86_model == 0x10))
and you don't need the _cpus table?
--
Regards/Gruss,
Boris.
https://people.kernel.org/tglx/notes-about-netiquette