From: Marcelo Tosatti <mtosatti@redhat.com>
To: Huang Ying <ying.huang@intel.com>
Cc: Avi Kivity <avi@redhat.com>,
Anthony Liguori <anthony@codemonkey.ws>,
Andi Kleen <andi@firstfloor.org>,
"kvm@vger.kernel.org" <kvm@vger.kernel.org>
Subject: Re: [BUGFIX] MCE: Fix bug of IA32_MCG_STATUS after system reset
Date: Wed, 6 Jan 2010 06:38:58 -0200 [thread overview]
Message-ID: <20100106083858.GA3886@amt.cnet> (raw)
In-Reply-To: <1262765862.17852.16.camel@yhuang-dev.sh.intel.com>
On Wed, Jan 06, 2010 at 04:17:42PM +0800, Huang Ying wrote:
> On Wed, 2010-01-06 at 16:03 +0800, Avi Kivity wrote:
> > On 01/06/2010 09:05 AM, Huang Ying wrote:
> > > @@ -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?
> > >>
> > > I found kvm_arch_load_regs() is called by kvm_arch_cpu_reset(), which is
> > > called by qemu_kvm_system_reset(). It is not in cpu reset path?
> > >
> >
> > It is, but it is also called from many other places, which could cause
> > this msr to be zeroed.
> >
> > A better solution is to allocate it a field in CPUState, load and save
> > it in kvm_arch_*_regs, and zero it during reset.
>
> Yes. You are right. I will fix this.
BTW, the MCE MSRs are not being migrated. Perhaps you'd like to fix that
while at it.
prev parent reply other threads:[~2010-01-06 8:40 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
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 [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=20100106083858.GA3886@amt.cnet \
--to=mtosatti@redhat.com \
--cc=andi@firstfloor.org \
--cc=anthony@codemonkey.ws \
--cc=avi@redhat.com \
--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 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.