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-changelog

[Xen-changelog] x86/64 fixes.

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] x86/64 fixes.
From: BitKeeper Bot <riel@xxxxxxxxxxx>
Date: Wed, 18 May 2005 07:52:45 +0000
Delivery-date: Wed, 18 May 2005 08:08:09 +0000
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: Xen Development List <xen-devel@xxxxxxxxxxxxxxxxxxx>
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
ChangeSet 1.1441, 2005/05/18 08:52:45+01:00, kaf24@xxxxxxxxxxxxxxxxxxxx

        x86/64 fixes.
        Signed-off-by: Jun Nakajima <jun.nakajima@xxxxxxxxx>
        Signed-off-by: Scott Parish <srparish@xxxxxxxxxx>
        Signed-off-by: Keir Fraser <keir@xxxxxxxxxxxxx>



 arch/x86/x86_64/entry.S          |    4 ++--
 include/asm-x86/x86_64/current.h |   10 ++++++----
 2 files changed, 8 insertions(+), 6 deletions(-)


diff -Nru a/xen/arch/x86/x86_64/entry.S b/xen/arch/x86/x86_64/entry.S
--- a/xen/arch/x86/x86_64/entry.S       2005-05-18 04:08:34 -04:00
+++ b/xen/arch/x86/x86_64/entry.S       2005-05-18 04:08:34 -04:00
@@ -314,10 +314,10 @@
         movq  EDOMAIN_vcpu_info(%rbx),%rax
         pushq VCPUINFO_upcall_mask(%rax)
         testb $TBF_INTERRUPT,%cl
-        setnz VCPUINFO_upcall_mask(%eax)# TBF_INTERRUPT -> clear upcall mask
+        setnz VCPUINFO_upcall_mask(%rax)# TBF_INTERRUPT -> clear upcall mask
         popq  %rax
         shll  $16,%eax                  # Bits 16-23: saved_upcall_mask
-        movw  UREGS_cs+8(%esp),%ax      # Bits  0-15: CS
+        movw  UREGS_cs+8(%rsp),%ax      # Bits  0-15: CS
 FLT5:   movq  %rax,8(%rsi)              # CS/saved_upcall_mask
         movq  UREGS_rip+8(%rsp),%rax
 FLT6:   movq  %rax,(%rsi)               # RIP
diff -Nru a/xen/include/asm-x86/x86_64/current.h 
b/xen/include/asm-x86/x86_64/current.h
--- a/xen/include/asm-x86/x86_64/current.h      2005-05-18 04:08:34 -04:00
+++ b/xen/include/asm-x86/x86_64/current.h      2005-05-18 04:08:34 -04:00
@@ -5,7 +5,7 @@
 struct domain;
 
 #define STACK_RESERVED \
-    (sizeof(struct cpu_user_regs) + sizeof(struct domain *))
+    (sizeof(struct cpu_user_regs) + sizeof(struct domain *) + 8)
 
 static inline struct exec_domain *get_current(void)
 {
@@ -34,15 +34,17 @@
 
 /*
  * Get the bottom-of-stack, as stored in the per-CPU TSS. This is actually
- * 40 bytes before the real bottom of the stack to allow space for:
- *  domain pointer, DS, ES, FS, GS
+ * 48 bytes before the real bottom of the stack to allow space for:
+ * domain pointer, padding, DS, ES, FS, GS. The padding is required to
+ * have the stack pointer 16-byte aligned: the amount we subtract from
+ * STACK_SIZE *must* be a multiple of 16.
  */
 static inline unsigned long get_stack_bottom(void)
 {
     unsigned long p;
     __asm__( "andq %%rsp,%0; addq %2,%0"
            : "=r" (p)
-           : "0" (~(STACK_SIZE-1)), "i" (STACK_SIZE-40) );
+           : "0" (~(STACK_SIZE-1)), "i" (STACK_SIZE-48) );
     return p;
 }
 

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

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] x86/64 fixes., BitKeeper Bot <=