Re: [PATCH v2 00/11] PCI: BAR resizing fix/rework

Bjorn Helgaas
2025-11-14T18:27:43Z

On Fri, Nov 14, 2025 at 09:30:56AM +0000, Alex Bennée wrote:
> Ilpo Järvinen <ilpo.jarvinen@linux.intel.com> writes:
>
> > Hi all,
> >
> > Thanks to issue reports from Simon Richter and Alex Bennée, I
> > discovered BAR resize rollback can corrupt the resource tree. As fixing
> > corruption requires avoiding overlapping resource assignments, the
> > correct fix can unfortunately results in worse user experience, what
> > appeared to be "working" previously might no longer do so. Thus, I had
> > to do a larger rework to pci_resize_resource() in order to properly
> > restore resource states as it was prior to BAR resize.
> >
> > This rework has been on my TODO list anyway but it wasn't the highest
> > prio item until pci_resize_resource() started to cause regressions due
> > to other resource assignment algorithm changes.
>
> Thanks I'll have a look.
>
> Where does this apply? At least v6.17 doesn't seem to have
> pbus_reassign_bridge_resources which 4/11 is trying to tweak.

This is based on v6.18-rc1 and is applied here:

https://git.kernel.org/pub/scm/linux/kernel/git/pci/pci.git/log/?h=resource

I expect some conflicts with d30203739be7 ("drm/xe: Move rebar to be
done earlier"), which appeared in v6.18-rc2, and possibly with other
DRM changes planned for v6.19.

Bjorn