MCE: Fix bug of IA32_MCG_STATUS after system reset
commit8033c42abdfa7b583b3a42c8877f35164e5f776b
authorHuang Ying <ying.huang@intel.com>
Tue, 5 Jan 2010 08:32:24 +0000 (5 16:32 +0800)
committerAnthony Liguori <aliguori@us.ibm.com>
Mon, 11 Jan 2010 16:02:55 +0000 (11 10:02 -0600)
tree193ff6f407c6c75fb8e7be1f089e1f29ae5b69d8
parent4713c69fa2319fceb5dd939d72a35e8b97c26878
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: Huang Ying <ying.huang@intel.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
(cherry picked from commit af364b418cc57c53275c76ee5e0e0645908605b9)
target-i386/helper.c