From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from [140.186.70.92] (port=36123 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PaOpI-0001Rp-Sb for qemu-devel@nongnu.org; Wed, 05 Jan 2011 03:34:37 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PaOpI-0002Vh-Ni for qemu-devel@nongnu.org; Wed, 05 Jan 2011 03:34:37 -0500 Received: from mga11.intel.com ([192.55.52.93]:38087) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PaOpI-0002VS-I0 for qemu-devel@nongnu.org; Wed, 05 Jan 2011 03:34:36 -0500 From: Huang Ying In-Reply-To: <4D2426C8.6080402@web.de> References: <2c5efab40d7088353c5147c41fb13b44a944679c.1294129949.git.jan.kiszka@web.de> <1294209751.22308.337.camel@yhuang-dev> <4D2426C8.6080402@web.de> Content-Type: text/plain; charset="UTF-8" Date: Wed, 05 Jan 2011 16:33:51 +0800 Message-ID: <1294216431.22308.372.camel@yhuang-dev> Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: [Qemu-devel] Re: [PATCH v3 12/21] kvm: x86: Drop MCE MSRs write back restrictions List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Jan Kiszka Cc: Marcelo Tosatti , Avi Kivity , "kvm@vger.kernel.org" , "qemu-devel@nongnu.org" On Wed, 2011-01-05 at 16:07 +0800, Jan Kiszka wrote: > Am 05.01.2011 07:42, Huang Ying wrote: > > On Tue, 2011-01-04 at 16:32 +0800, Jan Kiszka wrote: > >> From: Jan Kiszka > >> > >> There is no need to restrict writing back MCE MSRs to reset or full > >> state updates as setting their values has no side effects. > > > > Sorry for late. > > Don't worry. > > > > > The MCE MSRs contents is sticky for warm reset except MCG_STATUS, so > > their content should be kept. And the following sequence may set > > uncorrected value in MCE registers. > > > > savevm -> loadvm -> (OS clear MCE registers) -> reset -> (MCE registers > > has new (uncorrected) value) > > Sorry, I can't follow. Unless I miss some subtle detail, the question is > not when we transfer the mcg_* CPUState fields to the kernel, but when > and how we manipulate them in user space, e.g. on reset. Where are those > fields touched incorrectly between get and put msrs so that we cannot > write them back? If my understanding is correct, MSRs are not saved to user space (env->mce_banks) during reset in current code. So if all MCE MSRs are restored to kernel, their user space contents from previous loadvm may be put into kernel after reset. Best Regards, Huang Ying