Commit 8809931
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>1 parent f37b735 commit 8809931
3 files changed
Lines changed: 6 additions & 9 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4752 | 4752 | | |
4753 | 4753 | | |
4754 | 4754 | | |
4755 | | - | |
4756 | | - | |
4757 | 4755 | | |
4758 | 4756 | | |
| 4757 | + | |
| 4758 | + | |
4759 | 4759 | | |
4760 | 4760 | | |
4761 | 4761 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7980 | 7980 | | |
7981 | 7981 | | |
7982 | 7982 | | |
7983 | | - | |
| 7983 | + | |
7984 | 7984 | | |
7985 | | - | |
7986 | | - | |
7987 | | - | |
7988 | 7985 | | |
| 7986 | + | |
| 7987 | + | |
7989 | 7988 | | |
7990 | 7989 | | |
7991 | 7990 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
11602 | 11602 | | |
11603 | 11603 | | |
11604 | 11604 | | |
11605 | | - | |
11606 | | - | |
11607 | 11605 | | |
11608 | | - | |
| 11606 | + | |
11609 | 11607 | | |
11610 | 11608 | | |
11611 | 11609 | | |
| |||
0 commit comments