From: Sasha Levin <sashal@kernel.org>
To: patches@lists.linux.dev, stable@vger.kernel.org
Cc: "Borislav Petkov (AMD)" <bp@alien8.de>,
Ingo Molnar <mingo@kernel.org>, Sasha Levin <sashal@kernel.org>,
peterz@infradead.org, dave.hansen@linux.intel.com,
mario.limonciello@amd.com, riel@surriel.com,
yazen.ghannam@amd.com, xin@zytor.com,
alexandre.f.demers@gmail.com, darwi@linutronix.de,
sandipan.das@amd.com
Subject: [PATCH AUTOSEL 6.17] x86/CPU/AMD: Extend Zen6 model range
Date: Mon, 3 Nov 2025 13:02:31 -0500 [thread overview]
Message-ID: <20251103180246.4097432-18-sashal@kernel.org> (raw)
In-Reply-To: <20251103180246.4097432-1-sashal@kernel.org>
From: "Borislav Petkov (AMD)" <bp@alien8.de>
[ Upstream commit 847ebc4476714f81d7dea73e5ea69448d7fe9d3a ]
Add some more Zen6 models.
Signed-off-by: Borislav Petkov (AMD) <bp@alien8.de>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Link: https://patch.msgid.link/20251029123056.19987-1-bp@kernel.org
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
LLM Generated explanations, may be completely bogus:
Now let me compile my comprehensive analysis:
## ANALYSIS RESULTS
**ANSWER: YES**
This commit should be backported to stable kernel trees.
### Detailed Analysis
#### 1. Semantic Code Analysis Performed
**Tools Used:**
- `mcp__semcode__find_function`: Located the `bsp_init_amd` function
(arch/x86/kernel/cpu/amd.c:421-542)
- `mcp__semcode__find_callers`: Determined that `bsp_init_amd` is called
indirectly via function pointer in `amd_cpu_dev` structure
- `Grep` and git analysis: Examined usage patterns and historical
context
**Key Findings:**
- The function `bsp_init_amd` is called during early CPU initialization
as part of the AMD CPU detection chain
- No direct callers found by semantic analysis because it's invoked via
the `.c_bsp_init` callback in the CPU vendor structure
- X86_FEATURE_ZEN6 is currently only set by this detection code and not
yet actively consumed by other subsystems
#### 2. Code Change Analysis
The commit modifies a single line in `arch/x86/kernel/cpu/amd.c`:
```c
case 0x50 ... 0x5f:
-case 0x90 ... 0xaf:
+case 0x80 ... 0xaf: // Extends range to include models 0x80-0x8f
case 0xc0 ... 0xcf:
setup_force_cpu_cap(X86_FEATURE_ZEN6);
```
This extends the Zen6 model range from `0x90...0xaf` to `0x80...0xaf`,
adding 16 new CPU models (0x80-0x8f) to the Zen6 detection.
#### 3. Impact Without This Fix
On Zen6 CPUs with models 0x80-0x8f running stable kernels without this
patch:
1. **CPU Misidentification**: The CPU won't be recognized as Zen6
architecture
2. **Kernel Warning**: The code falls through to the `warn:` label (line
541), triggering: `WARN_ONCE(1, "Family 0x%x, model: 0x%x??\n",
c->x86, c->x86_model);`
3. **Missing Optimization**: X86_FEATURE_ZEN6 won't be set, potentially
causing the CPU to miss Zen6-specific optimizations, workarounds, or
features
4. **Future Code Impact**: Any future kernel code that checks for
X86_FEATURE_ZEN6 won't activate for these CPUs
#### 4. Historical Precedent
Analysis of similar commits shows a clear pattern of backporting:
**Commit 3b491b102cd2c** (Zen5 model addition):
- Added models 0x10-0x1f to Zen5 range
- Contains `Fixes: 3e4147f33f8b` tag
- Was backported to stable (upstream 2718a7fdf292b)
**Commit b348eac11cb3f** (Zen5 model addition):
- Added models 0x60-0x6f to Zen5 range
- Contains `[ Upstream commit bf5641eccf71b ]` indicating stable
backport
- Signed-off-by Sasha Levin for stable
**Pattern**: AMD CPU model range extensions have consistently been
backported to stable kernels.
#### 5. Backport Suitability Assessment
**Meets Stable Tree Criteria:**
- ✅ **Bug Fix**: Fixes CPU misidentification for existing hardware
- ✅ **Hardware Enablement**: Enables proper detection of new Zen6 CPU
models
- ✅ **Small & Contained**: Single-line change, minimal scope
- ✅ **Low Risk**: Only affects CPU model detection, no architectural
changes
- ✅ **No New Features**: Doesn't add functionality, just extends
existing detection
- ✅ **User Impact**: Users with new Zen6 CPUs will see kernel warnings
without this
**Risk Assessment:**
- Change is trivial (range extension: `0x90` → `0x80`)
- No dependencies on other commits
- No behavioral changes to existing code paths
- Cannot cause regressions on CPUs outside the 0x80-0x8f range
#### 6. Why No Stable Tags?
The commit lacks explicit `Cc: stable@vger.kernel.org` or `Fixes:` tags,
likely because:
- It was committed recently (October 29, 2025) as v6.18-rc4 material
- AMD maintainers may expect autoselection for stable based on
historical patterns
- The fix addresses newly released hardware that may not yet be in
users' hands
However, the pattern of similar commits being backported and the nature
of the fix (hardware enablement for released products) strongly
indicates this should go to stable.
### Recommendation
**Backport Status: YES**
This commit should be backported to all stable kernel versions that
contain the X86_FEATURE_ZEN6 infrastructure (introduced in commit
24ee8d9432b57, first appearing in v6.15). This ensures users with new
Zen6 CPU models receive proper hardware support without kernel warnings.
arch/x86/kernel/cpu/amd.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/x86/kernel/cpu/amd.c b/arch/x86/kernel/cpu/amd.c
index a11e17f3b4b1b..e7e3a6fc6153a 100644
--- a/arch/x86/kernel/cpu/amd.c
+++ b/arch/x86/kernel/cpu/amd.c
@@ -516,7 +516,7 @@ static void bsp_init_amd(struct cpuinfo_x86 *c)
setup_force_cpu_cap(X86_FEATURE_ZEN5);
break;
case 0x50 ... 0x5f:
- case 0x90 ... 0xaf:
+ case 0x80 ... 0xaf:
case 0xc0 ... 0xcf:
setup_force_cpu_cap(X86_FEATURE_ZEN6);
break;
--
2.51.0
next prev parent reply other threads:[~2025-11-03 18:03 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-11-03 18:02 [PATCH AUTOSEL 6.17-5.10] net: tls: Cancel RX async resync request on rcd_delta overflow Sasha Levin
2025-11-03 18:02 ` [PATCH AUTOSEL 6.17] sched_ext: Allocate scx_kick_cpus_pnt_seqs lazily using kvzalloc() Sasha Levin
2025-11-03 18:02 ` [PATCH AUTOSEL 6.17] perf/x86/intel/uncore: Add uncore PMU support for Wildcat Lake Sasha Levin
2025-11-03 18:02 ` [PATCH AUTOSEL 6.17-6.12] net: tls: Change async resync helpers argument Sasha Levin
2025-11-03 18:02 ` [PATCH AUTOSEL 6.17-6.1] bcma: don't register devices disabled in OF Sasha Levin
2025-11-03 18:02 ` [PATCH AUTOSEL 6.17-6.12] blk-crypto: use BLK_STS_INVAL for alignment errors Sasha Levin
2025-11-03 18:02 ` [PATCH AUTOSEL 6.17] drm/msm: Fix pgtable prealloc error path Sasha Levin
2025-11-03 18:02 ` [PATCH AUTOSEL 6.17] ALSA: hda/realtek: Add quirk for Lenovo Yoga 7 2-in-1 14AKP10 Sasha Levin
2025-11-03 18:02 ` [PATCH AUTOSEL 6.17-6.1] cifs: fix typo in enable_gcm_256 module parameter Sasha Levin
2025-11-03 18:02 ` [PATCH AUTOSEL 6.17] smb: client: handle lack of IPC in dfs_cache_refresh() Sasha Levin
2025-11-03 18:02 ` [PATCH AUTOSEL 6.17] ASoC: rt721: fix prepare clock stop failed Sasha Levin
2025-11-03 18:02 ` [PATCH AUTOSEL 6.17] sched_ext: defer queue_balance_callback() until after ops.dispatch Sasha Levin
2025-11-03 18:02 ` [PATCH AUTOSEL 6.17-5.4] kconfig/nconf: Initialize the default locale at startup Sasha Levin
2025-11-03 18:02 ` [PATCH AUTOSEL 6.17-5.10] scsi: core: Fix a regression triggered by scsi_host_busy() Sasha Levin
2025-11-03 18:02 ` [PATCH AUTOSEL 6.17-5.15] selftests: net: use BASH for bareudp testing Sasha Levin
2025-11-03 18:02 ` [PATCH AUTOSEL 6.17] ALSA: hda/realtek: Fix mute led for HP Victus 15-fa1xxx (MB 8C2D) Sasha Levin
2025-11-03 18:02 ` [PATCH AUTOSEL 6.17-6.6] x86/microcode/AMD: Limit Entrysign signature checking to known generations Sasha Levin
2025-11-03 18:02 ` Sasha Levin [this message]
2025-11-03 18:02 ` [PATCH AUTOSEL 6.17-5.4] kconfig/mconf: Initialize the default locale at startup Sasha Levin
2025-11-03 18:02 ` [PATCH AUTOSEL 6.17] selftests: cachestat: Fix warning on declaration under label Sasha Levin
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=20251103180246.4097432-18-sashal@kernel.org \
--to=sashal@kernel.org \
--cc=alexandre.f.demers@gmail.com \
--cc=bp@alien8.de \
--cc=darwi@linutronix.de \
--cc=dave.hansen@linux.intel.com \
--cc=mario.limonciello@amd.com \
--cc=mingo@kernel.org \
--cc=patches@lists.linux.dev \
--cc=peterz@infradead.org \
--cc=riel@surriel.com \
--cc=sandipan.das@amd.com \
--cc=stable@vger.kernel.org \
--cc=xin@zytor.com \
--cc=yazen.ghannam@amd.com \
/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;
as well as URLs for NNTP newsgroup(s).