Skip to content
Snippets Groups Projects
Commit 958e5e56 authored by Vitaly Kuznetsov's avatar Vitaly Kuznetsov
Browse files

KVM: x86: SVM: fix tsc scaling when the host doesn't support it

Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=2074832



commit 88099313
Author: Maxim Levitsky <mlevitsk@redhat.com>
Date:   Tue Mar 22 19:24:48 2022 +0200

    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: default avatarPaolo Bonzini <pbonzini@redhat.com>
Signed-off-by: default avatarMaxim Levitsky <mlevitsk@redhat.com>
    Message-Id: <20220322172449.235575-8-mlevitsk@redhat.com>
Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>

Signed-off-by: default avatarVitaly Kuznetsov <vkuznets@redhat.com>
parent d21487cd
No related branches found
No related tags found
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment