From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Jan Beulich" Subject: Re: x86's context switch ordering of operations Date: Tue, 29 Apr 2008 16:37:44 +0100 Message-ID: <48175CE8.76E4.0078.0@novell.com> References: <48174124.76E4.0078.0@novell.com> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable Return-path: In-Reply-To: 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: Keir Fraser Cc: xen-devel@lists.xensource.com List-Id: xen-devel@lists.xenproject.org >>> Keir Fraser 29.04.08 15:58 >>> >Um, good point, I'd forgotten exactly how the code fitted together. = Anyhow, >the reason you see ctxt_switch_{from,to} happening after set_current() is >because context_switch() and __context_switch() can actually be decoupled.= >When switching to the idle vcpu we run context_switch() but we do not run >__context_switch(). Okay, that could be easily dealt with by doing set_current() explicitly in the switch-to-idle case, and moving it into __context_switch() in the other cases. Any word on the significance of doing write_ptbase() after calling ctxt_switch_to()? Jan