WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

[Xen-devel] Re: [PATCH] Fixing stack alignment in x86-64 Xen

To: "Nakajima, Jun" <jun.nakajima@xxxxxxxxx>
Subject: [Xen-devel] Re: [PATCH] Fixing stack alignment in x86-64 Xen
From: Andi Kleen <ak@xxxxxx>
Date: Wed, 18 May 2005 17:32:37 +0200
Cc: xen-devel@xxxxxxxxxxxxxxxxxxx
Delivery-date: Wed, 18 May 2005 15:32:03 +0000
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <7F740D512C7C1046AB53446D3720017304021DD7@xxxxxxxxxxxxxxxxxxxxxxxxxxxx> (Jun Nakajima's message of "Wed, 18 May 2005 08:09:42 -0700")
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
References: <7F740D512C7C1046AB53446D3720017304021DD7@xxxxxxxxxxxxxxxxxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Gnus/5.110002 (No Gnus v0.2) Emacs/21.3 (gnu/linux)
"Nakajima, Jun" <jun.nakajima@xxxxxxxxx> 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

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel