mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-03 07:43:54 -06:00
i386: wire up MSR_IA32_MISC_ENABLE
It's needed for its default value - bit 0 specifies that "rep movs" is good enough for memcpy, and Linux may use a slower memcpu if it is not set, depending on cpu family/model. Signed-off-by: Avi Kivity <avi@redhat.com> Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
This commit is contained in:
parent
aa82ba549a
commit
21e87c4625
5 changed files with 48 additions and 0 deletions
|
@ -328,6 +328,24 @@ static const VMStateDescription vmstate_msr_tscdeadline = {
|
|||
}
|
||||
};
|
||||
|
||||
static bool misc_enable_needed(void *opaque)
|
||||
{
|
||||
CPUState *env = opaque;
|
||||
|
||||
return env->msr_ia32_misc_enable != MSR_IA32_MISC_ENABLE_DEFAULT;
|
||||
}
|
||||
|
||||
static const VMStateDescription vmstate_msr_ia32_misc_enable = {
|
||||
.name = "cpu/msr_ia32_misc_enable",
|
||||
.version_id = 1,
|
||||
.minimum_version_id = 1,
|
||||
.minimum_version_id_old = 1,
|
||||
.fields = (VMStateField []) {
|
||||
VMSTATE_UINT64(msr_ia32_misc_enable, CPUState),
|
||||
VMSTATE_END_OF_LIST()
|
||||
}
|
||||
};
|
||||
|
||||
static const VMStateDescription vmstate_cpu = {
|
||||
.name = "cpu",
|
||||
.version_id = CPU_SAVE_VERSION,
|
||||
|
@ -441,6 +459,9 @@ static const VMStateDescription vmstate_cpu = {
|
|||
}, {
|
||||
.vmsd = &vmstate_msr_tscdeadline,
|
||||
.needed = tscdeadline_needed,
|
||||
}, {
|
||||
.vmsd = &vmstate_msr_ia32_misc_enable,
|
||||
.needed = misc_enable_needed,
|
||||
} , {
|
||||
/* empty */
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue