public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
From: Huang Ying <ying.huang@intel.com>
To: Jin Dongming <jin.dongming@np.css.fujitsu.com>
Cc: Avi Kivity <avi@redhat.com>,
	Marcelo Tosatti <mtosatti@redhat.com>,
	Andi Kleen <andi@firstfloor.org>,
	Dean Nelson <dnelson@redhat.com>,
	Hidetoshi Seto <seto.hidetoshi@jp.fujitsu.com>,
	KVM list <kvm@vger.kernel.org>
Subject: Re: [PATCH 2/2] reset mce registers of the given VCPU or all VCPUs with mce command.
Date: Thu, 25 Nov 2010 13:55:58 +0800	[thread overview]
Message-ID: <1290664558.2903.317.camel@yhuang-dev> (raw)
In-Reply-To: <4CEDB9FA.5000400@np.css.fujitsu.com>

On Thu, 2010-11-25 at 09:20 +0800, Jin Dongming wrote:
> --- a/monitor.c
> +++ b/monitor.c
> @@ -60,6 +60,7 @@
>  #include "trace.h"
>  #endif
>  #include "qemu-kvm.h"
> +#include "kvm_x86.h"
>  
>  //#define DEBUG
>  //#define DEBUG_COMPLETION
> @@ -2277,7 +2278,19 @@ static void do_inject_mce(Monitor *mon, const QDict *qdict)
>  #endif
>  
>      for (cenv = first_cpu; cenv != NULL; cenv = cenv->next_cpu) {
> -        if (cenv->cpu_index == cpu_index && cenv->mcg_cap) {
> +        if (!cenv->mcg_cap)
> +            continue;
> +
> +#if defined(KVM_CAP_MCE)
> +        if (!status && !mcg_status) {
> +            if (cenv->cpu_index == cpu_index || broadcast)
> +                kvm_inject_x86_mce(cenv, 0, 0, 0, 0, 0, 0);
> +
> +            continue;
> +        }
> +#endif
> +
> +        if (cenv->cpu_index == cpu_index) {
>              cpu_inject_x86_mce(cenv, bank, status, mcg_status, addr, misc);
>  #if defined(KVM_CAP_MCE)
>              if (broadcast)

Are you sure there is no test cases that require the Machine Check
registers not cleared? I have had a test case before that injects
another MCE when MCIP in MCGSTATUS is set to check whether system will
go reset.

It may be better to clear MC registers in an explicit mode.

Best Regards,
Huang Ying



  reply	other threads:[~2010-11-25  5:56 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-11-25  1:20 [PATCH 2/2] reset mce registers of the given VCPU or all VCPUs with mce command Jin Dongming
2010-11-25  5:55 ` Huang Ying [this message]
2010-11-25  8:46   ` Jin Dongming

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=1290664558.2903.317.camel@yhuang-dev \
    --to=ying.huang@intel.com \
    --cc=andi@firstfloor.org \
    --cc=avi@redhat.com \
    --cc=dnelson@redhat.com \
    --cc=jin.dongming@np.css.fujitsu.com \
    --cc=kvm@vger.kernel.org \
    --cc=mtosatti@redhat.com \
    --cc=seto.hidetoshi@jp.fujitsu.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