CPUState synchronization should be done after MSR_EFER is updated.
Change-Id: I904564896d64ec9c31137cd5f2c47738ef2b79fd
Signed-off-by: SeokYeon Hwang <syeon.hwang@samsung.com>
&((CPUX86State *)current_cpu->env_ptr)->cr[0],
sizeof(ps->cr));
ps->hflags = env->hflags;
- ps->efer = env->efer;
}
#endif
#if defined (CONFIG_KVM) || defined (CONFIG_HAX)
target_ulong cr[5];
uint32_t hflags;
- uint64_t efer;
#endif
};
&ps->cr[0],
sizeof(ps->cr));
env->hflags = ps->hflags;
-
- // FIXME: Somtimes "hflags" is not synced propery on HAX.
- // It can be bug on synchronizing CPU state
- env->efer = ps->efer;
- if (env->efer & MSR_EFER_LMA) {
- env->hflags |= HF_LMA_MASK;
- }
}
}
#else
if (ret < 0)
return -1;
}
+
+ // it should be done after get_msrs, since it needs
+ // EFER synchonization
+#if 0
if (!set)
hax_setup_qemu_emulator(env);
+#endif
+
return 0;
}
if (ret < 0)
return ret;
+ hax_setup_qemu_emulator(env);
+
return 0;
}