From: "Jan Beulich" Subject: Re: [PATCH v9 18/20] x86/VPMU: Save VPMU state for PV guests during context switch Date: Tue, 12 Aug 2014 15:15:18 +0100 Message-ID: <53EA3D96020000780002BAEC@mail.emea.novell.com> References: <1407516946-17833-1-git-send-email-boris.ostrovsky@oracle.com> <1407516946-17833-19-git-send-email-boris.ostrovsky@oracle.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1407516946-17833-19-git-send-email-boris.ostrovsky@oracle.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: Boris Ostrovsky Cc: kevin.tian@intel.com, keir@xen.org, suravee.suthikulpanit@amd.com, andrew.cooper3@citrix.com, tim@xen.org, xen-devel@lists.xen.org, jun.nakajima@intel.com List-Id: xen-devel@lists.xenproject.org >>> On 08.08.14 at 18:55, wrote: > @@ -1526,12 +1524,12 @@ void context_switch(struct vcpu *prev, struct vcpu *next) > !is_hardware_domain(next->domain)); > } > > - if ( is_hvm_vcpu(next) && (prev != next) && (vpmu_mode & XENPMU_MODE_SELF) ) > + context_saved(prev); > + > + if ( (prev != next) && (vpmu_mode & XENPMU_MODE_SELF) ) > /* Must be done with interrupts enabled */ > vpmu_load(next); > > - context_saved(prev); > - > if ( prev != next ) > _update_runstate_area(next); > While fine afaict, this re-ordering needs an explanation in the commit message (and not just in the overview mail). Jan