You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
CPUID Fn8000_0021_EAX reads as 0 in the WSL2 guest on Zen 5, kernel falls back to retpolines #41827
Fn8000_0021_EAX carries the extended feature bits the CPU has. Zen 4 and Zen 5 report AutomaticIBRS (bit 8) there, and the IBPB/SRSO bits the kernel looks for. The guest kernel should then pick AutoIBRS for Spectre v2 and stop complaining about SRSO microcode.
Actual Behavior
The leaf exists, but EAX comes back empty:
max ext leaf 0x80000021
Fn8000_0021: EAX=00000000 EBX=00000000 ECX=00000006 EDX=00000000
ECX still has a value, so the leaf is passed through. Only EAX is cleared. As a result the guest picks retpolines and prints the SRSO microcode warning on every boot:
Speculative Return Stack Overflow: IBPB-extending microcode not applied!
Spectre V2 : Mitigation: Retpolines
Speculative Return Stack Overflow: Vulnerable: No microcode
$ cat /sys/devices/system/cpu/vulnerabilities/spectre_v2
Mitigation: Retpolines; IBPB: conditional; IBRS_FW; STIBP: always-on; RSB filling; PBRSB-eIBRS: Not affected; BHI: Not affected
autoibrs, ibpb_brtype, sbpb and the other flags from this leaf are missing from /proc/cpuinfo.
I boot with spec_rstack_overflow=off in kernelCommandLine. Without it the kernel also turns on Safe RET on top of this, so the "Vulnerable: No microcode" line is with that override.
For comparison, reading the same leaf on the Windows side with PowerShell 7 ([System.Runtime.Intrinsics.X86.X86Base]::CpuId(0x80000021, 0)) gives EAX=0x00000001. So the root partition doesn't get much of the leaf either, but the guest loses even that one bit.
This may be part of what #14526 is seeing on AMD. That report shows the same "Retpolines" and "no microcode" strings and a large syscall overhead with mitigations on.
Diagnostic Logs
collect-wsl-logs.ps1 output is in the first comment.
If this a feature request, please reply with '/feature'. If this is a question, reply with '/question'. Otherwise, please attach logs by following the instructions below, your issue will not be reviewed unless they are added. These logs will help us understand what is going on in your machine.
How to collect WSL logs
Download and execute collect-wsl-logs.ps1 in an administrative powershell prompt:
The script will output the path of the log file once done.
If this is a networking issue, please use .\collect-wsl-logs.ps1 -LogProfile networking instead, following the instructions in Collect WSL logs for networking issues
Once completed please upload the output files to this GitHub issue.
If you choose to email these logs instead of attaching them to the bug, please send them to wsl-gh-logs@microsoft.com with the GitHub issue number in the subject, and include a link to your GitHub issue comment in the message body, and reply with '/emailed-logs'.
Oleg Tsvetkov (@Hekzory) thank you for opening this. I'm still concerned about the odd performance with kernel mitigations = off. I appreciate having more detail like this, since I'm less familiar with guest expectations for instruction sets
I confirmed OP's results with testing on Ryzen 7735HS . spec_rstack_overflow=off alone improves pipe throughput by ~17% . mitigations=off is nearly identical.
Thanks for testing this on the 7735HS. I reran the CPUID test on the same Ryzen 9 9900X with Windows 10.0.26300.10075, WSL 3.0.5.0, and kernel 6.18.58.1-microsoft-standard-WSL2.
CPUID.80000021H:EAX is now 0x00000020 on all 24 WSL vCPUs, up from 0x00000000 in the original report. The Windows root partition returns 0x00000021. AUTOIBRS and IBPB_BRTYPE are clear in both. The guest still reports Mitigation: Retpolines for Spectre v2 and Vulnerable: No microcode for SRSO with my existing spec_rstack_overflow=off setting.
Is this the expected CPUID exposure for Zen 5 under Hyper-V, and is there a plan to expose AUTOIBRS and the relevant SRSO capabilities to WSL2 guests?
Activity
github-actions commentedon Oct 7, 2026
Logs are required for review from WSL team
If this a feature request, please reply with '/feature'. If this is a question, reply with '/question'.
Otherwise, please attach logs by following the instructions below, your issue will not be reviewed unless they are added. These logs will help us understand what is going on in your machine.
How to collect WSL logs
Download and execute collect-wsl-logs.ps1 in an administrative powershell prompt:
The script will output the path of the log file once done.
If this is a networking issue, please use
.\collect-wsl-logs.ps1 -LogProfile networkinginstead, following the instructions in Collect WSL logs for networking issuesOnce completed please upload the output files to this GitHub issue.
See Collect WSL logs (recommended method).
If you choose to email these logs instead of attaching them to the bug, please send them to wsl-gh-logs@microsoft.com with the GitHub issue number in the subject, and include a link to your GitHub issue comment in the message body, and reply with '/emailed-logs'.
Hekzory commentedon Oct 7, 2026
WslLogs-2026-10-07_14-00-42.tar.gz
github-actions commentedon Oct 7, 2026
Diagnostic information
tonymet commentedon Nov 23, 2026
Oleg Tsvetkov (@Hekzory) thank you for opening this. I'm still concerned about the odd performance with kernel mitigations = off. I appreciate having more detail like this, since I'm less familiar with guest expectations for instruction sets
tonymet commentedon Nov 23, 2026
my results of your test case:
tonymet commentedon Nov 23, 2026
I confirmed OP's results with testing on Ryzen 7735HS .
spec_rstack_overflow=offalone improves pipe throughput by ~17% . mitigations=off is nearly identical.kernelCommandLine)ops/sec)usecs/op)sec)spec_rstack_overflow=on(default mitigations)spec_rstack_overflow=offmitigations=offfull results:
https://gist.github.com/tonymet/cb281a9da7746949189c3e65434a10ec#file-test-results-txt
tonymet commentedon Nov 23, 2026
I ran a broader register test of the ryzen7735 to see what other features were masked. These 4 were revealed as masked (same results as above)
Full Test results: https://gist.github.com/tonymet/cb281a9da7746949189c3e65434a10ec#file-ryzen_7735hs_full_results-txt
Hekzory commentedon Nov 23, 2026
Thanks for testing this on the 7735HS. I reran the CPUID test on the same Ryzen 9 9900X with Windows
10.0.26300.10075, WSL3.0.5.0, and kernel6.18.58.1-microsoft-standard-WSL2.CPUID.80000021H:EAXis now0x00000020on all 24 WSL vCPUs, up from0x00000000in the original report. The Windows root partition returns0x00000021.AUTOIBRSandIBPB_BRTYPEare clear in both. The guest still reportsMitigation: Retpolinesfor Spectre v2 andVulnerable: No microcodefor SRSO with my existingspec_rstack_overflow=offsetting.Is this the expected CPUID exposure for Zen 5 under Hyper-V, and is there a plan to expose
AUTOIBRSand the relevant SRSO capabilities to WSL2 guests?