[SOLVED] Passing B580 to LXC

mtcrow

New Member
Oct 19, 2025
3
1
3
I'm trying to get an Intel B580 passed through to an LXC where I run Docker and several containers, and after bumping into several walls, figured that it's better to ask for help:

I've checked that the BIOS is as up-to-date as possible and switched on SR-IOV and Resizable BAR. I've opted in for 6.17 kernel and fully updated.

Hostnamectl:
Code:
Operating System: Debian GNU/Linux 13 (trixie)       
          Kernel: Linux 6.17.1-1-pve
    Architecture: x86-64
 Hardware Vendor: ASRockRack
  Hardware Model: X470D4U
 Hardware Serial: To Be Filled By O.E.M.
Firmware Version: L4.29A
   Firmware Date: Mon 2024-03-11
    Firmware Age: 1y 7month 1w 3d
lspci -k -d ::03xx
Code:
22:00.0 VGA compatible controller: ASPEED Technology, Inc. ASPEED Graphics Family (rev 41)
        Subsystem: ASRock Incorporation Device 2000
        Kernel driver in use: ast
        Kernel modules: ast
2d:00.0 VGA compatible controller: Intel Corporation Battlemage G21 [Arc B580]
        Subsystem: Device 207e:a003
        Kernel modules: xe
dmesg | grep 0000:2d
Code:
[    0.914461] pci 0000:2d:00.0: [8086:e20b] type 00 class 0x030000 PCIe Endpoint
[    0.914523] pci 0000:2d:00.0: BAR 0 [mem 0x00000000-0x00ffffff 64bit]
[    0.914528] pci 0000:2d:00.0: BAR 2 [mem 0x00000000-0x3ffffffff 64bit pref]
[    0.914535] pci 0000:2d:00.0: ROM [mem 0x00000000-0x001fffff pref]
[    0.914664] pci 0000:2d:00.0: PME# supported from D0 D3hot
[    0.925540] pci 0000:2d:00.0: vgaarb: bridge control possible
[    0.925540] pci 0000:2d:00.0: vgaarb: VGA device added: decodes=io+mem,owns=none,locks=none
[    0.928568] pnp 00:00: disabling [mem 0xf0000000-0xf7ffffff] because it overlaps 0000:2d:00.0 BAR 2 [mem 0x00000000-0x3ffffffff 64bit pref]
[    0.928690] pnp 00:01: disabling [mem 0xfd200000-0xfd2fffff] because it overlaps 0000:2d:00.0 BAR 2 [mem 0x00000000-0x3ffffffff 64bit pref]
[    0.930125] pnp 00:06: disabling [mem 0xfec00000-0xfec00fff] because it overlaps 0000:2d:00.0 BAR 2 [mem 0x00000000-0x3ffffffff 64bit pref]
[    0.930128] pnp 00:06: disabling [mem 0xfec01000-0xfec01fff] because it overlaps 0000:2d:00.0 BAR 2 [mem 0x00000000-0x3ffffffff 64bit pref]
[    0.930130] pnp 00:06: disabling [mem 0xfedc0000-0xfedc0fff] because it overlaps 0000:2d:00.0 BAR 2 [mem 0x00000000-0x3ffffffff 64bit pref]
[    0.930132] pnp 00:06: disabling [mem 0xfee00000-0xfee00fff] because it overlaps 0000:2d:00.0 BAR 2 [mem 0x00000000-0x3ffffffff 64bit pref]
[    0.930135] pnp 00:06: disabling [mem 0xfed80000-0xfed8ffff] because it overlaps 0000:2d:00.0 BAR 2 [mem 0x00000000-0x3ffffffff 64bit pref]
[    0.930137] pnp 00:06: disabling [mem 0xfec10000-0xfec10fff] because it overlaps 0000:2d:00.0 BAR 2 [mem 0x00000000-0x3ffffffff 64bit pref]
[    0.930139] pnp 00:06: disabling [mem 0xff000000-0xffffffff] because it overlaps 0000:2d:00.0 BAR 2 [mem 0x00000000-0x3ffffffff 64bit pref]
[    0.952479] pci 0000:2d:00.0: BAR 2 [mem size 0x400000000 64bit pref]: can't assign; no space
[    0.952481] pci 0000:2d:00.0: BAR 2 [mem size 0x400000000 64bit pref]: failed to assign
[    0.952483] pci 0000:2d:00.0: BAR 0 [mem size 0x01000000 64bit]: can't assign; no space
[    0.952484] pci 0000:2d:00.0: BAR 0 [mem size 0x01000000 64bit]: failed to assign
[    0.952486] pci 0000:2d:00.0: ROM [mem size 0x00200000 pref]: can't assign; no space
[    0.952488] pci 0000:2d:00.0: ROM [mem size 0x00200000 pref]: failed to assign
[    0.952490] pci 0000:2d:00.0: BAR 2 [mem size 0x400000000 64bit pref]: can't assign; no space
[    0.952492] pci 0000:2d:00.0: BAR 2 [mem size 0x400000000 64bit pref]: failed to assign
[    0.952494] pci 0000:2d:00.0: BAR 0 [mem size 0x01000000 64bit]: can't assign; no space
[    0.952496] pci 0000:2d:00.0: BAR 0 [mem size 0x01000000 64bit]: failed to assign
[    0.952498] pci 0000:2d:00.0: ROM [mem size 0x00200000 pref]: can't assign; no space
[    0.952499] pci 0000:2d:00.0: ROM [mem size 0x00200000 pref]: failed to assign
[    0.954772] pci 0000:2d:00.0: Adding to iommu group 17
[    8.976093] xe 0000:2d:00.0: [drm] *ERROR* failed to map registers
[    8.976097] xe 0000:2d:00.0: probe with driver xe failed with error -5

