qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [BUGFIX] MCE: Fix bug of IA32_MCG_STATUS after system r


From: Anthony Liguori
Subject: Re: [Qemu-devel] [BUGFIX] MCE: Fix bug of IA32_MCG_STATUS after system reset
Date: Mon, 11 Jan 2010 10:00:55 -0600
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.5) Gecko/20091209 Fedora/3.0-4.fc12 Lightning/1.0pre Thunderbird/3.0

On 01/05/2010 02:32 AM, Huang Ying wrote:
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<address@hidden>

Applied.  Thanks.

Regards,

Anthony Liguori
---
  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)










reply via email to

[Prev in Thread] Current Thread [Next in Thread]