Skip to content

Unify IBRS virtualization

Yosry Ahmed kvm lkml 1 version Applied

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

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest3 patches 9 repliesApplied

Patches in v1 Applied

#Subject and filesSizeRepliesApplied
1/3x86/cpufeatures: Define X86_FEATURE_AMD_IBRS_SAME_MODEarch/x86/include/asm/cpufeatures.h tools/arch/x86/include/asm/cpufeatures.h+2 -00 replies
2/3KVM: x86: Propagate AMD's IbrsSameMode to the guestarch/x86/kvm/cpuid.c+1 -00 replies
3/3KVM: x86: Generalize IBRS virtualization on emulated VM-exitarch/x86/kvm/svm/nested.c arch/x86/kvm/vmx/nested.c arch/x86/kvm/x86.h+21 -105 replies

Reviews trailers per patch

1 of 3 patches has a Reviewed-by or Acked-by.

PatchJim Mattson
1/3
2/3
3/3R-b

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

Read the v1 thread

Cover letter [PATCH 0/3] Unify IBRS virtualization

To properly virtualize IBRS on Intel, an IBPB is executed on emulated VM-exits to provide separate predictor modes for L1 and L2.

Similar handling is theoretically needed for AMD, unless IbrsSameMode is enumerated by the CPU (which should be the case for most/all CPUs anyway). For correctness and clarity, this series generalizes the handling to apply for both Intel and AMD as needed.

I am not sure if this series would land through the kvm-x86 tree or the tip/x86 tree.

Yosry Ahmed (3):
x86/cpufeatures: Define X86_FEATURE_AMD_IBRS_SAME_MODE
KVM: x86: Propagate AMD's IbrsSameMode to the guest
KVM: x86: Generalize IBRS virtualization on emulated VM-exit

 arch/x86/include/asm/cpufeatures.h       |  1 +
 arch/x86/kvm/cpuid.c                     |  1 +
 arch/x86/kvm/svm/nested.c                |  2 ++
 arch/x86/kvm/vmx/nested.c                | 11 +----------
 arch/x86/kvm/x86.h                       | 18 ++++++++++++++++++
 tools/arch/x86/include/asm/cpufeatures.h |  1 +
 6 files changed, 24 insertions(+), 10 deletions(-)
Signature · 1 line
2.48.1.601.g30ceb7b040-goog