From: "Jan Beulich" Subject: Re: [PATCH for 4.5] x86/viridian: Freeze time reference counter when domain is paused Date: Fri, 10 Oct 2014 14:01:41 +0100 Message-ID: <5437F4D5020000780003DBA3@mail.emea.novell.com> References: <1412932053-34219-1-git-send-email-paul.durrant@citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail6.bemta3.messagelabs.com ([195.245.230.39]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1XcZpE-0007QF-UW for xen-devel@lists.xenproject.org; Fri, 10 Oct 2014 13:01:41 +0000 In-Reply-To: <1412932053-34219-1-git-send-email-paul.durrant@citrix.com> Content-Disposition: inline List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Paul Durrant Cc: Andrew Cooper , Keir Fraser , xen-devel@lists.xenproject.org List-Id: xen-devel@lists.xenproject.org >>> On 10.10.14 at 11:07, wrote: > @@ -460,11 +495,12 @@ static int viridian_load_domain_ctxt(struct domain *d, hvm_domain_context_t *h) > { > struct hvm_viridian_domain_context ctxt; > > - if ( hvm_load_entry(VIRIDIAN_DOMAIN, h, &ctxt) != 0 ) > + if ( hvm_load_entry_zeroextend(VIRIDIAN_DOMAIN, h, &ctxt) != 0 ) > return -EINVAL; > > - d->arch.hvm_domain.viridian.hypercall_gpa.raw = ctxt.hypercall_gpa; > - d->arch.hvm_domain.viridian.guest_os_id.raw = ctxt.guest_os_id; > + d->arch.hvm_domain.viridian.time_ref_count.val = ctxt.time_ref_count; > + d->arch.hvm_domain.viridian.hypercall_gpa.raw = ctxt.hypercall_gpa; > + d->arch.hvm_domain.viridian.guest_os_id.raw = ctxt.guest_os_id; Is loading zero here correct when migration comes from an older hypervisor? > @@ -706,6 +710,11 @@ void domain_shutdown(struct domain *d, u8 reason) > v->paused_for_shutdown = 1; > } > > +#ifdef CONFIG_X86 > + if ( has_viridian_time_ref_count(d) ) > + viridian_time_ref_count_freeze(d); > +#endif > + So in the description you say "but only if the domain is not shutting down" - how does the above change fit that? Or is that comment ambiguous whether it refers to both the freezing and thawing or only the thawing? Jan