public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/1] x86/PCI: Disable exclusion of E820 reserved addresses in some cases
@ 2022-02-16 15:01 Hans de Goede
  2022-02-16 15:01 ` [PATCH 1/1] " Hans de Goede
  0 siblings, 1 reply; 4+ messages in thread
From: Hans de Goede @ 2022-02-16 15:01 UTC (permalink / raw)
  To: Rafael J . Wysocki, Mika Westerberg, Krzysztof Wilczyński,
	Bjorn Helgaas, Myron Stowe, Juha-Pekka Heikkila, Thomas Gleixner,
	Ingo Molnar, Borislav Petkov, H . Peter Anvin
  Cc: Hans de Goede, Benoit Grégoire, Hui Wang, linux-acpi,
	linux-pci, x86, linux-kernel

Hi all,

Here is a new patch to try and address the exclusion of E820 reserved
addresses from PCI bridge windows causing issues on some systems.

Since the previous attempt at fixing this (commit 7f7b4236f204 ("x86/PCI:
Ignore E820 reservations for bridge windows on newer systems")) we have
learned that excluding E820 reserved addresses from PCI bridge windows
helps to workaround issues where the ACPI _CRS advertised window for
the bridge overlaps with some mem addresses which we should not touch,
so just disabling it on most new systems turns out to not be a good idea.

This new patch instead takes a very narrow approach. On all the systems
where we end up having issues to allocate PCI BARs this is caused by there
being a MMIO EFI memmap entry which covers the entire ACPI _CRS advertised
window for the PCI bridge.  This new patch makes use of this by making
pci_acpi_root_prepare_resources() check for those specific set of
conditions and when these exact conditions are met, then disable the
exclusion of E820 reserved addresses from PCI bridge windows, to fix
the PCI BAR allocation failures.

This has been successfully tested on one of the laptops where we were
seeing PCI BAR allocation failures, see:
https://bugzilla.redhat.com/show_bug.cgi?id=1868899

I've also tested this on a X1C8 and the new "host bridge window %pR is
marked by EFI as MMIO" message does not show up there as expected.

Regards,

Hans


Hans de Goede (1):
  x86/PCI: Disable exclusion of E820 reserved addressed in some cases

 arch/x86/include/asm/pci_x86.h |  8 +++++
 arch/x86/kernel/resource.c     |  4 +++
 arch/x86/pci/acpi.c            | 65 +++++++++++++++++++++++++++++++++-
 3 files changed, 76 insertions(+), 1 deletion(-)

-- 
2.33.1


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2022-02-17  8:48 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-02-16 15:01 [PATCH 0/1] x86/PCI: Disable exclusion of E820 reserved addresses in some cases Hans de Goede
2022-02-16 15:01 ` [PATCH 1/1] " Hans de Goede
2022-02-16 15:47   ` Rafael J. Wysocki
2022-02-17  8:47   ` Mika Westerberg

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox