linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Dave Young <dyoung@redhat.com>
To: lijiang <lijiang@redhat.com>
Cc: Baoquan He <bhe@redhat.com>,
	linux-kernel@vger.kernel.org, kexec@lists.infradead.org,
	x86@kernel.org, tglx@linutronix.de, mingo@redhat.com,
	bp@alien8.de, akpm@linux-foundation.org
Subject: Re: [PATCH 2/2 v5] x86/kexec_file: add reserved e820 ranges to kdump kernel e820 table
Date: Wed, 7 Nov 2018 17:35:40 +0800	[thread overview]
Message-ID: <20181107093540.GA8521@dhcp-128-65.nay.redhat.com> (raw)
In-Reply-To: <cc579d02-19e9-8749-ea48-3ff0fbf6461d@redhat.com>

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

  reply	other threads:[~2018-11-07  9:35 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-11-07  5:00 [PATCH 0/2 v5] add reserved e820 ranges to the " Lianbo Jiang
2018-11-07  5:00 ` [PATCH 1/2 v5] x86/kexec_file: add e820 entry in case e820 type string matches to io resource name Lianbo Jiang
2018-11-07  5:17   ` Baoquan He
2018-11-07  5:00 ` [PATCH 2/2 v5] x86/kexec_file: add reserved e820 ranges to kdump kernel e820 table Lianbo Jiang
2018-11-07  5:23   ` Baoquan He
2018-11-07  9:10     ` lijiang
2018-11-07  9:35       ` Dave Young [this message]
2018-11-09  6:51       ` Baoquan He
2018-11-09  7:13         ` lijiang

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20181107093540.GA8521@dhcp-128-65.nay.redhat.com \
    --to=dyoung@redhat.com \
    --cc=akpm@linux-foundation.org \
    --cc=bhe@redhat.com \
    --cc=bp@alien8.de \
    --cc=kexec@lists.infradead.org \
    --cc=lijiang@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=tglx@linutronix.de \
    --cc=x86@kernel.org \
    --subject='Re: [PATCH 2/2 v5] x86/kexec_file: add reserved e820 ranges to kdump kernel e820 table' \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).