From mboxrd@z Thu Jan 1 00:00:00 1970 From: Huang Ying Subject: Re: [PATCH 1/2] KVM: Expose MCE control MSRs to userspace Date: Mon, 12 Jul 2010 08:10:58 +0800 Message-ID: <1278893458.2783.126.camel@yhuang-dev.sh.intel.com> References: <1278500979-12725-1-git-send-email-avi@redhat.com> <1278500979-12725-2-git-send-email-avi@redhat.com> <1278554832.2783.2.camel@yhuang-dev.sh.intel.com> <4C3581AB.8030404@redhat.com> <1278576228.2783.114.camel@yhuang-dev.sh.intel.com> <4C358968.6060807@redhat.com> <1278578850.2783.123.camel@yhuang-dev.sh.intel.com> <4C359687.40806@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit Cc: kvm@vger.kernel.org, Marcelo Tosatti , Andi Kleen To: Avi Kivity Return-path: Received: from mga01.intel.com ([192.55.52.88]:62679 "EHLO mga01.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755157Ab0GLALA (ORCPT ); Sun, 11 Jul 2010 20:11:00 -0400 In-Reply-To: <4C359687.40806@redhat.com> Sender: kvm-owner@vger.kernel.org List-ID: Sorry for late. On Thu, 2010-07-08 at 17:12 +0800, Avi Kivity wrote: [..snip..] > >>> And if we clear MSR_IA32_MCG_CTL, the machine check reporting is > >>> disabled according to SDM Vol 3A, section 15.3.1.3 > >>> > >>> > >> Won't the kernel reenable MCE? In my testing, the sequence > >> MCE-reset-MCE worked after the patch (whereas it would fail without it). > >> > > Yes. Because kernel will reenable it. But if we only clear > > MSR_IA32_MCG_STATUS only, MCE-reset-MCE should work too. > > > > What happens if we reboot into a kernel that doesn't enable MCE? > > I guess it doesn't matter: the new kernel will keep cr4.mce cleared and > thus MCE will be blocked. > > I'd like to keep the patch as is, so live migration works for MCE (we'll > need to add bank support). I think there's no problem clearing _CTL on > reset. If there is, we can patch qemu not to clear the MSR. Is that > acceptable? Yes. At least for Linux that is OK. Don't know whether Windows will set _CTL during boot. Best Regards, Huang Ying