lkml.org 
[lkml]   [2022]   [Feb]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Subject[PATCH v2 0/1] x86/PCI: Disable exclusion of E820 reserved addressed in some cases
Date
Hi All,

Here is v2 of my patch to address the exclusion of E820 reserved
addresses from PCI bridge windows causing issues on some systems.

This fixes a couple of issues found by the kernel test robot:

- Add a couple of missing includes to arch/x86/include/asm/pci_x86.h
to fix i386 build errors Reported-by: kernel test robot <lkp@intel.com>
- Do not call resource_is_efi_mmio_region() on resource-list entries which
have just been destroyed because they match resource_is_pcicfg_ioport()
Reported-by: kernel test robot <oliver.sang@intel.com>
- Add (res->flags & IORESOURCE_MEM) check to resource_is_efi_mmio_region()

Sorry about not catching these during my own testing.

For reference here is the v1 cover-letter:

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 | 10 +++++
arch/x86/kernel/resource.c | 4 ++
arch/x86/pci/acpi.c | 68 +++++++++++++++++++++++++++++++++-
3 files changed, 81 insertions(+), 1 deletion(-)

--
2.35.1

\
 
 \ /
  Last update: 2022-02-28 11:56    [W:0.074 / U:0.460 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site