[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 21/22] KVM: SVM: always set MSR_AMD64_TSC_RATIO to default value
From: |
Paolo Bonzini |
Subject: |
[PULL 21/22] KVM: SVM: always set MSR_AMD64_TSC_RATIO to default value |
Date: |
Tue, 8 Mar 2022 12:34:44 +0100 |
From: Maxim Levitsky <mlevitsk@redhat.com>
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>
---
target/i386/cpu.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/target/i386/cpu.c b/target/i386/cpu.c
index 916d3354fe..a88d6554c8 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
}
--
2.35.1
- [PULL 08/22] kvm-irqchip: introduce new API to support route change, (continued)
- [PULL 08/22] kvm-irqchip: introduce new API to support route change, Paolo Bonzini, 2022/03/08
- [PULL 10/22] target/i386: only include bits in pg_mode if they are not ignored, Paolo Bonzini, 2022/03/08
- [PULL 09/22] kvm/msi: do explicit commit when adding msi routes, Paolo Bonzini, 2022/03/08
- [PULL 13/22] x86: Fix the 64-byte boundary enumeration for extended state, Paolo Bonzini, 2022/03/08
- [PULL 16/22] x86: Add XFD faulting bit for state components, Paolo Bonzini, 2022/03/08
- [PULL 18/22] x86: add support for KVM_CAP_XSAVE2 and AMX state migration, Paolo Bonzini, 2022/03/08
- [PULL 20/22] i386: Add Icelake-Server-v6 CPU model with 5-level EPT support, Paolo Bonzini, 2022/03/08
- [PULL 15/22] x86: Grant AMX permission for guest, Paolo Bonzini, 2022/03/08
- [PULL 11/22] target/i386: Throw a #SS when loading a non-canonical IST, Paolo Bonzini, 2022/03/08
- [PULL 22/22] gitlab-ci: do not run tests with address sanitizer, Paolo Bonzini, 2022/03/08
- [PULL 21/22] KVM: SVM: always set MSR_AMD64_TSC_RATIO to default value,
Paolo Bonzini <=
- [PULL 19/22] x86: Support XFD and AMX xsave data migration, Paolo Bonzini, 2022/03/08
- Re: [PULL v2 00/22] QEMU changes for 7.0 soft freeze, Peter Maydell, 2022/03/10