From mboxrd@z Thu Jan 1 00:00:00 1970 From: Keir Fraser Subject: Re: Re: [PATCH] switch to a known good/static GDT beforekexec Date: Thu, 02 Jul 2009 13:38:08 +0100 Message-ID: References: <4A4CB9EC020000780000897E@vpn.id2.novell.com> Mime-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <4A4CB9EC020000780000897E@vpn.id2.novell.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Jan Beulich , Ian Campbell Cc: "xen-devel@lists.xensource.com" List-Id: xen-devel@lists.xenproject.org On 02/07/2009 12:45, "Jan Beulich" wrote: >>>> Keir Fraser 02.07.09 13:11 >>> >> I have one more question then -- when need_full_gdt(n), why do we always >> unconditionally rewrite the l1es mapping the reserved gdt entries? Shouldn't >> that be done on vcpu creation only and perhaps on compat mode switch (i.e., >> isn't it wasteful to do it in the context switch path)? > > While that's correct, we're talking about a single memory write here (plus > the setup code), which I think is no more wasteful than adding the extra > checking that would be needed to see whether we switch between > compat and !compat (including the !need_full_gdt(p) case, where we > don't know what kind of mapping we currently have). Hm yes, fair enough. -- Keir