Skip to content

Distinguish between variants of IBPB

Jim Mattson kvm lkml 3 versions – Applied

Status from this message: Applied to kvm-x86 misc, thanks!

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v5 Latest4 patches 5 repliesApplied
  2. v43 patches 4 repliesSuperseded
  3. v34 patches 12 repliesSuperseded

Patches in v5 Applied

#Subject and filesSizeRepliesApplied
1/4x86/cpufeatures: Clarify semantics of X86_FEATURE_IBPBarch/x86/include/asm/cpufeatures.h+1 -10 replies
2/4x86/cpufeatures: Define X86_FEATURE_AMD_IBPB_RETarch/x86/include/asm/cpufeatures.h+1 -00 replies
3/4KVM: x86: Advertise AMD_IBPB_RET to userspacearch/x86/kvm/cpuid.c+1 -10 replies
4/4KVM: x86: AMD's IBPB is not equivalent to Intel's IBPBarch/x86/kvm/cpuid.c+8 -21 reply

Reviews trailers per patch

3 of 4 patches have a Reviewed-by or Acked-by.

PatchTom LendackyThomas Gleixner
1/4
2/4R-b R-b
3/4R-b R-b
4/4R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v5 thread

Cover letter [PATCH v5 0/4] Distinguish between variants of IBPB

Prior to Zen4, AMD's IBPB did not flush the RAS (or, in Intel terminology, the RSB). Hence, the older version of AMD's IBPB was not equivalent to Intel's IBPB. However, KVM has been treating them as equivalent, synthesizing Intel's CPUID.(EAX=7,ECX=0):EDX[bit 26] on any platform that supports the synthetic features X86_FEATURE_IBPB and X86_FEATURE_IBRS.

Equivalence also requires a previously ignored feature on the AMD side, CPUID Fn8000_0008_EBX[IBPB_RET], which is enumerated on Zen4.

v5: Restored the first commit, which was unintentionally dropped in v4.
Added Tom Lendacky's and Thomas Gleixner's Reviewed-by to the two commits that have not changed since v3.

v4: Added "guaranteed" to X86_FEATURE_IBPB comment [Pawan]
Changed logic for deducing AMD IBPB features from Intel IBPB features in kvm_set_cpu_caps [Tom]
Intel CPUs that suffer from PBRSB can't claim AMD_IBPB_RET [myself]

v3: Pass through IBPB_RET from hardware to userspace. [Tom]
Derive AMD_IBPB from X86_FEATURE_SPEC_CTRL rather than X86_FEATURE_IBPB. [Tom]
Clarify semantics of X86_FEATURE_IBPB.

v2: Use IBPB_RET to identify semantic equality. [Venkatesh]

Jim Mattson (4):
x86/cpufeatures: Clarify semantics of X86_FEATURE_IBPB x86/cpufeatures: Define X86_FEATURE_AMD_IBPB_RET
KVM: x86: Advertise AMD_IBPB_RET to userspace
KVM: x86: AMD's IBPB is not equivalent to Intel's IBPB

 arch/x86/include/asm/cpufeatures.h |  3 ++-
 arch/x86/kvm/cpuid.c               | 12 +++++++++---
 2 files changed, 11 insertions(+), 4 deletions(-)
Signature · 1 line
2.47.0.rc1.288.g06298d1525-goog