From: Huang Ying Subject: Re: [PATCH] Add function for clearing the requested VCPUs' mce registers. Date: Thu, 25 Nov 2010 13:44:44 +0800 Message-ID: <1290663884.2903.309.camel@yhuang-dev> References: <4CEDB86C.2050402@np.css.fujitsu.com> <1290648466.2903.179.camel@yhuang-dev> <4CEDF45A.1000901@np.css.fujitsu.com> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit Cc: Avi Kivity , Marcelo Tosatti , Andi Kleen , Hidetoshi Seto , KVM list To: Jin Dongming Return-path: Received: from mga14.intel.com ([143.182.124.37]:8070 "EHLO mga14.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750834Ab0KYFos (ORCPT ); Thu, 25 Nov 2010 00:44:48 -0500 In-Reply-To: <4CEDF45A.1000901@np.css.fujitsu.com> Sender: kvm-owner@vger.kernel.org List-ID: On Thu, 2010-11-25 at 13:30 +0800, Jin Dongming wrote: > Hi, Huang-san > > (2010/11/25 10:27), Huang Ying wrote: > > Hi, Dongming, > > > > On Thu, 2010-11-25 at 09:14 +0800, Jin Dongming wrote: > >> In some case of mce test, the injected data can be remained > >> in the registers and ca affect to the result of following test cases. > >> So add codes for clearing mce registers of given VCPU. > >> > >> mce registers of give VCPU could be cleared from kernel by calling > >> the function in this patch. What need to be paid attention is that > >> the status and mcg_status of mce must be set with 0. If not, mce > >> registers will not be cleared. > > > > Why do you need this? To use "mce=3" in guest Linux MCE testing? > When I set fake_panic==1 on Guest OS and tested mce via qemu-monitor, > I got the wrong result sometimes. The reason why I got the wrong result > was that mce registers were not cleared. So I made this patch. This can be done in QEMU via KVM_SET_MSRS too. > > If it is, why not use full reboot? MCE registers are not cleared in real > > machine too. And it is not so pain to reboot the guest. > Though we know that mce registers could be cleared by rebooting the Guest > Machine and the reboot of Guest Machine could save much more time than > the reboot of Host Machine, it is still slower than setting > fake_panic==1 to mce test. Best Regards, Huang Ying