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] Re: [PATCH] switch to a known good/static GDTbeforekexec

To: Jan Beulich <JBeulich@xxxxxxxxxx>, Ian Campbell <Ian.Campbell@xxxxxxxxxxxxx>
Subject: Re: [Xen-devel] Re: [PATCH] switch to a known good/static GDTbeforekexec
From: Keir Fraser <keir.fraser@xxxxxxxxxxxxx>
Date: Fri, 03 Jul 2009 08:48:02 +0100
Cc: "xen-devel@xxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxx>
Delivery-date: Fri, 03 Jul 2009 00:48:28 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <4A4DCC350200007800008B3A@xxxxxxxxxxxxxxxxxx>
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/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
Thread-index: Acn7rg5einH9ZRXQRJaMtHMxcrU05gABIkMj
Thread-topic: [Xen-devel] Re: [PATCH] switch to a known good/static GDTbeforekexec
User-agent: Microsoft-Entourage/12.19.0.090515
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