Re: [PATCH v5 2/8] x86/bugs: Allow spectre_v2=ibrs on x86 vendors other than Intel
From: Kim Phillips
Date: Wed Sep 30 2026 - 19:21:16 EST
@Sean, @Paolo, Please consider merging the rest of this patchseries (patches 3-8), as they can go through the KVM tree directly as-is because they does not depend on this or the prior patch 1/8 other than for performance reasons. Thank you!
On 9/29/26 10:06 PM, Borislav Petkov wrote:
On Fri, Sep 18, 2026 at 06:01:55PM -0500, Kim Phillips wrote:
SPEC_CTRL.IBRS is architectural and behaves on AMD just like it does onSame comments as to the other one: We need:
Intel, but the kernel offers spectre_v2=ibrs on Intel only: the option is
rejected at parse time on other vendors, and MITIGATION_IBRS_ENTRY cannot
even be built into an AMD-only kernel.
AMD's SNP BTB Isolation needs the kernel to toggle legacy IBRS in order to
optimize the VM exit-to-re-entry path, and right now there is no way to ask
for kernel IBRS on an AMD machine at all.
- a proper use case which is *actually* useful to users
How is optimizing the VM exit-to-re-entry path not "*actually* useful to users"?
If BTB Isolation users want to use BTB Isolation, they'd want what the AMD APM recommends: To use spectre_v2=ibrs: what is wrong with that?
For this Node-ID getting cpuid script that causes lots of VMEXITS:
for i in \`seq 0 1000\`; do sudo taskset -c 0 cpuid -1 -k -l 0x8000001e > c0; done
I get these stats:
v2=(retpolines), btb-isol=off v2=(retpolines), btb-isol=on
8135634850 l1btb-accesses 8237924785 l1btb-accesses 101%
2292830105 l1btb-misses 2479438191 l1btb-misses 108%
2254370689 l2btb-misses 2462526637 l2btb-misses 109%
38479671 l2btb-hits 16912146 l2btb-hits 44%
2292846687 l2btb-accesses 2479437240 l2btb-accesses 108%
6.591965727 seconds time 6.410626779 seconds time elapsed 97%
v2=ibrs, btb-isol=off v2=ibrs, btb-isol=on
9079195678 l1btb-accesses 7735439435 l1btb-accesses 85%
3420759821 l1btb-misses 2264575904 l1btb-misses 66%
3385686214 l2btb-misses 2226743253 l2btb-misses 66%
35073337 l2btb-hits 37834099 l2btb-hits 108%
3420753266 l2btb-accesses 2264587491 l2btb-accesses 66%
7.019508776 seconds time 6.408415958 seconds time elapsed 91%
Does *that* help?
Kim
- have it properly documented in Documentation/admin-guide/hw-vuln/ along with
the potential impact so that people can make an *informed* decision whether
they really want it
Without any justification for the added complexity to what already is
a maintenance nightmare, there's no point.
Thx.