mirror of
https://github.com/qemu/qemu.git
synced 2025-08-15 05:06:56 +00:00
kvm: Simplify invtsc check
Instead of searching the table we have just built, we can check the env->features field directly. Reviewed-by: Marcelo Tosatti <mtosatti@redhat.com> Signed-off-by: Eduardo Habkost <ehabkost@redhat.com> Message-Id: <20170108173234.25721-2-ehabkost@redhat.com> Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
This commit is contained in:
parent
3964ec6c0b
commit
d74460ec1b
@ -963,8 +963,8 @@ int kvm_arch_init_vcpu(CPUState *cs)
|
|||||||
has_msr_mcg_ext_ctl = has_msr_feature_control = true;
|
has_msr_mcg_ext_ctl = has_msr_feature_control = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
c = cpuid_find_entry(&cpuid_data.cpuid, 0x80000007, 0);
|
if ((env->features[FEAT_8000_0007_EDX] & CPUID_APM_INVTSC) &&
|
||||||
if (c && (c->edx & 1<<8) && invtsc_mig_blocker == NULL) {
|
invtsc_mig_blocker == NULL) {
|
||||||
/* for migration */
|
/* for migration */
|
||||||
error_setg(&invtsc_mig_blocker,
|
error_setg(&invtsc_mig_blocker,
|
||||||
"State blocked by non-migratable CPU device"
|
"State blocked by non-migratable CPU device"
|
||||||
|
Loading…
Reference in New Issue
Block a user