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

Re: [Xen-devel] Re: [PATCH] switch to a known good/static GDTbeforekexec



On 03/07/2009 08:15, "Jan Beulich" <JBeulich@xxxxxxxxxx> wrote:

>> Actually no, I'm not sure what extra checking you think you'd need? You'd
>> create the per-vcpu mapping when a vcpu is created and when it changes
>> to/from compat mode, and that would be it wouldn't it? You'd only delete
>> code from __context_switch(); not add different code to it?
> 
> While you're right that my explanation wasn't really correct, moving this
> back to the vCPU creation/mode-switching functions doesn't work because
> the GDT is now per-CPU (and it's that patch where this code got added to
> context switch): The installed mapping depends on the *physical* CPU the
> code is running on. So the extra dependency that might be added here
> would be to check whether the physical CPU the vCPU is running on
> changed, but afair v->processor gets set before entering context_switch(),
> so we'd have to additionally capture and store the last used value. Would
> you think that's worth it?

Ok, now I get it. I think. There's no way to avoid potentially having to
rewrite the PTE on context switch, so may as well always do it.

 -- Keir



_______________________________________________
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®.