From: Sean Christopherson <seanjc@google.com>
To: Sean Christopherson <seanjc@google.com>,
Paolo Bonzini <pbonzini@redhat.com>
Cc: kvm@vger.kernel.org, linux-kernel@vger.kernel.org,
Yosry Ahmed <yosry.ahmed@linux.dev>,
Jim Mattson <jmattson@google.com>,
David Kaplan <david.kaplan@amd.com>
Subject: [PATCH 0/2] KVM: x86: Plug an intra-guest Spectre v2 hole
Date: Tue, 27 Jan 2026 17:34:30 -0800 [thread overview]
Message-ID: <20260128013432.3250805-1-seanjc@google.com> (raw)
Fix a bug where KVM neglects to emit IBPB when a vCPU is migrated *back* to
a previous pCPU, in which case a misbehaving task B in the guest can unduly
infuence e.g. the BTB of task A in the guest (running in the same vCPU).
FWIW, I've had the first patch sitting around for several months as a
micro-optimization, but was never posted it as I wasn't 100% confident my
analysis was correct. But it makes plugging this hole much easier, so here
it is... Reviews most definitely welcome.
Sean Christopherson (2):
KVM: x86: Defer IBPBs for vCPU and nested transitions until core run
loop
KVM: x86: Emit IBPB on pCPU migration if IBPB is advertised to guest
arch/x86/include/asm/kvm_host.h | 1 +
arch/x86/kvm/x86.c | 20 +++++++++++++++++++-
arch/x86/kvm/x86.h | 2 +-
3 files changed, 21 insertions(+), 2 deletions(-)
base-commit: e81f7c908e1664233974b9f20beead78cde6343a
--
2.52.0.457.g6b5491de43-goog
next reply other threads:[~2026-01-28 1:34 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-01-28 1:34 Sean Christopherson [this message]
2026-01-28 1:34 ` [PATCH 1/2] KVM: x86: Defer IBPBs for vCPU and nested transitions until core run loop Sean Christopherson
2026-01-30 18:21 ` Yosry Ahmed
2026-12-03 20:55 ` Yosry Ahmed
2026-01-28 1:34 ` [PATCH 2/2] KVM: x86: Emit IBPB on pCPU migration if IBPB is advertised to guest Sean Christopherson
2026-01-30 18:22 ` Yosry Ahmed
2026-12-03 21:47 ` Yosry Ahmed
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=20260128013432.3250805-1-seanjc@google.com \
--to=seanjc@google.com \
--cc=david.kaplan@amd.com \
--cc=jmattson@google.com \
--cc=kvm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=pbonzini@redhat.com \
--cc=yosry.ahmed@linux.dev \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.