[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20181107093540.GA8521@dhcp-128-65.nay.redhat.com>
Date: Wed, 7 Nov 2018 17:35:40 +0800
From: Dave Young <dyoung@...hat.com>
To: lijiang <lijiang@...hat.com>
Cc: Baoquan He <bhe@...hat.com>, linux-kernel@...r.kernel.org,
kexec@...ts.infradead.org, x86@...nel.org, tglx@...utronix.de,
mingo@...hat.com, bp@...en8.de, akpm@...ux-foundation.org
Subject: Re: [PATCH 2/2 v5] x86/kexec_file: add reserved e820 ranges to kdump
kernel e820 table
On 11/07/18 at 05:10pm, lijiang wrote:
> 在 2018年11月07日 13:23, Baoquan He 写道:
> > On 11/07/18 at 01:00pm, Lianbo Jiang wrote:
> >> E820 reserved ranges is useful in kdump kernel, it has been added in
> >> kexec-tools code.
> >>
> >> One reason is PCI mmconf (extended mode) requires reserved region otherwise
> >> it falls back to legacy mode, and also outputs the following kernel log.
> >
> > OK, it falls back to legacy mode, and also output kernel log, except of
> > these, does it crash kernel? kdump kernel hang? Can we leave it if it
> > only ouptut kernel log?
> >
> >>
> >> Example:
> >> ......
> >> [ 19.798354] PCI: MMCONFIG for domain 0000 [bus 00-ff] at [mem 0x80000000-0x8fffffff] (base 0x80000000)
> >> [ 19.800653] [Firmware Info]: PCI: MMCONFIG at [mem 0x80000000-0x8fffffff] not reserved in ACPI motherboard resources
> >> [ 19.800995] PCI: not using MMCONFIG
> >> ......
> >>
> >> The correct kernel log is like this:
> >> ......
> >> [ 0.082649] PCI: MMCONFIG for domain 0000 [bus 00-ff] at [mem 0x80000000-0x8fffffff] (base 0x80000000)
> >> [ 0.083610] PCI: MMCONFIG at [mem 0x80000000-0x8fffffff] reserved in E820
> >> ......
> >>
> >> Furthermore, when AMD SME kdump support, it needs to map dmi table area
> >> as decrypted. For normal boot, these ranges sit in e820 reserved ranges,
> >> thus the early ioremap code naturally map them as decrypted. If it also
> >> has same e820 reserve setup in kdump kernel then it will just work like
> >> normal kernel.
> >
> > Why do we care? If don't fix, what's happening?
> >
> > Lianbo, for a bug fix, please describe the problems. Then give out the
> > analysis about root cause.
> >
>
> Thanks for your comment in detail.
>
> In fact, these patches are really simple. As the subject mentioned, this patch
> [PATCH 2/2] adds the reserved e820 ranges to kdump kernel e820 table, and the
> first patch [PATCH 1/2] helps to exactly add the e820(E820_TYPE_RESERVED) type
> to kdump kernel e820 table, that is to say, it will filter out some unnecessary
> type(E820_TYPE_RAM/E820_TYPE_UNUSABLE/E820_TYPE_RESERVED_KERN).
>
> At present, when we use the kexec to load the kernel image and initramfs(for
> example: kexec -s -p xxxx), the latest kernel does not pass the e820 reserved
> ranges to the second kernel, which might produce two problems:
>
> The first one is the MMCONFIG issue, although which does not make the system
> crash or hang, this issue is still a potential risk, because my test can't
> cover all cases due to resource constraints(Machine), and i'm not sure what
> it will happen on other machine.
If a device is plugged in pci domain 1 then this device can not be
recognized in kdump kernel in your case. For example if one want to
dump to a network target, but the net card can not be recognized then
vmcore can not be saved successfully
Thanks
Dave
Powered by blists - more mailing lists