aboutsummaryrefslogtreecommitdiff
path: root/target
diff options
context:
space:
mode:
authorMaxim Levitsky <mlevitsk@redhat.com>2022-02-23 13:58:24 +0200
committerPaolo Bonzini <pbonzini@redhat.com>2022-03-15 11:50:50 +0100
commit3e4546d5bd38a1e98d4bd2de48631abf0398a3a2 (patch)
treef9f6a198ba6933946267a3a8f331f6f14267fc28 /target
parent12cab535db6440af41ed8dfefe908a594321b6ce (diff)
downloadqemu-3e4546d5bd38a1e98d4bd2de48631abf0398a3a2.zip
qemu-3e4546d5bd38a1e98d4bd2de48631abf0398a3a2.tar.gz
qemu-3e4546d5bd38a1e98d4bd2de48631abf0398a3a2.tar.bz2
KVM: SVM: always set MSR_AMD64_TSC_RATIO to default value
Even when the feature is not supported in guest CPUID, still set the msr to the default value which will be the only value KVM will accept in this case Signed-off-by: Maxim Levitsky <mlevitsk@redhat.com> Message-Id: <20220223115824.319821-1-mlevitsk@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'target')
-rw-r--r--target/i386/cpu.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/target/i386/cpu.c b/target/i386/cpu.c
index 916d335..a88d655 100644
--- a/target/i386/cpu.c
+++ b/target/i386/cpu.c
@@ -5997,9 +5997,7 @@ static void x86_cpu_reset(DeviceState *dev)
x86_cpu_set_sgxlepubkeyhash(env);
- if (env->features[FEAT_SVM] & CPUID_SVM_TSCSCALE) {
- env->amd_tsc_scale_msr = MSR_AMD64_TSC_RATIO_DEFAULT;
- }
+ env->amd_tsc_scale_msr = MSR_AMD64_TSC_RATIO_DEFAULT;
#endif
}