kexec does not load
Subsystems (2)
Hi Huang,
your patch:
commit ceb04ae1223ba5cdd40df744aa73a32b2cc7d879
Author: Huang Ying <[email protected]>
Date: Wed Oct 29 11:24:25 2008 +0800
kexec jump support for kexec-tools
To support memory backup/restore an option named --load-preserve-context is added to kexec. When it is specified toggether with --mem-max, most segments for crash dump support are loaded, and the memory range between mem_min to mem_max which has no segments loaded are loaded as backup segments. To support jump back from kexeced, options named --load-jump-back-helper and --entry are added to load a helper image with specified entry to jump back.
broke kexec on my system (x86-64) with Xen. With the patch:
Symbol: cmdline_end not found cannot set
Without the patch it does work. The command line was:
/sbin/kexec -p /boot/vmlinuz-2.6.27.5-2-default \
--append="root=/dev/disk/by-id/scsi-3500000e0159c2510-part6 \
console=tty0 console=ttyS0,57600 \
sysrq_always_enabled panic=100 \
resume=/dev/disk/by-id/scsi-3500000e0159c2510-part2 \
xencons=ttyS vga=normal console=ttyS0,57600 \
elevator=deadline sysrq=1 reset_devices irqpoll \
maxcpus=1 kernelversion=2.6.27.7-3-xen " \
--initrd=/boot/initrd-2.6.27.5-2-default-kdumpI don't know the cause. Can you analyse? I can help with testing patches, of course, but I have no time to analyse the problem now. :-(
Regards,
Bernhard
_______________________________________________
kexec mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/kexec
PATCH 1/1 Fix kexec x86_64 load failed bug
Fix a bug of kexec load on x86_64. Kexec fails to do load on x86_64, with error message:
Symbol: cmdline_end not found cannot set
Because kexec/arch/i386/kexec-bzImage.c accesses cmdline_end symbol in i386 purgatory, but there is no cmdline_end in x86_64 purgatory, and kexec-bzImage.c is used by x86_64 too.
cmdline_end is added into x86_64 purgatory to solve the bug, because kexec jump support for x86_64 is planned.
purgatory/arch/x86_64/purgatory-x86_64.c +1 -0
@@ -5,6 +5,7 @@uint8_t reset_vga =0 ;uint8_t legacy_pic =0 ;uint8_t panic_kernel =0 ; +char *cmdline_end =0 ;void setup_arch (void ) {
_______________________________________________
kexec mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/kexec
Re: [PATCH] Fix kexec x86_64 load failed bug
Quoted 20 lines · Huang Ying
Fix a bug of kexec load on
x86_64. Kexec fails to do load onx86_64, with error message:Symbol:
cmdline_endnot found cannot setBecause
kexec/arch/i386/kexec-bzImage.caccessescmdline_endsymbol in i386 purgatory, but there is nocmdline_endinx86_64purgatory, andkexec-bzImage.cis used byx86_64too.
cmdline_endis added intox86_64purgatory to solve the bug, because kexec jump support forx86_64is planned.Reported-by Bernhard Walle <[email protected]>Signed-off-by Huang Ying <[email protected]>purgatory/arch/x86_64/purgatory-x86_64.c +0
-0
purgatory/arch/x86_64/purgatory-x86_64.c line 11
Quoted 7 lines
purgatory/arch/x86_64/purgatory-x86_64.c +1
-0@@ -5,6 +5,7 @@uint8_t reset_vga =0 ;uint8_t legacy_pic =0 ;uint8_t panic_kernel =0 ; +char *cmdline_end =0 ;void setup_arch (void ) {
This isn't kernel code? Where is /purgatory/ ?
Anyway, for kernel code, that should be:
char *cmdline_end = NULL;
Signature · 6 lines
~Randy _______________________________________________ kexec mailing list [email protected] http://lists.infradead.org/mailman/listinfo/kexec
Re: [PATCH] Fix kexec x86_64 load failed bug
Quoted 4 lines · Randy Dunlap
This isn't kernel code? Where is /purgatory/ ?
Anyway, for kernel code, that should be:
char*cmdline_end= NULL;
This patch is against kexec tools, not kernel.
Best Regards,
Huang Ying
_______________________________________________
kexec mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/kexec
Re: [PATCH] Fix kexec x86_64 load failed bug
Quoted 10 lines · Huang Ying
Quoted 4 lines · Randy Dunlap
This isn't kernel code? Where is /purgatory/ ?
Anyway, for kernel code, that should be:
char*cmdline_end= NULL;This patch is against kexec tools, not kernel.
Best Regards,
Huang Ying
Hi Huang,
I think that I would prefer "char *cmdline_end = NULL;" for kexec-tools code too.
Signature · 9 lines
Simon Horman VA Linux Systems Japan K.K., Sydney, Australia Satellite Office H: www.vergenet.net/~horms/ W: www.valinux.co.jp/en _______________________________________________ kexec mailing list [email protected] http://lists.infradead.org/mailman/listinfo/kexec
Re: [PATCH] Fix kexec x86_64 load failed bug
Quoted 9 lines · Simon Horman
Quoted 8 lines · Huang Ying
Quoted 4 lines · Randy Dunlap
This isn't kernel code? Where is /purgatory/ ?
Anyway, for kernel code, that should be:
char*cmdline_end= NULL;This patch is against kexec tools, not kernel.
Quoted 7 lines
Quoted 2 lines
Best Regards,
Huang YingHi Huang,
I think that I would prefer "char
*cmdline_end= NULL;" for kexec-tools code too.
Patch v2 follows with NULL instead of 0.
Best Regards,
Huang Ying ---------------------------------------------------->
Fix a bug of kexec load on x86_64. Kexec fails to do load on x86_64, with error message:
Symbol: cmdline_end not found cannot set
Because kexec/arch/i386/kexec-bzImage.c accesses cmdline_end symbol in i386 purgatory, but there is no cmdline_end in x86_64 purgatory, and kexec-bzImage.c is used by x86_64 too.
cmdline_end is added into x86_64 purgatory to solve the bug, because kexec jump support for x86_64 is planned.
--- purgatory/arch/x86_64/purgatory-x86_64.c | 2 ++ 1 file changed, 2 insertions(+)
purgatory/arch/x86_64/purgatory-x86_64.c +2 -0
@@ -1,10 +1,12 @@#include <stdint.h> +#include <stddef.h> #include <purgatory.h> #include "purgatory-x86_64.h" uint8_t reset_vga =0 ;uint8_t legacy_pic =0 ;uint8_t panic_kernel =0 ; +char *cmdline_end =NULL ;void setup_arch (void ) {
_______________________________________________
kexec mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/kexec
Simon Horman
AppliedRe: [PATCH] Fix kexec x86_64 load failed bug
Quoted 13 lines · Huang Ying
Quoted 12 lines · Simon Horman
Quoted 10 lines · Huang Ying
Quoted 4 lines · Randy Dunlap
This isn't kernel code? Where is /purgatory/ ?
Anyway, for kernel code, that should be:
char*cmdline_end= NULL;This patch is against kexec tools, not kernel.
Best Regards,
Huang Ying
Quoted 6 lines
Quoted 4 lines
Hi Huang,
I think that I would prefer "char
*cmdline_end= NULL;" for kexec-tools code too.Patch v2 follows with NULL instead of 0.
Thanks, applied.
Signature · 9 lines
Simon Horman VA Linux Systems Japan K.K., Sydney, Australia Satellite Office H: www.vergenet.net/~horms/ W: www.valinux.co.jp/en _______________________________________________ kexec mailing list [email protected] http://lists.infradead.org/mailman/listinfo/kexec
Re: [PATCH] Fix kexec x86_64 load failed bug
Quoted 15 lines · Simon Horman
Quoted 13 lines · Huang Ying
Quoted 12 lines · Simon Horman
Quoted 10 lines · Huang Ying
Quoted 4 lines · Randy Dunlap
This isn't kernel code? Where is /purgatory/ ?
Anyway, for kernel code, that should be:
char*cmdline_end= NULL;This patch is against kexec tools, not kernel.
Best Regards,
Huang Ying
Quoted 8 lines
Quoted 6 lines
Quoted 4 lines
Hi Huang,
I think that I would prefer "char
*cmdline_end= NULL;" for kexec-tools code too.Patch v2 follows with NULL instead of 0.
Thanks, applied.
Verified. Huang, thanks for the quick fix!
Bernhard
Signature · 6 lines
Bernhard Walle, SUSE Linux Products GmbH, Architecture Development _______________________________________________ kexec mailing list [email protected] http://lists.infradead.org/mailman/listinfo/kexec