From: "Jan Beulich" Subject: Re: vMCE vs migration Date: Mon, 13 Feb 2012 09:30:53 +0000 Message-ID: <4F38E65D0200007800072771@nat28.tlf.novell.com> References: <4F1D4DCD020000780006E593@nat28.tlf.novell.com> <4F1E9F45020000780006EA5E@nat28.tlf.novell.com> <1327596896.24345.66.camel@elijah> <4F26AD7C020000780006FDC1@nat28.tlf.novell.com> <20120209180257.GA13025@aepfle.de> <4F34F96602000078000722DA@nat28.tlf.novell.com> <20120210212846.GA31185@aepfle.de> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <20120210212846.GA31185@aepfle.de> Content-Disposition: inline List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Olaf Hering Cc: George.Dunlap@eu.citrix.com, "xen-devel@lists.xensource.com" , George Dunlap , Ian Campbell List-Id: xen-devel@lists.xenproject.org >>> On 10.02.12 at 22:28, Olaf Hering wrote: > On Fri, Feb 10, Jan Beulich wrote: > >> >>> On 09.02.12 at 19:02, Olaf Hering wrote: >> > On Mon, Jan 30, Jan Beulich wrote: >> > >> >> Below/attached a draft patch (compile tested only), handling save/ >> >> restore of the bank count, but not allowing for a config setting to >> >> specify its initial value (yet). >> > >> > Does it take more than just applying this patch for src+dst host and >> > migrate a hvm guest? I see no difference, the mce warning is still >> > there. >> >> No, it shouldn't require anything else. Could you add a printk() each >> to vmce_{save,load}_vcpu_ctxt() printing what gets saved/restored >> (and at once checking that they actually get executed? I was under >> the impression that adding save records for HVM is a simple drop-in >> exercise these days... > > These functions are called for dom0, but not for domU. And as a result > arch.nr_vmce_banks remains zero. I assume the guest needs to be > initialized in some way as well, and that does not happen? These functions should be called with Dom0 being current domain, but the struct domain * argument should certainly be that of the DomU being saved/restored. Guest initialization happens in vmce_init_vcpu(), called from vcpu_initialise() (irrespective of the kind of domain, i.e. equally for PV and HVM). I spotted another problem with the patch though - MCG_CAP reads aren't reflecting the possibly non-host bank count. I'm in the process of addressing this, but the whole MCG_* handling is bogus as being per-domain instead of per-vCPU (and at least MCG_CAP lacking save/restore too). Jan