Skip to content

KVM: x86: MSR_TSC_AUX fixes and improvements

Sean Christopherson kvm lkml 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v3 Latest4 patches 9 repliesIn review

Changes in v3 from the cover letter

- Fix a comment typo. [Reiji]
- Add patches to add missing guest_cpuid_has() check, drop bits 63:32 on AMD, and unify VMX and SVM emulation.
- Rebase to kvm/next, commit c4f71901d53b ("Merge tag 'kvmarm-5.13' ... )

Patches in v3 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/4KVM: SVM: Inject #GP on guest MSR_TSC_AUX accesses if RDTSCP unsupportedarch/x86/kvm/svm/svm.c+7 -01 reply
2/4KVM: SVM: Clear MSR_TSC_AUX[63:32] on writearch/x86/kvm/svm/svm.c+10 -13 replies
3/4KVM: x86: Tie Intel and AMD behavior for MSR_TSC_AUX to guest CPU modelarch/x86/kvm/svm/svm.c arch/x86/kvm/vmx/vmx.c arch/x86/kvm/x86.c+35 -344 replies
4/4KVM: SVM: Delay restoration of host MSR_TSC_AUX until return to userspacearch/x86/kvm/svm/svm.c arch/x86/kvm/svm/svm.h+23 -360 replies

Reviews trailers per patch

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

PatchVitaly Kuznetsov
1/4R-b
2/4
3/4
4/4

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

Read the v3 thread

Cover letter [PATCH v3 0/4] KVM: x86: MSR_TSC_AUX fixes and improvements

Fix potential cross-vendor landmines due to Intel and AMD having different behavior for MSR_TSC_AUX[63:32], unify the logic across SVM and VMX, and switch MSR_TSC_AUX via user return MSRs on SVM (the original goal).

v3:
- Fix a comment typo. [Reiji]
- Add patches to add missing guest_cpuid_has() check, drop bits 63:32 on AMD, and unify VMX and SVM emulation.
- Rebase to kvm/next, commit c4f71901d53b ("Merge tag 'kvmarm-5.13' ... )

v2:
- Rebase to kvm/queue (ish), commit 0e91d1992235 ("KVM: SVM: Allocate SEV command structures on local stack")
- https://lkml.kernel.org/r/[email protected]

v1: https://lkml.kernel.org/r/[email protected]

Sean Christopherson (4):
KVM: SVM: Inject #GP on guest MSR_TSC_AUX accesses if RDTSCP
unsupported
KVM: SVM: Clear MSR_TSC_AUX[63:32] on write
KVM: x86: Tie Intel and AMD behavior for MSR_TSC_AUX to guest CPU
model
KVM: SVM: Delay restoration of host MSR_TSC_AUX until return to
userspace

 arch/x86/kvm/svm/svm.c | 58 +++++++++++++++++-------------------------
 arch/x86/kvm/svm/svm.h |  7 -----
 arch/x86/kvm/vmx/vmx.c | 13 ----------
 arch/x86/kvm/x86.c     | 34 +++++++++++++++++++++++++
 4 files changed, 58 insertions(+), 54 deletions(-)
Signature · 1 line
2.31.1.498.g6c1eba8ee3d-goog