[PATCH] kdump, x86: Process multiple Crash kernel in /proc/iomem

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

 



On Fri, Mar 22, 2013 at 01:52:26PM -0700, Yinghai Lu wrote:
> On Fri, Mar 22, 2013 at 10:59 AM, Vivek Goyal <vgoyal at redhat.com> wrote:
> > I get following error while loading kernel.
> >
> > parse_iomem_single failed.
> > Could not get memory layout
> >
> > I think you need to handle parse_iomem_single("Crash Kernel") in
> > kexec-x86-common.c. It assumes that there is a single contiguous
> > reserved region of memory and set mem_min and mem_max based on
> > that. But that will not work when there are multiple "Crash Kernel"
> > entries.
> >
> > In case of kexec_on_panic, we seem to have all the memory ranges in
> > info->memory_ranges[]. I guess we don't need that. We just need ranges
> > which are reserved for crash kernel and marked by "Crash Kernel". In
> > that case we will be able to handle multiple "Crash Kernel" ranges.
> 
> but we still like to put kernel and initrd high, and leave low range
> for swiotlb.
> could just find mem_min and mem_max for largest and last one.

Yes, but I guess that should not be hard coded here. It is during load
phase we should enforce where we want to load all the segments.

It will work though for our current usage. May be later we can improve
it further. Where loader sees all the memory ranges (low and high) and
we choose appropriate segment.

BTW, I had a query about loading 64bit entry point bzImage. In 32bit
bzImage entry point logic, we used to load bzImage at the beginning
of memory hole and initrd at the end of memory hole. So that bzImage
and initramfs are as far as possible and initramfs decompression does
not overwrite anything or for that matter setting bss are does not
spill over into initramfs.

In new code, It looks like we seem to be loading kernel towards the end
of the hole.

       addr = add_buffer(info, kernel + kern16_size, k_size,
                          size, align, 0x100000, -1, -1);

IIUC, this has potential that new kernel can overwrite some of the old
kernel's data structure while setting up bss. Shouldn't we do it 32bit
entry code way where bzImage is loaded towards the beginning of hole and
initramfs is loaded towards the end of the hole.

Thanks
Vivek



[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