Re: [PATCH] x86/cpu/hygon: Work around XSAVES Erratum 1386
From: Andrew Cooper
Date: Fri Nov 20 2026 - 10:30:07 EST
> Could you explain how that would help, exactly?
>
> First, there needs to be a reference to the erratum in the changelog.
> For me, searching for this string git the PDF to pop out of Google:
> "Revision Guide for AMD Family 19h Models 00h-0Fh (Publication #56683)".
>
> Second, I don't see anything in the erratum that says it is triggered by
> supervisor state. Do you know something about this erratum that's not in
> the public document?
>
> I'm not even sure AMD _has_ supervisor state components on Zen 2 that
> Linux uses.
>
> 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.
~Andrew