RE: [V4 PATCH 4/4] x86/apic: Introduce noextnmi boot option

From: æåèå / KAWAIïHIDEHIRO
Date: Sun Oct 04 2015 - 22:04:10 EST


> On Fri, Oct 02, 2015 at 12:58:02AM +0000, æåèå / KAWAIïHIDEHIRO wrote:
> > > On Thu, Oct 01, 2015 at 10:24:19AM +0000, æåèå / KAWAIïHIDEHIRO wrote:
> > > > But how do we check if the starting kernel is a dump capture kernel?
> > >
> > > How does that first kernel pass info to the capture kernel?
> >
> > As I described in the previous mail,
>
> I meant: "How does the first kernel pass info to the capture kernel by
> *not* using the kernel command line"?
>
> The kernel command line is not the channel to pass data to the kdump
> kernel.

That's different from my point of view. I'm not going to pass
some data from the first kernel to the second kernel. I'm just going to
provide a configurable option for the second kernel to users.

We souldn't enable this feature silently. Some users wouldn't like
to enable this feature. For example, a user enables a watchdog timer
which raises an external NMI when the counter is not reset for a
specific duration. Then, the second kernel hangs up while saving
crash dump, and NMI is delivered to the CPU. The kernel gets panic
due to the NMI, prints some information to the display and serial
console, and then automatically reboot. In this case, users don't
want to block external NMIs.

So, making this feature configurable by command line option is
reasonable.

> > Yes, your first kernel doesn't get external NMIs, but basically
> > you don't have to set "noextnmi" option to the first kernel.
>
> So it doesn't belong there as a kernel command line parameter in the
> first place.
>
> IOW, you need a different method to pass data to the second kernel. Be
> it an ELF header, be it a shared page, whatever.

I think we should use the ELF header only if the passed information
is saved to a crash dump.

Also, we wouldn't want to introduce new shared page for that purpose.
A memory segment provided by kexec syscall is not usable because
the second kernel doesn't know what there is in a segment without a
command line option. Please note that "elfcorehdr" command line option
prepared by kexec command is used to inform the second kernel about
the address of the ELF header memory segment.

Regards,


Hidehiro Kawai
Hitachi, Ltd. Research & Development Group


N‹§²æ¸›yú²X¬¶ÇvØ–)Þ{.nlj·¥Š{±‘êX§¶›¡Ü}©ž²ÆzÚj:+v‰¨¾«‘êZ+€Êzf£¢·hšˆ§~†­†Ûÿû®w¥¢¸?™¨è&¢)ßf”ùy§m…á«a¶Úÿ 0¶ìå