[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20220228105259.230903-1-hdegoede@redhat.com>
Date: Mon, 28 Feb 2022 11:52:58 +0100
From: Hans de Goede <hdegoede@...hat.com>
To: "Rafael J . Wysocki" <rjw@...ysocki.net>,
Bjorn Helgaas <bhelgaas@...gle.com>,
Ingo Molnar <mingo@...hat.com>, Borislav Petkov <bp@...en8.de>,
"H . Peter Anvin" <hpa@...or.com>
Cc: Hans de Goede <hdegoede@...hat.com>,
Mika Westerberg <mika.westerberg@...ux.intel.com>,
Krzysztof Wilczyński <kw@...ux.com>,
Myron Stowe <myron.stowe@...hat.com>,
Juha-Pekka Heikkila <juhapekka.heikkila@...il.com>,
Benoit Grégoire <benoitg@...us.ca>,
Hui Wang <hui.wang@...onical.com>, linux-acpi@...r.kernel.org,
linux-pci@...r.kernel.org, x86@...nel.org,
linux-kernel@...r.kernel.org
Subject: [PATCH v2 0/1] x86/PCI: Disable exclusion of E820 reserved addressed in some cases
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@...el.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@...el.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
Powered by blists - more mailing lists