[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] context switch




>>> On Tue, Mar 28, 2006 at 12:40 pm, in message
<af304b148f305da9c9b21ff4622322a3@xxxxxxxxxxxx>, Keir Fraser
<Keir.Fraser@xxxxxxxxxxxx> wrote: 

> On 28 Mar 2006, at 18:33, Ky Srinivasan wrote:
> 
>>  Looking more at the generic Linux CS code, saving the selector
values
>> of the outgoing context and setting the segment registers values to

>> zero
>> in prepare_arch_switch() we think deals with the problem I have
listed
>> below (thanks to Jan for pointing this out).
> 
> That's what our own trees do already.
> 
>> While this expensive trick
>> may solve this problem, a simpler solution perhaps might be to have
an
>> efficient  mechanism for the guest to manage hypervisor
preemptions.
> 
> Why is it expensive? The updates to zero only happen if the previous

> selector value was non- zero, which is usually not the case for 64-
bit 
> apps.

The expense I was referring to is the selector loads (to zero them
out).  The prepare_arch_switch() is also used on the 32 bit side as well
(for fs and gs).


> 
> Things should work okay even without the zeroing, by the way. It just

> avoids an unnecessary failsafe callback into the guest kernel. I
fixed 
> the failsafe handler for x86/64 earlier today.
> 
>   --  Keir

K. Y


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


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.