diff options
author | Paolo Bonzini <pbonzini@redhat.com> | 2018-04-13 11:38:35 +0200 |
---|---|---|
committer | Paolo Bonzini <pbonzini@redhat.com> | 2018-04-16 17:50:22 +0200 |
commit | dd259935e4eec844dc3e5b8a7cd951cd658b4fb6 (patch) | |
tree | 38f6a692fde1aec7d45e6ac01809aa2dfd243050 /arch/x86/kvm/svm.c | |
parent | X86/KVM: Properly update 'tsc_offset' to represent the running guest (diff) | |
download | linux-dd259935e4eec844dc3e5b8a7cd951cd658b4fb6.tar.xz linux-dd259935e4eec844dc3e5b8a7cd951cd658b4fb6.zip |
kvm: x86: move MSR_IA32_TSC handling to x86.c
This is not specific to Intel/AMD anymore. The TSC offset is available
in vcpu->arch.tsc_offset.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'arch/x86/kvm/svm.c')
-rw-r--r-- | arch/x86/kvm/svm.c | 9 |
1 files changed, 0 insertions, 9 deletions
diff --git a/arch/x86/kvm/svm.c b/arch/x86/kvm/svm.c index e77a536d0b7c..80ea26274a54 100644 --- a/arch/x86/kvm/svm.c +++ b/arch/x86/kvm/svm.c @@ -4050,12 +4050,6 @@ static int svm_get_msr(struct kvm_vcpu *vcpu, struct msr_data *msr_info) struct vcpu_svm *svm = to_svm(vcpu); switch (msr_info->index) { - case MSR_IA32_TSC: { - msr_info->data = svm->vmcb->control.tsc_offset + - kvm_scale_tsc(vcpu, rdtsc()); - - break; - } case MSR_STAR: msr_info->data = svm->vmcb->save.star; break; @@ -4208,9 +4202,6 @@ static int svm_set_msr(struct kvm_vcpu *vcpu, struct msr_data *msr) svm->vmcb->save.g_pat = data; mark_dirty(svm->vmcb, VMCB_NPT); break; - case MSR_IA32_TSC: - kvm_write_tsc(vcpu, msr); - break; case MSR_IA32_SPEC_CTRL: if (!msr->host_initiated && !guest_cpuid_has(vcpu, X86_FEATURE_IBRS)) |