From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Jan Beulich" Subject: Re: question about patch 13252 Date: Thu, 19 Mar 2009 14:53:06 +0000 Message-ID: <49C26A62.76E4.0078.0@novell.com> References: <8FED46E8A9CA574792FC7AACAC38FE7701CB8168A6@PDSMSX501.ccr.corp.intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable Return-path: In-Reply-To: <8FED46E8A9CA574792FC7AACAC38FE7701CB8168A6@PDSMSX501.ccr.corp.intel.com> Content-Disposition: inline List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Guanqun Lu Cc: xen-devel@lists.xensource.com List-Id: xen-devel@lists.xenproject.org >>> "Lu, Guanqun" 19.03.09 15:07 >>> >I saw that in patch 13252, >you added such lines in xen/arch/x86/traps.c > >+#ifdef CONFIG_COMPAT >+ _set_tssldt_desc( >+ compat_gdt_table + __TSS(n) - FIRST_RESERVED_GDT_ENTRY, >+ (unsigned long)addr, >+ offsetof(struct tss_struct, __cacheline_filler) - 1, >+ 11); >+#endif > >I have such question about the number 11, 11 is 1010 in binary format, >which means that the busy flat is set. Then later, load_TR() is called. >load_TR() is a wrapper around instruction 'ltr'. As I consult SDM2A, >it says that ltr will generate #GP, when the busy flag is set. > >So I'm a little puzzled. Can you explain a little why it's not 9 ? >Or am I missing something here? You're not running on compat_gdt_table when doing the ltr, and when you switch between GDTs the busy bits must be in sync. Jan