All of lore.kernel.org
 help / color / mirror / Atom feed
* [Qemu-devel] [BUGFIX] MCE: Fix bug of IA32_MCG_STATUS after system reset
@ 2010-01-05  8:32 Huang Ying
  2010-01-11 16:00 ` Anthony Liguori
  0 siblings, 1 reply; 2+ messages in thread
From: Huang Ying @ 2010-01-05  8:32 UTC (permalink / raw)
  To: Anthony Liguori; +Cc: qemu-devel

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>

---
 target-i386/helper.c |    2 ++
 1 file changed, 2 insertions(+)

--- a/target-i386/helper.c
+++ b/target-i386/helper.c
@@ -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)

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2010-01-11 16:01 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-01-05  8:32 [Qemu-devel] [BUGFIX] MCE: Fix bug of IA32_MCG_STATUS after system reset Huang Ying
2010-01-11 16:00 ` Anthony Liguori

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.