Linux kernel -stable discussions
 help / color / mirror / Atom feed
From: David Laight <david.laight.linux@gmail.com>
To: Tina Zhang <zhang_wei@open-hieco.net>
Cc: x86@kernel.org, puwen@hygon.cn, tglx@linutronix.de,
	mingo@redhat.com, bp@alien8.de, dave.hansen@linux.intel.com,
	hpa@zytor.com, linux-kernel@vger.kernel.org, yangzhen@hygon.cn,
	dengqiming@hygon.cn, stable@vger.kernel.org
Subject: Re: [PATCH] x86/cpu/hygon: Work around XSAVES Erratum 1386
Date: Fri, 20 Nov 2026 09:46:27 +0000	[thread overview]
Message-ID: <20261120094627.513b216e@pumpkin> (raw)
In-Reply-To: <20261028235712.383977-1-zhang_wei@open-hieco.net>

On Thu, 29 Oct 2026 07:57:12 +0800
Tina Zhang <zhang_wei@open-hieco.net> wrote:

> The XSAVES malfunction described in AMD Erratum 1386 also affects
> certain Hygon Family 18h processors. Under specific conditions, XSAVES
> may fail to save XMM register state, allowing stale register values to
> reappear after the state is restored.
> 
> None of the affected processors enumerate supervisor XSAVE state
> components. XSAVEC is therefore equivalent for their enabled state
> components and is not affected by the erratum.

Would it just make sense to use XSAVES unless there are bits set in XSS
MSR that the kernel might need to request be saved?

That is 'use XSAVES unless you need to use XSAVEC'.
Then you don't have to worry about cpu models and microcode versions.

David

> 
> Family 18h models 00h through 06h and model 10h are affected. Other
> Family 18h models contain the fix in hardware.
> 
> For the following model and stepping combinations, the minimum
> microcode revisions containing the fix are:
> 
>   Model  Stepping  Microcode
>   04h    0         0x9040000f
>   04h    1         0x9041000f
>   06h    0         0x9060000f
>   06h    1         0x9061000f
>   10h    0         0x91000004
> 
> These are the only known steppings for those models.
> 
> Disable XSAVES on affected processors unless a matching model and
> stepping entry identifies a sufficiently recent microcode revision
> containing the fix. This allows the x86 FPU code to use XSAVEC
> instead.
...

      parent reply	other threads:[~2026-11-20  9:46 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-28 23:57 [PATCH] x86/cpu/hygon: Work around XSAVES Erratum 1386 Tina Zhang
2026-11-19 15:28 ` Dave Hansen
2026-11-20  1:51   ` Tina Zhang
2026-11-20  9:46 ` David Laight [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20261120094627.513b216e@pumpkin \
    --to=david.laight.linux@gmail.com \
    --cc=bp@alien8.de \
    --cc=dave.hansen@linux.intel.com \
    --cc=dengqiming@hygon.cn \
    --cc=hpa@zytor.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=puwen@hygon.cn \
    --cc=stable@vger.kernel.org \
    --cc=tglx@linutronix.de \
    --cc=x86@kernel.org \
    --cc=yangzhen@hygon.cn \
    --cc=zhang_wei@open-hieco.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox