From: Borislav Petkov <bp@alien8.de>
To: bjorn@helgaas.com
Cc: lijiang@redhat.com, bhe@redhat.com, x86 <x86@kernel.org>,
kexec@lists.infradead.org, linux-kernel@vger.kernel.org,
Ingo Molnar <mingo@redhat.com>,
Bjorn Helgaas <helgaas@kernel.org>,
tglx@linutronix.de, dyoung@redhat.com,
Andrew Morton <akpm@linux-foundation.org>
Subject: Re: [PATCH 1/2 v6] x86/kexec_file: add e820 entry in case e820 type string matches to io resource name
Date: Wed, 21 Nov 2018 19:42:32 +0100 [thread overview]
Message-ID: <20181121184232.GB27559@zn.tnic> (raw)
In-Reply-To: <CABhMZUUscS3jUZUSM5Y6EYJK6weo7Mjj5-EAKGvbw0qEe+38zw@mail.gmail.com>
On Tue, Nov 20, 2018 at 02:43:57PM -0600, Bjorn Helgaas wrote:
> MMCONFIG (aka ECAM) space is described in the ACPI MCFG table. The
> generic code to read that is in drivers/acpi/pci_mcfg.c (ignore all
> the quirks at the top) and the generic code to use it is
> drivers/pci/ecam.c.
/me saves that for future reference.
> Unfortunately x86 doesn't use any of that generic path. It uses the
> same MCFG table, but it's parsed in arch/x86/pci/mmconfig-shared.c,
> and the code there checks to ensure the ECAM regions are reserved
> somehow by firmware, e.g., via the e820 table.
As they are on my workstation here, for example:
[ 0.552607] PCI: MMCONFIG at [mem 0xf8000000-0xfbffffff] reserved in E820
vs the "ACPI motherboard resources" reservation thing where it traverses
some PNP devices.
> There's a bunch of grungy device-dependent code there, too, possibly
> to work around firmware defects, or (just as likely) to compensate for
> Linux defects that were *attributed* to firmware.
Nah, latter we simply fix. :-)
> I think you should regard correct MCFG/ECAM usage in the kdump kernel
> as a requirement. If you don't have ECAM (a) PCI devices won't work
> at all on non-x86 systems that use only ECAM for config access, (b)
> you won't be able to access devices on non-0 segments (granted, there
> aren't very many of these yet, but there will be more in the future),
Ah. don't worry, someone will pop up from the woodwork with the need for
this ;-\
> and (c) you won't be able to access extended config space (addresses
> 0x100-0xfff), which means none of the Extended Capabilities will be
> available (AER, ACS, ATS, etc).
Yap, and this answers my question:
e820__mapped_all() is being called with E820_TYPE_RESERVED down the path
in pci_mmcfg_check_reserved(). Which basically says that we need to
provide all reserved regions in the second kernel so that MMCONFIG works
there.
Thanks a lot Bjorn!
--
Regards/Gruss,
Boris.
Good mailing practices for 400: avoid top-posting and trim the reply.
_______________________________________________
kexec mailing list
kexec@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/kexec
next prev parent reply other threads:[~2018-11-21 18:43 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-11-14 7:29 [PATCH 0/2 v6] add reserved e820 ranges to the kdump kernel e820 table Lianbo Jiang
2018-11-14 7:29 ` [PATCH 1/2 v6] x86/kexec_file: add e820 entry in case e820 type string matches to io resource name Lianbo Jiang
2018-11-14 11:26 ` Borislav Petkov
2018-11-15 5:44 ` lijiang
2018-11-15 5:58 ` Dave Young
2018-11-16 1:34 ` lijiang
2018-11-15 10:39 ` Borislav Petkov
2018-11-16 3:25 ` lijiang
2018-11-18 11:52 ` Borislav Petkov
2018-11-20 4:07 ` lijiang
2018-11-21 10:54 ` lijiang
2018-11-21 13:06 ` Boris Petkov
2018-11-19 9:55 ` Dave Young
2018-11-19 10:28 ` Borislav Petkov
2018-11-20 3:37 ` lijiang
2018-11-20 19:29 ` Borislav Petkov
2018-11-20 20:43 ` Bjorn Helgaas
2018-11-21 18:42 ` Borislav Petkov [this message]
2018-11-14 7:29 ` [PATCH 2/2 v6] x86/kexec_file: add reserved e820 ranges to kdump kernel e820 table Lianbo Jiang
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=20181121184232.GB27559@zn.tnic \
--to=bp@alien8.de \
--cc=akpm@linux-foundation.org \
--cc=bhe@redhat.com \
--cc=bjorn@helgaas.com \
--cc=dyoung@redhat.com \
--cc=helgaas@kernel.org \
--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 \
/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
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox