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] [xen-unstable] Further fixes for 32on64 bit kexec.

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] Further fixes for 32on64 bit kexec.
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Tue, 19 Jun 2007 14:40:07 -0700
Delivery-date: Tue, 19 Jun 2007 14:38:32 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
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-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# HG changeset patch
# User Ian Campbell <ian.campbell@xxxxxxxxxxxxx>
# Date 1182261835 -3600
# Node ID 8eaee9ef472f79af6a288a99c296dbc70510ba68
# Parent  5794f9b80c3fc4d55aeae892dcb099da4eccc21e
Further fixes for 32on64 bit kexec.

* switch to a suitable stack before jumping to compatibility mode.
* return the correct range for KEXEC_RANGE_MA_XEN.

Signed-off-by: Ian Campbell <ian.campbell@xxxxxxxxxxxxx>
---
 xen/arch/x86/x86_64/compat_kexec.S |   12 ++++++++++++
 xen/common/kexec.c                 |    4 ++++
 2 files changed, 16 insertions(+)

diff -r 5794f9b80c3f -r 8eaee9ef472f xen/arch/x86/x86_64/compat_kexec.S
--- a/xen/arch/x86/x86_64/compat_kexec.S        Tue Jun 19 14:52:53 2007 +0100
+++ b/xen/arch/x86/x86_64/compat_kexec.S        Tue Jun 19 15:03:55 2007 +0100
@@ -73,6 +73,10 @@ 1:      dec %r9
         RELOCATE_SYM(idle_pg_table,%rax)
         movq %rax, %cr3
 
+        /* Switch to identity mapped compatibility stack. */
+        RELOCATE_SYM(compat_stack,%rax)
+        movq %rax, %rsp
+
         /* Save xen_phys_start for 32 bit code. */
         movq xen_phys_start(%rip), %rbx
 
@@ -83,6 +87,14 @@ compatibility_mode_far:
 compatibility_mode_far:
         .long SYM_PHYS(compatibility_mode)
         .long __HYPERVISOR_CS32
+
+        /*
+         * We use 5 words of stack for the arguments passed to the kernel. The
+         * kernel only uses 1 word before switching to its own stack. Allocate
+         * 16 words to give "plenty" of room.
+         */
+        .fill 16,4,0
+compat_stack:
 
         .code32
 
diff -r 5794f9b80c3f -r 8eaee9ef472f xen/common/kexec.c
--- a/xen/common/kexec.c        Tue Jun 19 14:52:53 2007 +0100
+++ b/xen/common/kexec.c        Tue Jun 19 15:03:55 2007 +0100
@@ -169,7 +169,11 @@ static int kexec_get(reserve)(xen_kexec_
 
 static int kexec_get(xen)(xen_kexec_range_t *range)
 {
+#ifdef CONFIG_X86_64
+    range->start = xenheap_phys_start;
+#else
     range->start = virt_to_maddr(_start);
+#endif
     range->size = (unsigned long)xenheap_phys_end - (unsigned 
long)range->start;
     return 0;
 }

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

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [xen-unstable] Further fixes for 32on64 bit kexec., Xen patchbot-unstable <=