From: Ian Campbell Subject: Re: domain restore operation ordering Date: Wed, 26 Mar 2014 10:19:58 +0000 Message-ID: <1395829198.22808.34.camel@kazak.uk.xensource.com> References: <5332B33C0200007800002373@nat28.tlf.novell.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail6.bemta5.messagelabs.com ([195.245.231.135]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1WSkwF-0005WK-AE for xen-devel@lists.xenproject.org; Wed, 26 Mar 2014 10:20:03 +0000 In-Reply-To: <5332B33C0200007800002373@nat28.tlf.novell.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Jan Beulich Cc: xen-devel , Ian Jackson List-Id: xen-devel@lists.xenproject.org On Wed, 2014-03-26 at 10:00 +0000, Jan Beulich wrote: > Hi, > > looking at some restore log with HVM debug options enabled in the > hypervisor I notice > > (XEN) HVM2 restore: MTRR 0 > (XEN) [HVM:0.0] invalid msr content:fff8000800 > (XEN) > (XEN) [HVM:0.0] invalid msr content:fffc000800 > > and looking into the reasons for that I think both xend and xl apply > the CPUID policy and overrides only _after_ having processed the > restore image. Yet mtrr_var_range_msr_set() uses domain_cpuid() > to determine the number of physical address bits in order to validate > the register contents. > > Is there any reason why the ordering needs to be the way it > currently is? I don't know, my guess is it just ended up that way for no particular reason. I'd be inclined to just try moving the libxl_cpuid_apply_policy call from libxl__build_post to libxl__build_pre and see what breaks. (it seems to me that libxl__arch_domain_create would be the correct build_pre location, removing the need for libxl_nocpuid.c I suspect) > If so, we may need to tweak mtrr_var_range_msr_set() > to special case restoring (albeit I can't think of a way to tell this, > perhaps apart from d != current->domain, which wouldn't really be > a restore specific check). > > Thanks, Jan >