[PATCH 0/2] PCI: BAR resize rollback fixes

Ilpo Järvinen posted 2 patches 2 weeks, 3 days ago
drivers/pci/rebar.c     | 18 +-----------------
drivers/pci/setup-bus.c | 23 +++++++++++++++++++----
2 files changed, 20 insertions(+), 21 deletions(-)
[PATCH 0/2] PCI: BAR resize rollback fixes
Posted by Ilpo Järvinen 2 weeks, 3 days ago
Hi all,

This series fixes two issue in BAR resize rollback found by
Ville Syrjälä <ville.syrjala@linux.intel.com>.

Ilpo Järvinen (2):
  PCI: Fix BAR resize rollback path overwriting ret
  PCI: Fix Resizable BAR restore order

 drivers/pci/rebar.c     | 18 +-----------------
 drivers/pci/setup-bus.c | 23 +++++++++++++++++++----
 2 files changed, 20 insertions(+), 21 deletions(-)


base-commit: 8f0b4cce4481fb22653697cced8d0d04027cb1e8
-- 
2.39.5

Re: [PATCH 0/2] PCI: BAR resize rollback fixes
Posted by Bjorn Helgaas 2 weeks, 2 days ago
On Wed, Jan 21, 2026 at 03:14:15PM +0200, Ilpo Järvinen wrote:
> Hi all,
> 
> This series fixes two issue in BAR resize rollback found by
> Ville Syrjälä <ville.syrjala@linux.intel.com>.
> 
> Ilpo Järvinen (2):
>   PCI: Fix BAR resize rollback path overwriting ret
>   PCI: Fix Resizable BAR restore order
> 
>  drivers/pci/rebar.c     | 18 +-----------------
>  drivers/pci/setup-bus.c | 23 +++++++++++++++++++----
>  2 files changed, 20 insertions(+), 21 deletions(-)

Applied to pci/for-linus for v6.19, thanks, Ilpo.
Re: [PATCH 0/2] PCI: BAR resize rollback fixes
Posted by Ville Syrjälä 2 weeks, 2 days ago
On Wed, Jan 21, 2026 at 03:14:15PM +0200, Ilpo Järvinen wrote:
> Hi all,
> 
> This series fixes two issue in BAR resize rollback found by
> Ville Syrjälä <ville.syrjala@linux.intel.com>.
> 
> Ilpo Järvinen (2):
>   PCI: Fix BAR resize rollback path overwriting ret
>   PCI: Fix Resizable BAR restore order

Thanks.

Looks to be working fine now:
 i915 0000:03:00.0: BAR 2 [mem 0x4030000000-0x403fffffff 64bit pref]: releasing
 pcieport 0000:02:01.0: bridge window [mem 0x4030000000-0x403fffffff 64bit pref]: releasing
 pcieport 0000:01:00.0: bridge window [mem 0x4030000000-0x403fffffff 64bit pref]: releasing
 pcieport 0000:00:01.0: bridge window [mem 0x4030000000-0x40407fffff 64bit pref]: was not released (still contains assigned resources)
 pcieport 0000:00:01.0: Assigned bridge window [mem 0x4030000000-0x40407fffff 64bit pref] to [bus 01-04] cannot fit 0x200000000 required for 0000:02:01.0 bridging to [bus 03]
 pcieport 0000:02:01.0: bridge window [mem size 0x200000000 64bit pref] to [bus 03] requires relaxed alignment rules
 pcieport 0000:00:01.0: Assigned bridge window [mem 0x4030000000-0x40407fffff 64bit pref] to [bus 01-04] cannot fit 0x200000000 required for 0000:01:00.0 bridging to [bus 02-04]
 pcieport 0000:01:00.0: bridge window [mem size 0x200000000 64bit pref] to [bus 02-04] requires relaxed alignment rules
 pcieport 0000:01:00.0: bridge window [mem size 0x200000000 64bit pref]: can't assign; no space
 pcieport 0000:01:00.0: bridge window [mem size 0x200000000 64bit pref]: failed to assign
 pcieport 0000:01:00.0: bridge window [mem size 0x200000000 64bit pref]: can't assign; no space
 pcieport 0000:01:00.0: bridge window [mem size 0x200000000 64bit pref]: failed to assign
 pcieport 0000:02:01.0: bridge window [mem size 0x200000000 64bit pref]: can't assign; no space
 pcieport 0000:02:01.0: bridge window [mem size 0x200000000 64bit pref]: failed to assign
 pcieport 0000:02:01.0: bridge window [mem size 0x200000000 64bit pref]: can't assign; no space
 pcieport 0000:02:01.0: bridge window [mem size 0x200000000 64bit pref]: failed to assign
 i915 0000:03:00.0: BAR 2 [mem size 0x200000000 64bit pref]: can't assign; no space
 i915 0000:03:00.0: BAR 2 [mem size 0x200000000 64bit pref]: failed to assign
 i915 0000:03:00.0: BAR 2 [mem size 0x200000000 64bit pref]: can't assign; no space
 i915 0000:03:00.0: BAR 2 [mem size 0x200000000 64bit pref]: failed to assign
 pcieport 0000:00:01.0: PCI bridge to [bus 01-04]
 pcieport 0000:00:01.0:   bridge window [mem 0x57000000-0x583fffff]
 pcieport 0000:00:01.0:   bridge window [mem 0x4030000000-0x40407fffff 64bit pref]
 pcieport 0000:01:00.0: PCI bridge to [bus 02-04]
 pcieport 0000:01:00.0:   bridge window [mem 0x57000000-0x583fffff]
 pcieport 0000:01:00.0:   bridge window [mem 0x4030000000-0x403fffffff 64bit pref]
 pcieport 0000:02:01.0: PCI bridge to [bus 03]
 pcieport 0000:02:01.0:   bridge window [mem 0x57000000-0x581fffff]
 pcieport 0000:02:01.0:   bridge window [mem 0x4030000000-0x403fffffff 64bit pref]
 i915 0000:03:00.0: BAR 2 [mem 0x4030000000-0x403fffffff 64bit pref]: old value restored
 i915 0000:03:00.0: [drm] Failed to resize BAR2 to 8192M (-28)
 i915 0000:03:00.0: [drm] Using a reduced BAR size of 256MiB. Consider enabling 'Resizable BAR' or similar, if available in the BIOS.

For the series:
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Tested-by: Ville Syrjälä <ville.syrjala@linux.intel.com>

> 
>  drivers/pci/rebar.c     | 18 +-----------------
>  drivers/pci/setup-bus.c | 23 +++++++++++++++++++----
>  2 files changed, 20 insertions(+), 21 deletions(-)
> 
> 
> base-commit: 8f0b4cce4481fb22653697cced8d0d04027cb1e8
> -- 
> 2.39.5

-- 
Ville Syrjälä
Intel