kvm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Avi Kivity <avi@redhat.com>
To: Huang Ying <ying.huang@intel.com>
Cc: Anthony Liguori <anthony@codemonkey.ws>,
	Andi Kleen <andi@firstfloor.org>,
	kvm@vger.kernel.org
Subject: Re: [BUGFIX] MCE: Fix bug of IA32_MCG_STATUS after system reset
Date: Tue, 05 Jan 2010 12:50:16 +0200	[thread overview]
Message-ID: <4B431968.9030304@redhat.com> (raw)
In-Reply-To: <1262680448.31401.228.camel@yhuang-dev.sh.intel.com>

On 01/05/2010 10:34 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 IA32_MCG_STATUS to 0 during system reset.
>
> Signed-off-by: Huang Ying<ying.huang@intel.com>
> ---
>   qemu-kvm-x86.c |    1 +
>   1 file changed, 1 insertion(+)
>
> --- a/qemu-kvm-x86.c
> +++ b/qemu-kvm-x86.c
> @@ -1015,6 +1015,7 @@ void kvm_arch_load_regs(CPUState *env)
>   #endif
>       set_msr_entry(&msrs[n++], MSR_KVM_SYSTEM_TIME,  env->system_time_msr);
>       set_msr_entry(&msrs[n++], MSR_KVM_WALL_CLOCK,  env->wall_clock_msr);
> +    set_msr_entry(&msrs[n++], MSR_MCG_STATUS, 0);
>
>    

Not sure why you reset this in kvm_arch_load_regs().  Shouldn't this be 
in the cpu reset code?

-- 
error compiling committee.c: too many arguments to function


  parent reply	other threads:[~2010-01-05 10:50 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-01-05  8:34 [BUGFIX] MCE: Fix bug of IA32_MCG_STATUS after system reset Huang Ying
2010-01-05 10:44 ` Andi Kleen
2010-01-06  8:22   ` Huang Ying
2010-01-05 10:50 ` Avi Kivity [this message]
2010-01-06  7:05   ` Huang Ying
2010-01-06  8:03     ` Avi Kivity
2010-01-06  8:17       ` Huang Ying
2010-01-06  8:38         ` Marcelo Tosatti

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4B431968.9030304@redhat.com \
    --to=avi@redhat.com \
    --cc=andi@firstfloor.org \
    --cc=anthony@codemonkey.ws \
    --cc=kvm@vger.kernel.org \
    --cc=ying.huang@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).