kexec: load-preserve-context option on s390

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello Vivek,

On Fri, 2011-09-30 at 12:06 -0400, Vivek Goyal wrote:
> On Thu, Sep 29, 2011 at 03:38:31PM +0200, Michael Holzheu wrote:
> > Hello Vivec,
> 
> Right spelling is "Vivek" and not "Vivec" :-)

I know... and I really wanted to avoid that error. But somehow the "c"
is always coming automatically :-)

> [..]
> > > 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.
> > 
> 
> Shouldn't following existing code take care of this already?
> 
>         /*
>          * Verify we have a legal set of flags
>          * This leaves us room for future extensions.
>          */
>         if ((flags & KEXEC_FLAGS) != (flags & ~KEXEC_ARCH_MASK))
>                 return -EINVAL;
> 
> In include/linux/kexec.h, we have following.
> 
> /* List of defined/legal kexec flags */
> #ifndef CONFIG_KEXEC_JUMP
> #define KEXEC_FLAGS    KEXEC_ON_CRASH
> #else
> #define KEXEC_FLAGS    (KEXEC_ON_CRASH | KEXEC_PRESERVE_CONTEXT)
> #endif
> 
> Not sure why it is not working.

Hmmm, actually it is working. I somehow must have overlooked that
before.

When I call kexec with --load-preserve-context - while not really
knowing what I am doing here - I get the following:

# kexec -p /boot/vmlinuz --load-preserve-context --mem-min=0x10000
--mem-max=0x100000000 

kexec_load failed: Invalid argument
entry       = 0x10000 flags = 160002
nr_segments = 2
segment[0].buf   = 0x3fffc989010
segment[0].bufsz = 330600
segment[0].mem   = 0x10000
segment[0].memsz = 331000
segment[1].buf   = (nil)
segment[1].bufsz = 0
segment[1].mem   = 0x341000
segment[1].memsz = 334be000

Perhaps a better error message could help here. But there are several
possible reasons for getting EINVAL from kexec_load(). So probably we
can't say "--load-preserve-context not supported by current kernel"
every time we get EINVAL from kexec_load().

Not sure what to do here. Perhaps we just leave it as it is.

BTW: Is there any good documentation on KEXEC_PRESERVE_CONTEXT?

Michael




[Index of Archives]     [LM Sensors]     [Linux Sound]     [ALSA Users]     [ALSA Devel]     [Linux Audio Users]     [Linux Media]     [Kernel]     [Gimp]     [Yosemite News]     [Linux Media]

  Powered by Linux