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] [PATCH] x86-64 exception frame alignment

To: <xen-devel@xxxxxxxxxxxxxxxxxxx>
Subject: [Xen-devel] [PATCH] x86-64 exception frame alignment
From: "Jan Beulich" <JBeulich@xxxxxxxxxx>
Date: Tue, 30 Aug 2005 17:28:16 +0200
Delivery-date: Tue, 30 Aug 2005 15:25:10 +0000
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
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>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
When generating an exception frame for injection into a guest, that
frame's
base should be aligned on a 16-byte boundary (as is done by the
hardware).

Signed-off-by: Jan Beulich <jbeulich@xxxxxxxxxx>

--- src/xen/2005-08-29/xen/arch/x86/x86_64/entry.S      2005-08-29
14:29:56.000000000 +0200
+++ cpp/xen/2005-08-29/xen/arch/x86/x86_64/entry.S      2005-08-29
17:17:40.304663936 +0200
@@ -339,6 +339,7 @@ create_bounce_frame:
 1:      /* In kernel context already: push new frame at existing %rsp.
*/
         movq  UREGS_rsp+8(%rsp),%rsi
         andb  $0xfc,UREGS_cs+8(%rsp)    # Indicate kernel context to
guest.
+        andq  $~0xf,%rsi                # Align frame like hardware
would.
 2:      movq  $HYPERVISOR_VIRT_START,%rax
         cmpq  %rax,%rsi
         jb    1f                        # In +ve address space? Then
okay.

Attachment: xen-x86_64-exception-frame-align.patch
Description: Binary data

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel
<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-devel] [PATCH] x86-64 exception frame alignment, Jan Beulich <=