WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

Re: [Xen-devel] x86's context switch ordering of operations

To: "Keir Fraser" <keir.fraser@xxxxxxxxxxxxx>
Subject: Re: [Xen-devel] x86's context switch ordering of operations
From: "Jan Beulich" <jbeulich@xxxxxxxxxx>
Date: Tue, 29 Apr 2008 16:37:44 +0100
Cc: xen-devel@xxxxxxxxxxxxxxxxxxx
Delivery-date: Tue, 29 Apr 2008 08:37:46 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
In-reply-to: <C43CE81F.2012F%keir.fraser@xxxxxxxxxxxxx>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
References: <48174124.76E4.0078.0@xxxxxxxxxx> <C43CE81F.2012F%keir.fraser@xxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
>>> Keir Fraser <keir.fraser@xxxxxxxxxxxxx> 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


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel