public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Sohil Mehta <sohil.mehta@intel.com>
To: Joongsun Moon-Lee <moontorise@cfg.kr>, <x86@kernel.org>,
	Thomas Gleixner <tglx@kernel.org>, Ingo Molnar <mingo@redhat.com>,
	Borislav Petkov <bp@alien8.de>,
	Dave Hansen <dave.hansen@linux.intel.com>
Cc: "H . Peter Anvin" <hpa@zytor.com>,
	Peter Zijlstra <peterz@infradead.org>,
	Pawan Gupta <pawan.kumar.gupta@linux.intel.com>,
	Josh Poimboeuf <jpoimboe@kernel.org>,
	<linux-kernel@vger.kernel.org>
Subject: Re: [PATCH v2 2/2] x86/cpu/intel: Add implicit RFDS mitigation for Goldmont and Tremont-D
Date: Fri, 30 Jan 2026 14:28:02 -0800	[thread overview]
Message-ID: <8fc7cdab-b4a5-4899-8032-842884cb7540@intel.com> (raw)
In-Reply-To: <20260130123340.1544-3-moontorise@cfg.kr>

On 1/30/2026 4:33 AM, Joongsun Moon-Lee wrote:

>  static void init_intel(struct cpuinfo_x86 *c)
>  {
>  	early_init_intel(c);
> @@ -612,6 +622,10 @@ static void init_intel(struct cpuinfo_x86 *c)
>  	if (x86_match_cpu(zmm_exclusion_list))
>  		set_cpu_cap(c, X86_FEATURE_PREFER_YMM);
>  
> +	if (x86_match_cpu(implicit_rfds_list) &&
> +	    !boot_cpu_has_bug(X86_BUG_OLD_MICROCODE))
> +		setup_force_cpu_cap(X86_FEATURE_RFDS_CLEAR);
> +


I do not understand the usage of X86_BUG_OLD_MICROCODE over here.
"old_microcode" by design is a moving target. That would imply that this
feature/mitigation would depend on keeping the microcode up-to-date.

Let's say for example that a new microcode blob gets released for
INTEL_ATOM_GOLDMONT for some unrelated reason. Do we want the kernel
behavior for RFDS_CLEAR feature to change just because someone didn't
perform the update?

If this is intentional, we should probably add a comment here or near
"struct x86_cpu_id implicit_rfds_list" to describe this choice.

I see that Dave suggested this in the previous review to avoid checks
such as (c->microcode >= 0x4c000026). But, that seems redundant in some
sense.

You could simply do:
	if (x86_match_cpu(implicit_rfds_list)
		setup_force_cpu_cap(X86_FEATURE_RFDS_CLEAR);

The old microcode mechanism will work independently and complain
separately about the user not running with the latest microcode.
Old microcode by definition means:
"CPU has old microcode, it is surely vulnerable to something."

This way Linux behavior for this feature doesn't vary from one kernel to
another.


      parent reply	other threads:[~2026-01-30 22:28 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-01-29 15:43 [PATCH] x86/cpu/intel: Add RFDS mitigation quirk for Goldmont and Tremont-D moontorise
2026-01-29 16:37 ` Dave Hansen
2026-01-30 12:33 ` [PATCH v2 0/2] " Joongsun Moon-Lee
2026-01-30 12:33   ` [PATCH v2 1/2] x86/cpu: Refactor RFDS mitigation to use X86_FEATURE_RFDS_CLEAR Joongsun Moon-Lee
2026-01-30 21:40     ` Borislav Petkov
2026-01-30 12:33   ` [PATCH v2 2/2] x86/cpu/intel: Add implicit RFDS mitigation for Goldmont and Tremont-D Joongsun Moon-Lee
2026-01-30 17:50     ` Dave Hansen
2026-02-02 12:32       ` Joongsun Moon-Lee
2026-01-30 22:28     ` Sohil Mehta [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=8fc7cdab-b4a5-4899-8032-842884cb7540@intel.com \
    --to=sohil.mehta@intel.com \
    --cc=bp@alien8.de \
    --cc=dave.hansen@linux.intel.com \
    --cc=hpa@zytor.com \
    --cc=jpoimboe@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=moontorise@cfg.kr \
    --cc=pawan.kumar.gupta@linux.intel.com \
    --cc=peterz@infradead.org \
    --cc=tglx@kernel.org \
    --cc=x86@kernel.org \
    /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