From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andi Kleen Subject: Re: [PATCH] Fixing stack alignment in x86-64 Xen Date: Wed, 18 May 2005 17:32:37 +0200 Message-ID: References: <7F740D512C7C1046AB53446D3720017304021DD7@scsmsx402.amr.corp.intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: In-Reply-To: <7F740D512C7C1046AB53446D3720017304021DD7@scsmsx402.amr.corp.intel.com> (Jun Nakajima's message of "Wed, 18 May 2005 08:09:42 -0700") List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: "Nakajima, Jun" Cc: xen-devel@lists.xensource.com List-Id: xen-devel@lists.xenproject.org "Nakajima, Jun" writes: > > The recent optimization reset_stack_and_jump() code needs to know the > exact address of the interrupt stack (because it resets %rsp), and > calculates it based on the value that Xen set (i.e. 8-byte boundary). > Since the processor forces the rsp0 on a 16-byte boundary (i.e. moves it > down by 8 bytes), Xen sees a wrong stack when returning from the > interrupt. I would rather fix reset_stack_and_jump then to do the necessary rounding or better look at the original RSP the processor stored into the stack frame. Otherwise the 16 byte alignment will probably bite you later again. -Andi