From: Ian Campbell Subject: Re: =?UTF-8?Q?=E7=AD=94=E5=A4=8D=3A?= =?UTF-8?Q?_=E7=AD=94=E5=A4=8D=3A?= About TSSinitialization when Xen booting. Date: Tue, 07 Aug 2007 08:30:12 +0100 Message-ID: <1186471812.6465.9.camel@localhost.localdomain> References: <20070807070938.923BF13685E@ncic.ac.cn> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: In-Reply-To: <20070807070938.923BF13685E@ncic.ac.cn> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: =?UTF-8?Q?=E6=9D=8E=E4=BA=9A=E7=90=BC?= Cc: "'Li, Xin B'" , xen-devel@lists.xensource.com List-Id: xen-devel@lists.xenproject.org On Tue, 2007-08-07 at 15:20 +0800, =E6=9D=8E=E4=BA=9A=E7=90=BC wrote: > Hi,Ian > I know what you mean. But the problem is that guest_cpu_user_regs.es > (the macro of get_frame_bottom() returns this value) is used to initializ= e > the TSS when it has not been initialized. It's the _address_ of guest_cpu_user_regs.es, isn't it? ((unsigned long)&get_cpu_info()->guest_cpu_user_regs.es) ^ > If TSS has not been initialized > correctly, Xen can't switch to the kernel stack of the current cpu when a > interrupt or trap occurs. Tss initialization should correctly be initiali= zed > before a interrupt or trap occurs. But I can't find where > guest_cpu_user_regs.es is initialized before used to initialize TSS in > function percpu_traps_init(). The TSS setup in percpu_traps_init() is for the double fault TSS. The regular TSS is setup in cpu_init using init_tss[cpu]. Ian.