MSR_SMI_COUNT started being migrated in QEMU 2.12. Do not migrate it
on older machine types, or the subsection causes a load failure for
guests that use SMM.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
#define PC_COMPAT_2_11 \
HW_COMPAT_2_11 \
{\
+ .driver = TYPE_X86_CPU,\
+ .property = "x-migrate-smi-count",\
+ .value = "off",\
+ },{\
.driver = "Skylake-Server" "-" TYPE_X86_CPU,\
.property = "clflushopt",\
.value = "off",\
false),
DEFINE_PROP_BOOL("vmware-cpuid-freq", X86CPU, vmware_cpuid_freq, true),
DEFINE_PROP_BOOL("tcg-cpuid", X86CPU, expose_tcg, true),
+ DEFINE_PROP_BOOL("x-migrate-smi-count", X86CPU, migrate_smi_count,
+ true),
/*
* lecacy_cache defaults to true unless the CPU model provides its
* own cache information (see x86_cpu_load_def()).
bool expose_kvm;
bool expose_tcg;
bool migratable;
+ bool migrate_smi_count;
bool max_features; /* Enable all supported features automatically */
uint32_t apic_id;
X86CPU *cpu = opaque;
CPUX86State *env = &cpu->env;
- return env->msr_smi_count != 0;
+ return cpu->migrate_smi_count && env->msr_smi_count != 0;
}
static const VMStateDescription vmstate_msr_smi_count = {