mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Borislav Petkov <bp@alien8.de>
To: Tina Zhang <zhang_wei@open-hieco.net>
Cc: x86@kernel.org, puwen@hygon.cn, tglx@linutronix.de,
	mingo@redhat.com, dave.hansen@linux.intel.com,
	andrew.cooper3@citrix.com, david.laight.linux@gmail.com,
	hpa@zytor.com, linux-kernel@vger.kernel.org, yangzhen@hygon.cn,
	dengqiming@hygon.cn, stable@vger.kernel.org
Subject: Re: [PATCH v3] x86/cpu/hygon: Work around XSAVES Erratum 1386
Date: Wed, 25 Nov 2026 20:47:20 -0800	[thread overview]
Message-ID: <20261126044720.GDawe52PLY9WWihaLw@fat_crate.local> (raw)
In-Reply-To: <20261124142632.844105-1-zhang_wei@open-hieco.net>

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

      reply	other threads:[~2026-11-26  4:47 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-24 14:26 Tina Zhang
2026-11-26  4:47 ` Borislav Petkov [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=20261126044720.GDawe52PLY9WWihaLw@fat_crate.local \
    --to=bp@alien8.de \
    --cc=andrew.cooper3@citrix.com \
    --cc=dave.hansen@linux.intel.com \
    --cc=david.laight.linux@gmail.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®