My questions:
- Why is the B580 not using the Xe driver available in the kernel, even with force-probe?
- I'd use the vfio, but does it support passthrough to LXCs? I believe that it'd only provide passthrough to VMs -- doable, but not preferred
- Am I missing an install? I bumped into https://launchpad.net/~kobuk-team/+archive/ubuntu/intel-graphics and starting to set it up before I found apt-key has passed deprecated and is no longer included in Trixie.
 
I'm partially through this -- the first issue was that I needed to add pci=reallocto the grub configuration, which has handled the issue of overlapping bridge windows:
Code:
Oct 25 22:53:33 proxmox kernel: pci 0000:2d:00.0: BAR 0 [mem 0xc0000000-0xc0ffffff 64bit]: assigned
Oct 25 22:53:33 proxmox kernel: pci 0000:2d:00.0: ROM [mem 0xc1000000-0xc11fffff pref]: assigned

From here, I think it should be an easier time resolving the problem with the Xe driver. There is no i915 support for the B580, so that's just in the way.
Code:
[    9.100017] xe 0000:2d:00.0: enabling device (0000 -> 0002)
[    9.100599] xe 0000:2d:00.0: [drm] Found battlemage (device ID e20b) discrete display version 14.01 stepping B0
[    9.101879] xe 0000:2d:00.0: [drm] VISIBLE VRAM: 0x0000002400000000, 0x0000000400000000
[    9.101909] xe 0000:2d:00.0: [drm] VRAM[0, 0]: Actual physical size 0x0000000300000000, usable size exclude stolen 0x00000002fb800000, CPU accessible size 0x00000002fb800000
[    9.101912] xe 0000:2d:00.0: [drm] VRAM[0, 0]: DPA range: [0x0000000000000000-300000000], io range: [0x0000002400000000-26fb800000]
[    9.101914] xe 0000:2d:00.0: [drm] Total VRAM: 0x0000002400000000, 0x0000000300000000
[    9.101916] xe 0000:2d:00.0: [drm] Available VRAM: 0x0000002400000000, 0x00000002fb800000
[    9.177226] xe 0000:2d:00.0: vgaarb: VGA decodes changed: olddecodes=io+mem,decodes=none:owns=none
[    9.180807] xe 0000:2d:00.0: Direct firmware load for i915/bmg_dmc.bin failed with error -2
[    9.180812] xe 0000:2d:00.0: [drm] Failed to load DMC firmware i915/bmg_dmc.bin (-ENOENT). Disabling runtime power management.
[    9.180814] xe 0000:2d:00.0: [drm] DMC firmware homepage: https://git.kernel.org/pub/scm/linux/kernel/git/firmware/linux-firmware.git
[    9.181647] xe 0000:2d:00.0: Direct firmware load for xe/bmg_guc_70.bin failed with error -2
[    9.181649] xe 0000:2d:00.0: [drm] GT0: GuC firmware xe/bmg_guc_70.bin: fetch failed with error -ENOENT
[    9.181651] xe 0000:2d:00.0: [drm] GT0: GuC firmware(s) can be downloaded from https://git.kernel.org/pub/scm/linux/kernel/git/firmware/linux-firmware.git
[    9.181654] xe 0000:2d:00.0: [drm] *ERROR* GT0: Failed to initialize uC (-ENOENT)
[    9.181666] xe 0000:2d:00.0: probe with driver xe failed with error -2

Since the xe driver wasn't pulled in, there is no chance yet for the device to use the driver.
Code:
2d:00.0 VGA compatible controller: Intel Corporation Battlemage G21 [Arc B580]
        Subsystem: Device 207e:a003
        Kernel modules: xe

Maybe this has to do with xe.force_probe? This appears early in the log, so I wonder if xe could be picked up without being forced -- that solution was to prevent i915 drivers from being loaded, but they're not supported by the B580 and therefore I might not have to force anything.
Code:
Setting dangerous option force_probe - tainting kernel
 
Reinstalling firmware-intel-graphics was enough to get the GPU to use Xe drivers, though there seem to be a few issues still:

Code:
Oct 26 18:51:45 proxmox kernel: xe 0000:2d:00.0: [drm] *ERROR* PCODE Mailbox failed: 1 Illegal Command
Oct 26 18:51:45 proxmox kernel: xe 0000:2d:00.0: [drm] Failed to read power limits, check GPU firmware !

Those might be solved by adding the intel-graphics repository from Intel's documentation being Ubuntu-focused and relying on several deprecated commands: https://dgpu-docs.intel.com/driver/client/overview.html

add-apt-repository is not available, so the listed PPA (https://launchpad.net/~kobuk-team/+archive/ubuntu/intel-graphics) has to be manually added.
apt-key was deprecated and is now fully removed, so adding a key would have to be done manually. Might be operator error, but I wasn't able to pull the Intel GPG key in the right format and sign the repository correctly for apt be happy.

Anyways, just the Xe drivers were good enough for the GPU to show up under /dev/dri and it should be sufficient for passthrough: https://psmarcin.dev/posts/how-to-configure-gpu-passthrough-for-linux-containers-on-proxmox/
 
  • Like
Reactions: jaminmc