linux-stable/arch/x86/kvm/svm
Maxim Levitsky 8809931383 KVM: x86: SVM: fix tsc scaling when the host doesn't support it
It was decided that when TSC scaling is not supported,
the virtual MSR_AMD64_TSC_RATIO should still have the default '1.0'
value.

However in this case kvm_max_tsc_scaling_ratio is not set,
which breaks various assumptions.

Fix this by always calculating kvm_max_tsc_scaling_ratio regardless of
host support.  For consistency, do the same for VMX.

Suggested-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Maxim Levitsky <mlevitsk@redhat.com>
Message-Id: <20220322172449.235575-8-mlevitsk@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2022-04-02 05:37:26 -04:00
..
avic.c KVM: x86: Make APICv inhibit reasons an enum and cleanup naming 2022-04-02 05:34:44 -04:00
hyperv.h KVM: nSVM: Split off common definitions for Hyper-V on KVM and KVM on Hyper-V 2022-02-10 13:50:45 -05:00
nested.c KVM: x86/mmu: load new PGD after the shadow MMU is initialized 2022-02-25 08:20:18 -05:00
pmu.c KVM: x86/svm: Clear reserved bits written to PerfEvtSeln MSRs 2022-04-02 05:34:45 -04:00
sev.c KVM: SVM: Exit to userspace on ENOMEM/EFAULT GHCB errors 2022-03-01 10:04:03 -05:00
svm.c KVM: x86: SVM: fix tsc scaling when the host doesn't support it 2022-04-02 05:37:26 -04:00
svm.h KVM: x86: SVM: fix avic spec based definitions again 2022-04-02 05:37:24 -04:00
svm_onhyperv.c KVM: SVM: Fix kvm_cache_regs.h inclusions for is_guest_mode() 2022-04-02 05:34:40 -04:00
svm_onhyperv.h KVM: nSVM: Split off common definitions for Hyper-V on KVM and KVM on Hyper-V 2022-02-10 13:50:45 -05:00
svm_ops.h x86/kvm: Always inline vmload() / vmsave() 2021-09-15 15:51:45 +02:00
vmenter.S x86: Prepare asm files for straight-line-speculation 2021-12-08 12:25:37 +01:00