Re: [PATCH] x86/cpu/hygon: Work around XSAVES Erratum 1386

From: Tina Zhang

Date: Sat Nov 21 2026 - 01:46:44 EST




On 11/20/2026 11:54 PM, Dave Hansen wrote:
On 11/20/26 07:29, Andrew Cooper wrote:
Third, even if we could move to XSAVEC, I'm not sure it buys us much. I
certainly don't want to add the complexity to our already horrid XSAVE
mess. The right fix is in the microcode. Let's not give our dear
hardware vendors to mitigate even fewer issues than they do already.
Linux already has a mitigation for #1386.  The mitigation *is* to
pretend that XSAVES doesn't exist, which causes Linux to fall back to
using XSAVEC.

See fix_erratum_1386() in amd.c.

Hygon should extend the microcode list and call that function, rather
than opencoding it differently.

Hah, silly me. Sounds good to me.

Thanks Andrew and Dave.

I'll extend the existing erratum_1386_microcode[] table with the Hygon entries and make Hygon reuse fix_erratum_1386() instead of duplicating the workaround in hygon.c.

Thanks,
Tina.