From: "Jan Beulich" Subject: Re: [PATCH v2 02/13] Set VCPU's is_running flag closer to when the VCPU is dispatched Date: Wed, 25 Sep 2013 14:42:32 +0100 Message-ID: <5243046802000078000F642A@nat28.tlf.novell.com> References: <1379670132-1748-1-git-send-email-boris.ostrovsky@oracle.com> <1379670132-1748-3-git-send-email-boris.ostrovsky@oracle.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail6.bemta4.messagelabs.com ([85.158.143.247]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1VOpM3-00089f-D5 for xen-devel@lists.xenproject.org; Wed, 25 Sep 2013 13:42:11 +0000 In-Reply-To: <1379670132-1748-3-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: suravee.suthikulpanit@amd.com, George.Dunlap@eu.citrix.com, jacob.shin@amd.com, eddie.dong@intel.com, dietmar.hahn@ts.fujitsu.com, jun.nakajima@intel.com, xen-devel List-Id: xen-devel@lists.xenproject.org >>> On 20.09.13 at 11:42, Boris Ostrovsky wrote: > An interrupt handler happening during new VCPU scheduling may want to know > who was on the (physical) processor at the point of the interrupt. Just > looking at 'current' may not be accurate since there is a window of time when > 'current' points to new VCPU and its is_running flag is set but the VCPU has > not been dispatched yet. More importantly, on Intel processors, if the handler > wants to examine certain state of an HVM VCPU (such as segment registers) the > VMCS pointer is not set yet. > > This patch will move setting the is_running flag to a later point. As said on v1 already - I'm all but convinced that this is not going to break something in subtle ways. Without you assuring us that you carefully inspected _all_ uses of this flag, I don't think this can go in. Jan