Commit 7180c1d08639 ("PCI: Distribute available resources for root buses, too") breaks BAR assignment on some devcies: [ 10.021193] pci 0006:03:00.0: BAR 0 [mem 0x6300c0000000-0x6300c1ffffff 64bit pref]: assigned [ 10.029880] pci 0006:03:00.1: BAR 0 [mem 0x6300c2000000-0x6300c3ffffff 64bit pref]: assigned [ 10.038561] pci 0006:03:00.2: BAR 0 [mem size 0x00800000 64bit pref]: can't assign; no space [ 10.047191] pci 0006:03:00.2: BAR 0 [mem size 0x00800000 64bit pref]: failed to assign [ 10.055285] pci 0006:03:00.0: VF BAR 0 [mem size 0x02000000 64bit pref]: can't assign; no space [ 10.064180] pci 0006:03:00.0: VF BAR 0 [mem size 0x02000000 64bit pref]: failed to assign [ 10.072543] pci 0006:03:00.1: VF BAR 0 [mem size 0x02000000 64bit pref]: can't assign; no space [ 10.081437] pci 0006:03:00.1: VF BAR 0 [mem size 0x02000000 64bit pref]: failed to assign
Created attachment 307294 [details] dmesg
Created attachment 307295 [details] dmesg, commit reverted
Created attachment 307296 [details] lspci
Created attachment 307297 [details] lspci, commit reverted
Created attachment 307298 [details] iomem
Created attachment 307299 [details] iomem, commit reverted
Mika, Could you take a look please? Looks like this is your patch.
There is already a patch from Kai-Heng: https://lore.kernel.org/linux-pci/20241128084039.54972-1-kaihengf@nvidia.com/