Skip to content

KVM: x86: Unhost the *_CMD MSR mess

Sean Christopherson kvm lkml 1 version Applied

Status from this message: Applied to a one-off branch, kvm-x86 cmd_msrs, so that I can get this into

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest6 patches 15 repliesApplied

Patches in v1 Applied

#Subject and filesSizeRepliesApplied
1/6KVM: x86: Revert MSR_IA32_FLUSH_CMD.FLUSH_L1D enablingarch/x86/kvm/cpuid.c arch/x86/kvm/svm/svm.c arch/x86/kvm/vmx/nested.c +1 more+39 -771 reply
2/6KVM: VMX: Passthrough MSR_IA32_PRED_CMD based purely on host+guest CPUIDarch/x86/kvm/vmx/vmx.c+3 -131 reply
3/6KVM: SVM: Passthrough MSR_IA32_PRED_CMD based purely on host+guest CPUIDarch/x86/kvm/svm/svm.c+4 -10 replies
4/6KVM: x86: Move MSR_IA32_PRED_CMD WRMSR emulation to common codearch/x86/kvm/svm/svm.c arch/x86/kvm/vmx/vmx.c arch/x86/kvm/x86.c+11 -281 reply
5/6KVM: x86: Virtualize FLUSH_L1D and passthrough MSR_IA32_FLUSH_CMDarch/x86/kvm/cpuid.c arch/x86/kvm/svm/svm.c arch/x86/kvm/vmx/nested.c +3 more+27 -26 replies
6/6KVM: SVM: Return the local "r" variable from svm_set_msr()arch/x86/kvm/svm/svm.c+5 -50 replies

Reviews trailers per patch

2 of 6 patches have a Reviewed-by or Acked-by.

PatchMathias KrauseXiaoyao Li
1/6T-b
2/6R-b
3/6
4/6R-b
5/6
6/6

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/6] KVM: x86: Unhost the *_CMD MSR mess

Revert the FLUSH_L1D enabling, which has multiple fatal bugs, clean up the existing PRED_CMD handling, and reintroduce FLUSH_L1D virtualization without inheriting the mistakes made by PRED_CMD.

The last patch hardens SVM against one of the bugs introduced in the FLUSH_L1D enabling.

I'll post KUT patches tomorrow. I have the tests written (and they found bugs in my code, :shocked-pikachu:), just need to write the changelogs. Wanted to get this out sooner than later as I'm guessing I'm not the only one whose VMs won't boot on Intel CPUs...

Sean Christopherson (6):
KVM: x86: Revert MSR_IA32_FLUSH_CMD.FLUSH_L1D enabling
KVM: VMX: Passthrough MSR_IA32_PRED_CMD based purely on host+guest
CPUID
KVM: SVM: Passthrough MSR_IA32_PRED_CMD based purely on host+guest
CPUID
KVM: x86: Move MSR_IA32_PRED_CMD WRMSR emulation to common code
KVM: x86: Virtualize FLUSH_L1D and passthrough MSR_IA32_FLUSH_CMD
KVM: SVM: Return the local "r" variable from svm_set_msr()

 arch/x86/kvm/svm/svm.c | 51 +++++++++++-----------------------------
 arch/x86/kvm/vmx/vmx.c | 53 +++++++-----------------------------------
 arch/x86/kvm/vmx/vmx.h |  2 +-
 arch/x86/kvm/x86.c     | 23 ++++++++++++++++++
 4 files changed, 46 insertions(+), 83 deletions(-)

base-commit: d8708b80fa0e6e21bc0c9e7276ad0bccef73b6e7

Signature · 1 line
2.40.0.rc2.332.ga46443480c-goog