From: Kim Phillips <kim.phillips@amd.com>
To: Borislav Petkov <bp@alien8.de>,
Sean Christopherson <seanjc@google.com>,
Paolo Bonzini <pbonzini@redhat.com>
Cc: <linux-kernel@vger.kernel.org>, <x86@kernel.org>,
<linux-coco@lists.linux.dev>, <kvm@vger.kernel.org>,
Sean Christopherson <seanjc@google.com>,
Paolo Bonzini <pbonzini@redhat.com>,
K Prateek Nayak <kprateek.nayak@amd.com>,
Nikunj A Dadhania <nikunj@amd.com>,
Tom Lendacky <thomas.lendacky@amd.com>,
Michael Roth <michael.roth@amd.com>,
Naveen Rao <naveen.rao@amd.com>,
David Kaplan <david.kaplan@amd.com>,
Pawan Gupta <pawan.kumar.gupta@linux.intel.com>,
Dave Hansen <dave.hansen@linux.intel.com>,
Nathan Fontenot <nathan.fontenot@amd.com>
Subject: Re: [PATCH v5 2/8] x86/bugs: Allow spectre_v2=ibrs on x86 vendors other than Intel
Date: Wed, 30 Sep 2026 14:50:23 -0500 [thread overview]
Message-ID: <ec3073de-74b5-4321-8ca0-5d00ac288816@amd.com> (raw)
In-Reply-To: <20260930030650.GDarx8yvplZzQtGDBz@fat_crate.local>
@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 on
>> 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.
> Same comments as to the other one: We need:
>
> - 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.
>
next prev parent reply other threads:[~2026-09-30 19:50 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-26 22:35 [PATCH v5 0/8] Add SEV-SNP BTB Isolation and IBPB-on-Entry guest features Kim Phillips
2026-08-26 22:35 ` [PATCH v5 1/8] x86/bugs: Allow forcing Automatic IBRS with SNP active using spectre_v2=eibrs Kim Phillips
2026-08-27 4:32 ` Pawan Gupta
2026-09-03 4:03 ` Borislav Petkov
2026-09-18 23:00 ` Kim Phillips
2026-09-24 1:45 ` Borislav Petkov
2026-09-24 18:45 ` Kim Phillips
2026-09-25 16:47 ` Borislav Petkov
2026-09-26 2:14 ` Kim Phillips
2026-08-26 22:35 ` [PATCH v5 2/8] x86/bugs: Allow spectre_v2=ibrs on x86 vendors other than Intel Kim Phillips
2026-08-27 4:33 ` Pawan Gupta
2026-09-09 21:01 ` Borislav Petkov
2026-09-18 23:01 ` Kim Phillips
2026-09-30 3:06 ` Borislav Petkov
2026-09-30 19:50 ` Kim Phillips [this message]
2026-10-01 0:12 ` Borislav Petkov
2026-08-26 22:35 ` [PATCH v5 3/8] KVM: SVM: Define SVM_SEV_FEAT_* flags using BIT_ULL() Kim Phillips
2026-08-26 22:35 ` [PATCH v5 4/8] KVM: selftests: sev_init2: Use BIT_ULL for VMSA feature bit definition Kim Phillips
2026-08-26 22:35 ` [PATCH v5 5/8] KVM: SEV: Disallow setting SNP-only features for non-SNP guests via a single mask Kim Phillips
2026-08-26 22:35 ` [PATCH v5 6/8] KVM: SEV: Advertise SVM_SEV_FEAT_SNP_ACTIVE Kim Phillips
2026-08-26 22:35 ` [PATCH v5 7/8] KVM: SEV: Add support for IBPB-on-Entry Kim Phillips
2026-08-26 22:35 ` [PATCH v5 8/8] KVM: SEV: Add support for SNP BTB Isolation Kim Phillips
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=ec3073de-74b5-4321-8ca0-5d00ac288816@amd.com \
--to=kim.phillips@amd.com \
--cc=bp@alien8.de \
--cc=dave.hansen@linux.intel.com \
--cc=david.kaplan@amd.com \
--cc=kprateek.nayak@amd.com \
--cc=kvm@vger.kernel.org \
--cc=linux-coco@lists.linux.dev \
--cc=linux-kernel@vger.kernel.org \
--cc=michael.roth@amd.com \
--cc=nathan.fontenot@amd.com \
--cc=naveen.rao@amd.com \
--cc=nikunj@amd.com \
--cc=pawan.kumar.gupta@linux.intel.com \
--cc=pbonzini@redhat.com \
--cc=seanjc@google.com \
--cc=thomas.lendacky@amd.com \
--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
all inboxes | Powered by JetHome®