public inbox for linux-coco@lists.linux.dev
 help / color / mirror / Atom feed
From: Kim Phillips <kim.phillips@amd.com>
To: <linux-kernel@vger.kernel.org>, <kvm@vger.kernel.org>,
	<linux-coco@lists.linux.dev>, <x86@kernel.org>
Cc: 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>,
	Borislav Petkov <borislav.petkov@amd.com>,
	Borislav Petkov <bp@alien8.de>, Naveen Rao <naveen.rao@amd.com>,
	David Kaplan <david.kaplan@amd.com>,
	Kim Phillips <kim.phillips@amd.com>
Subject: [PATCH 0/2] KVM: SEV: Add support for IBPB-on-Entry
Date: Mon, 26 Jan 2026 16:42:03 -0600	[thread overview]
Message-ID: <20260126224205.1442196-1-kim.phillips@amd.com> (raw)

AMD EPYC 5th generation and above processors support IBPB-on-Entry
for SNP guests.  By invoking an Indirect Branch Prediction Barrier
(IBPB) on VMRUN, old indirect branch predictions are prevented
from influencing indirect branches within the guest.

The first patch is guest-side support which unmasks the Zen5+ feature
bit to allow kernel guests to set the feature.

The second patch is host-side support that checks the CPUID and
then sets the feature bit in the VMSA supported features mask.

Based on https://github.com/kvm-x86/linux kvm-x86/next
(kvm-x86-next-2026.01.23, e81f7c908e16).

This series also available here:

https://github.com/AMDESE/linux/tree/ibpb-on-entry-latest

Advance qemu bits (to add ibpb-on-entry=on/off switch) available here:

https://github.com/AMDESE/qemu/tree/ibpb-on-entry-latest

Qemu bits will be posted upstream once kernel bits are merged.
They depend on Naveen Rao's "target/i386: SEV: Add support for
enabling VMSA SEV features":

https://lore.kernel.org/qemu-devel/cover.1761648149.git.naveen@kernel.org/

Kim Phillips (2):
  KVM: SEV: IBPB-on-Entry guest support
  KVM: SEV: Add support for IBPB-on-Entry

 arch/x86/boot/compressed/sev.c     | 1 +
 arch/x86/coco/sev/core.c           | 1 +
 arch/x86/include/asm/cpufeatures.h | 1 +
 arch/x86/include/asm/msr-index.h   | 5 ++++-
 arch/x86/include/asm/svm.h         | 1 +
 arch/x86/kvm/svm/sev.c             | 9 ++++++++-
 6 files changed, 16 insertions(+), 2 deletions(-)


base-commit: e81f7c908e1664233974b9f20beead78cde6343a
-- 
2.43.0


             reply	other threads:[~2026-01-26 22:42 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-01-26 22:42 Kim Phillips [this message]
2026-01-26 22:42 ` [PATCH 1/2] KVM: SEV: IBPB-on-Entry guest support Kim Phillips
2026-01-27  6:19   ` Nikunj A. Dadhania
2026-01-28 19:02   ` Tom Lendacky
2026-01-28 19:23   ` Borislav Petkov
2026-01-29  0:38     ` Kim Phillips
2026-01-29 10:51       ` Borislav Petkov
2026-01-29 22:32         ` Kim Phillips
2026-01-30 12:32           ` Borislav Petkov
2026-01-30 14:56             ` Tom Lendacky
2026-01-30 15:45               ` Borislav Petkov
2026-02-02 15:38                 ` Tom Lendacky
2026-02-02 15:49                   ` Borislav Petkov
2026-02-02 16:09                     ` Tom Lendacky
2026-02-02 17:12                       ` Borislav Petkov
2026-01-26 22:42 ` [PATCH 2/2] KVM: SEV: Add support for IBPB-on-Entry Kim Phillips
2026-01-27  6:38   ` Nikunj A. Dadhania
2026-01-27 20:56     ` Kim Phillips
2026-01-28 19:08   ` Tom Lendacky

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=20260126224205.1442196-1-kim.phillips@amd.com \
    --to=kim.phillips@amd.com \
    --cc=borislav.petkov@amd.com \
    --cc=bp@alien8.de \
    --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=naveen.rao@amd.com \
    --cc=nikunj@amd.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