[SOLVED] how to get Resizable bar/rebar working

The problem is, I have an server Mainboard and there is no option for resizable bar, just for 4g decoding and csm is already disabled :/
Same problem with ASRock EP2C621D12 WS and Intel A770, enabled "Above 4G Decoding", but the ReBAR option is absent. Tested with 4096MB.

First of all, GRUB_CMDLINE_LINUX_DEFAULT="quiet splash pci=realloc" in /etc/default/grub is NOT working.

Then:
echo '0000:19:00.0' > '/sys/bus/pci/devices/0000:19:00.0/driver/unbind'
echo '12' > '/sys/bus/pci/devices/0000:19:00.0/resource2_resize'
is NOT working either.

And finally:
Code:
options i915 enable_guc=3
options i915 modeset=1
options i915 lmem_bar_size=4096
in /etc/modprobe.d/i915.conf, verified with systool -v -m i915 | grep -E "enable_guc|modeset|lmem_bar_size"
is NOT working.
 
I finally got around to resizing the BAR for my Intel A310. The xe driver (inside the VM) really does not like it if you shut down the VM, unbind vfio-pci, increase the BAR size and restart the VM. However setting /sys/bus/pci/devices/${GPU}/resource2_resize to 12 works fine in a hookscript before starting the VM for the first time (after a host reboot and without any driver bound):
Code:
01:00.0 VGA compatible controller [0300]: Intel Corporation DG2 [Arc A310] [8086:56a6] (rev 05) (prog-if 00 [VGA controller])
    Region 0: Memory at 80000000 (64-bit, non-prefetchable) [size=16M]
    Region 2: Memory at 380000000000 (64-bit, prefetchable) [size=4G]
    Capabilities: [420 v1] Physical Resizable BAR
        BAR 2: current size: 4GB, supported: 4GB
    Kernel driver in use: xe
    Kernel modules: i915, xe

EDIT: Hmm, the driver inside the VM ran into an issue (similar as to when I tried to resize the BAR in between VM runs) but I updated from 6.17 to 7.0 inside the VM.
 
Last edited:
  • Like
Reactions: uzumo