Hello Vivec, On Thu, 2011-09-29 at 09:32 -0400, Vivek Goyal wrote: > On Thu, Sep 29, 2011 at 08:51:02AM +0900, Simon Horman wrote: > > On Mon, Sep 26, 2011 at 03:09:09PM +0200, Michael Holzheu wrote: > > > Hello Simon, > > > > > > I think the --load-preserve-context and --load-jump-back-helper kexec > > > options are not working on s390 because we do not support > > > CONFIG_KEXEC_JUMP. I assume the same is true also on other > > > architectures. Correct me, if I am wrong. Unfortunately I did not find > > > much documentation for that feature. > > > > > > Wouldn't it be better to print an error message when the options are > > > used on those architectures? > > > > Ideally it would be nice if kexec-tools could ask the kernel > > if KEXEC_JUMP is supported (or enabled?) or not rather than > > hardcoding this information into kexec-tools on a per-architecture basis. > > Shouldn't kexec system call return error if KEXEC_JUMP is not supported > and user asked for it? I think currently not. I assume that we should check the KEXEC_PRESERVE_CONTEXT flag in the kexec_load system call. What about the following: --- kernel/kexec.c | 4 ++++ 1 file changed, 4 insertions(+) --- a/kernel/kexec.c +++ b/kernel/kexec.c @@ -949,6 +949,10 @@ SYSCALL_DEFINE4(kexec_load, unsigned lon if (!capable(CAP_SYS_BOOT)) return -EPERM; +#ifndef CONFIG_KEXEC_JUMP + if (flags & KEXEC_PRESERVE_CONTEXT) + return -EOPNOTSUPP; +#endif /* * Verify we have a legal set of flags * This leaves us room for future extensions.