From: Jin Dongming <jin.dongming@np.css.fujitsu.com>
To: Huang Ying <ying.huang@intel.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 17:46:09 +0900 [thread overview]
Message-ID: <4CEE2251.2040400@np.css.fujitsu.com> (raw)
In-Reply-To: <1290664558.2903.317.camel@yhuang-dev>
Hi, Huang-san
(2010/11/25 14:55), Huang Ying wrote:
> 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.
MC registers could be cleared in Guest OS with APL. So I will cancel this patch.
I will resend the patch for broadcast option.
Best Regards,
Jin Dongming
>
> Best Regards,
> Huang Ying
>
>
> --
> To unsubscribe from this list: send the line "unsubscribe kvm" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
>
>
prev parent reply other threads:[~2010-11-25 8:44 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
2010-11-25 8:46 ` Jin Dongming [this message]
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=4CEE2251.2040400@np.css.fujitsu.com \
--to=jin.dongming@np.css.fujitsu.com \
--cc=andi@firstfloor.org \
--cc=avi@redhat.com \
--cc=dnelson@redhat.com \
--cc=kvm@vger.kernel.org \
--cc=mtosatti@redhat.com \
--cc=seto.hidetoshi@jp.fujitsu.com \
--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 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.