[PATCH v2 0/1] x86/PCI: Disable exclusion of E820 reserved addressed in some cases

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxx>
- 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@xxxxxxxxx>
- 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




[Index of Archives]     [DMA Engine]     [Linux Coverity]     [Linux USB]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Greybus]

  Powered by Linux