]> git.proxmox.com Git - qemu.git/commitdiff
MCE: Fix bug of IA32_MCG_STATUS after system reset
authorHuang Ying <ying.huang@intel.com>
Tue, 5 Jan 2010 08:32:24 +0000 (16:32 +0800)
committerAnthony Liguori <aliguori@us.ibm.com>
Mon, 11 Jan 2010 15:56:30 +0000 (09:56 -0600)
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: Huang Ying <ying.huang@intel.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
target-i386/helper.c

index c39a993902256fde2f3ba35f8d46f8b41be1219f..049fccfc721fa0b99e6794e3b1e2dd904476106a 100644 (file)
@@ -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)