[PATCH] PCI: hide mysterious 8MB 64-bit pref BAR on Intel Arc PCIe Switch

Simon Richter Simon.Richter at hogyros.de
Tue Jul 22 03:51:29 UTC 2025


Hi,

On 7/22/25 02:30, Icenowy Zheng wrote:

> When the PCI bus isn't configured by any firmware (e.g. a PCIe
> controller solely initialized by Linux kernel), the PCI space allocation
> algorithm of Linux will allocate the main VRAM BAR of Arc dGPU device at
> base+0, and then the 8MB BAR at base+256M, which prevents the main VRAM
> BAR gets resized. As the functionality and performance of Arc dGPU will
> get severely restricted with small BAR, this makes a problem.

Interestingly, the 8 MB BAR is assigned first and still ends up behind 
the 256 MB aperture:

pci 0033:01:00.0: BAR 0 [mem 0x6220020000000-0x62200207fffff 64bit 
pref]: assigned
pci 0033:03:00.0: BAR 2 [mem 0x6220000000000-0x622000fffffff 64bit 
pref]: assigned

and the bridge window is not much larger either:

pci 0033:02:01.0:   bridge window [mem 0x6220000000000-0x622001fffffff 
64bit pref]

but this does get cleaned up later:

xe 0033:03:00.0: [drm] Attempting to resize bar from 256MiB -> 16384MiB
xe 0033:03:00.0: BAR 2 [mem 0x6220000000000-0x622000fffffff 64bit pref]: 
releasing
pci 0033:02:01.0: bridge window [mem 0x6220000000000-0x622001fffffff 
64bit pref]: releasing
pci 0033:01:00.0: bridge window [mem 0x6220000000000-0x6223fbff0ffff 
64bit pref]: releasing
pci 0033:01:00.0: bridge window [mem 0x6220400000000-0x62207ffffffff 
64bit pref]: assigned
pci 0033:02:01.0: bridge window [mem 0x6220400000000-0x62207ffffffff 
64bit pref]: assigned
xe 0033:03:00.0: BAR 2 [mem 0x6220400000000-0x62207ffffffff 64bit pref]: 
assigned

I assume it works for me because the root bridge has a lot of room to 
expand, so nothing else needs to be moved.

I think disabled devices can still be moved, so on such devices, it may 
help to load the xe driver first -- but I agree that this is only a 
workaround, not a proper fix (but so would be hiding the bridge's BAR -- 
then another device can take that spot, and the only reason this doesn't 
happen is that the card happens to be in the topmost slot). A proper 
fix, however, would be a mechanism to ask other drivers to temporarily 
shut down so their BARs can be moved.

    Simon




More information about the Intel-xe mailing list