[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] [xen-unstable] Further fixes for 32on64 bit kexec.
# 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
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |