Skip to content

KVM support for TSC scaling

Joerg Roedel kvm lkml 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest6 patches 15 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/6KVM: SVM: Advance instruction pointer in dr_interceptarch/x86/kvm/svm.c+2 -03 replies
2/6KVM: SVM: Implement infrastructure for TSC_RATE_MSRarch/x86/include/asm/msr-index.h arch/x86/kvm/svm.c+37 -10 replies
3/6KVM: X86: Let kvm-clock report the right tsc frequencyarch/x86/include/asm/kvm_host.h arch/x86/kvm/svm.c arch/x86/kvm/vmx.c +1 more+26 -20 replies
4/6KVM: SVM: Propagate requested TSC frequency on vcpu initarch/x86/kvm/svm.c+32 -00 replies
5/6KVM: X86: Delegate tsc-offset calculation to architecture codearch/x86/include/asm/kvm_host.h arch/x86/kvm/svm.c arch/x86/kvm/vmx.c +1 more+22 -62 replies
6/6KVM: X86: Implement userspace interface to set virtual_tsc_khzarch/x86/include/asm/kvm_host.h arch/x86/kvm/svm.c arch/x86/kvm/x86.c +1 more+46 -02 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 0/6] KVM support for TSC scaling

Hi Avi, Marcelo,

here is the patch-set to implement the TSC-scaling feature of upcoming AMD CPUs. When this feature is supported the CPU provides a new MSR which holds a multiplier for the hardware TSC which is applied on the value rdtsc[p] and reads of MSR 0x10. This feature can be used to emulate a given tsc frequency for the guest.
Patch 1 is not directly related to this patch-set because it only fixes a bug which prevented me from testing these patches. In fact it fixes the same bug Andre sent a patch for. But after the discussion about his patch he told me to just post my patch and thus here it is.

Thanks,

Joerg

Diff-stat:

 arch/x86/include/asm/kvm_host.h  |    4 ++
 arch/x86/include/asm/msr-index.h |    1 +
 arch/x86/kvm/svm.c               |   91 +++++++++++++++++++++++++++++++++++++-
 arch/x86/kvm/vmx.c               |   12 +++++
 arch/x86/kvm/x86.c               |   60 ++++++++++++++++++++++---
 include/linux/kvm.h              |    4 ++
 6 files changed, 164 insertions(+), 8 deletions(-)

Shortlog:

Joerg Roedel (6):
KVM: SVM: Advance instruction pointer in dr_intercept
KVM: SVM: Implement infrastructure for TSC_RATE_MSR
KVM: X86: Let kvm-clock report the right tsc frequency
KVM: SVM: Propagate requested TSC frequency on vcpu init
KVM: X86: Delegate tsc-offset calculation to architecture code
KVM: X86: Implement userspace interface to set virtual_tsc_khz