mirror of https://lore.kernel.org/lkml/
 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 14:44:30 +0000	[thread overview]
Message-ID: <20261120144430.0b1b43a3@pumpkin> (raw)
In-Reply-To: <22eb33f3-a6f7-43b6-837b-74c8f5a3428b@open-hieco.net>

On Fri, 20 Nov 2026 22:12:59 +0800
Tina Zhang <zhang_wei@open-hieco.net> wrote:

> Hi David,
> 
> 
> On 11/20/2026 5:46 PM, David Laight wrote:
> > 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?  
> 
> Did you mean that the kernel could prefer XSAVEC when no supervisor 
> XSAVE state needs to be saved, rather than clearing X86_FEATURE_XSAVES 
> on the affected processors?

Or when there can never be any supervisor XSAVE state to be saved.
I rather lost track of these instructions after XSAVEOPT.

David

> 
> That sounds reasonable in principle, although IIUC it would require 
> changes to the current xstate instruction selection logic.
> 
> Thanks,
> Tina
> 


  reply	other threads:[~2026-11-20 14:44 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-28 23:57 Tina Zhang
2026-11-19 15:28 ` Dave Hansen
2026-11-20  1:51   ` Tina Zhang
2026-11-20  9:46 ` David Laight
2026-11-20 14:12   ` Tina Zhang
2026-11-20 14:44     ` David Laight [this message]
2026-11-20 14:57       ` Dave Hansen

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=20261120144430.0b1b43a3@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

all inboxes | Powered by JetHome®