From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andi Kleen Subject: Re: [PATCH] Fixing stack alignment in x86-64 Xen Date: 18 May 2005 18:14:11 +0200 Message-ID: <20050518161411.GA88141@muc.de> References: <7F740D512C7C1046AB53446D3720017304021E83@scsmsx402.amr.corp.intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Date: Wed, 18 May 2005 18:14:11 +0200 Content-Disposition: inline In-Reply-To: <7F740D512C7C1046AB53446D3720017304021E83@scsmsx402.amr.corp.intel.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: "Nakajima, Jun" Cc: xen-devel@lists.xensource.com List-Id: xen-devel@lists.xenproject.org > I think the right thing is to get rsp0 in TSS on a 16-byte boundary by > getting get_stack_bottom() and get_cpu_user_regs() see the correct > stack. That will fix the reset_stack_and_jump() as well. It's basically > what my patch does. This means you cannot disable the 16 byte stack alignment in gcc. Probably does not matter too much today (I guess Xen is not that bad a stack pig), but in the far future it might come in useful. Also it would generate smaller code. -Andi