提交 af364b41 编写于 作者: H Huang Ying 提交者: Anthony Liguori

MCE: Fix bug of IA32_MCG_STATUS after system reset

Now, if we inject a fatal MCE into guest OS, for example Linux, Linux
will go panic and then reboot. But if we inject another MCE now,
system will reset directly instead of go panic firstly, because
MCG_STATUS.MCIP is set to 1 and not cleared after reboot. This is does
not follow the behavior in real hardware.

This patch fixes this via set env->mcg_status to 0 during system reset.
Signed-off-by: NHuang Ying <ying.huang@intel.com>
Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
上级 0b987f19
......@@ -617,6 +617,8 @@ void cpu_reset(CPUX86State *env)
env->dr[7] = DR7_FIXED_1;
cpu_breakpoint_remove_all(env, BP_CPU);
cpu_watchpoint_remove_all(env, BP_CPU);
env->mcg_status = 0;
}
void cpu_x86_close(CPUX86State *env)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册