Proxmox 9.0 + Intel B50 SR-IOV -- finally its almost here! Early Adopter's Guide

Just want to add a data point that I followed your path of patching in from 6979 today and it worked as expected and I still have 12 VFs while the rest of the card updated to 8517

Wanted to share some info on my Gunnir Intel Arc Pro B50 offering 4VFs out of the box.

03:00.0 VGA compatible controller [0300]: Intel Corporation Battlemage G21 [Intel Graphics] [8086:e212]
        Subsystem: Shenzhen Gunnir Technology Development Co., Ltd Device [1ef7:2522]
        Kernel driver in use: xe
        Kernel modules: xe
root@PVE11:/opt# lspci -nnk -s 04:00.0 
04:00.0 Audio device [0403]: Intel Corporation Device [8086:e2f7]
        Subsystem: Shenzhen Gunnir Technology Development Co., Ltd Device [1ef7:2522]
        Kernel driver in use: snd_hda_intel
        Kernel modules: snd_hda_intel

Detailed info

03:00.0 VGA compatible controller: Intel Corporation Battlemage G21 [Intel Graphics] (prog-if 00 [VGA controller])
        Subsystem: Shenzhen Gunnir Technology Development Co., Ltd Device 2522
        Control: I/O- Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx-
        Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx-
        Latency: 0, Cache Line Size: 64 bytes
        Interrupt: pin ? routed to IRQ 288
        IOMMU group: 96
        Region 0: Memory at 38004000000 (64-bit, prefetchable) [size=16M]
        Region 2: Memory at 37800000000 (64-bit, prefetchable) [size=16G]
        Expansion ROM at f6000000 [disabled] [size=2M]
        Capabilities: [40] Vendor Specific Information: Len=0c <?>
        Capabilities: [70] Express (v2) Endpoint, IntMsgNum 0
                DevCap: MaxPayload 256 bytes, PhantFunc 0, Latency L0s unlimited, L1 unlimited
                        ExtTag+ AttnBtn- AttnInd- PwrInd- RBE+ FLReset+ SlotPowerLimit 0W TEE-IO-
                DevCtl: CorrErr- NonFatalErr- FatalErr+ UnsupReq-
                        RlxdOrd+ ExtTag+ PhantFunc- AuxPwr- NoSnoop+ FLReset-
                        MaxPayload 256 bytes, MaxReadReq 512 bytes
                DevSta: CorrErr- NonFatalErr- FatalErr- UnsupReq- AuxPwr- TransPend-
                LnkCap: Port #0, Speed 2.5GT/s, Width x1, ASPM L0s L1, Exit Latency L0s <64ns, L1 <1us
                        ClockPM- Surprise- LLActRep- BwNot- ASPMOptComp+
                LnkCtl: ASPM L1 Enabled; RCB 64 bytes, LnkDisable- CommClk-
                        ExtSynch- ClockPM- AutWidDis- BWInt- AutBWInt-
                LnkSta: Speed 2.5GT/s, Width x1
                        TrErr- Train- SlotClk- DLActive- BWMgmt- ABWMgmt-
                DevCap2: Completion Timeout: Range B, TimeoutDis+ NROPrPrP- LTR+
                         10BitTagComp+ 10BitTagReq+ OBFF Not Supported, ExtFmt+ EETLPPrefix-
                         EmergencyPowerReduction Not Supported, EmergencyPowerReductionInit-
                         FRS- TPHComp- ExtTPHComp-
                         AtomicOpsCap: 32bit- 64bit- 128bitCAS-
                DevCtl2: Completion Timeout: 50us to 50ms, TimeoutDis-
                         AtomicOpsCtl: ReqEn-
                         IDOReq- IDOCompl- LTR- EmergencyPowerReductionReq-
                         10BitTagReq+ OBFF Disabled, EETLPPrefixBlk-
                LnkCap2: Supported Link Speeds: 2.5GT/s, Crosslink- Retimer- 2Retimers- DRS-
                LnkCtl2: Target Link Speed: 2.5GT/s, EnterCompliance- SpeedDis-
                         Transmit Margin: Normal Operating Range, EnterModifiedCompliance- ComplianceSOS-
                         Compliance Preset/De-emphasis: -6dB de-emphasis, 0dB preshoot
                LnkSta2: Current De-emphasis Level: -6dB, EqualizationComplete- EqualizationPhase1-
                         EqualizationPhase2- EqualizationPhase3- LinkEqualizationRequest-
                         Retimer- 2Retimers- CrosslinkRes: unsupported
        Capabilities: [ac] MSI: Enable+ Count=1/1 Maskable+ 64bit+
                Address: 00000000fee00000  Data: 0000
                Masking: 00000000  Pending: 00000000
        Capabilities: [d0] Power Management version 3
                Flags: PMEClk- DSI- D1- D2- AuxCurrent=0mA PME(D0+,D1-,D2-,D3hot+,D3cold-)
                Status: D3 NoSoftRst+ PME-Enable- DSel=0 DScale=0 PME-
        Capabilities: [100 v1] Alternative Routing-ID Interpretation (ARI)
                ARICap: MFVC- ACS-, Next Function: 0
                ARICtl: MFVC- ACS-, Function Group: 0
        Capabilities: [110 v1] Null
        Capabilities: [200 v1] Address Translation Service (ATS)
                ATSCap: Invalidate Queue Depth: 00
                ATSCtl: Enable+, Smallest Translation Unit: 00
        Capabilities: [420 v1] Physical Resizable BAR
                BAR 2: current size: 16GB, supported: 256MB 512MB 1GB 2GB 4GB 8GB 16GB
        Capabilities: [220 v1] Virtual Resizable BAR
                BAR 2: current size: 4GB, supported: 256MB 512MB 1GB 2GB 4GB 8GB 16GB
        Capabilities: [320 v1] Single Root I/O Virtualization (SR-IOV)
                IOVCap: Migration- 10BitTagReq+ IntMsgNum 0
                IOVCtl: Enable- Migration- Interrupt- MSE- ARIHierarchy+ 10BitTagReq-
                IOVSta: Migration-
                Initial VFs: 4, Total VFs: 4, Number of VFs: 0, Function Dependency Link: 00
                VF offset: 1, stride: 1, Device ID: e212
                Supported Page Size: 00000553, System Page Size: 00000001
                Region 0: Memory at 0000038000000000 (64-bit, prefetchable)
                Region 2: Memory at 0000037c00000000 (64-bit, prefetchable)
                VF Migration: offset: 00000000, BIR: 0
        Capabilities: [400 v1] Latency Tolerance Reporting
                Max snoop latency: 0ns
                Max no snoop latency: 0ns
        Kernel driver in use: xe
        Kernel modules: xe

Firmware info

**GPU:** Intel Arc Pro B50 (`8086:e212`)  
**Host OS:** Proxmox VE 7.0.14-30-pve (Linux `xe` driver)

**Onboard GPU Firmware (`fwupdmgr`):**
* **GSC / IFWI Firmware Code (`PART_FWCODE`):** `21.1182`
* **Firmware Data (`PART_FWDATA`):** `203.1`
* **Option ROM Code (`PART_OPROMCODE`):** `23.1066.0.0`
* **Option ROM Data (`PART_OPROMDATA`):** `23.1066.0.0`

**Loaded Driver Microcode (`dmesg`):**
* **GuC (`xe/bmg_guc_70.bin`):** `70.72.1` (GT0 & GT1)
* **HuC (`xe/bmg_huc.bin`):** `8.2.10` (GT1)
* **DMC (`i915/bmg_dmc.bin`):** `v2.6`

I got 4VFs working with windows 11 VMs using driver (8314) and the default autoprovisioned vram_quota of 4Gb per VF.

When I try to lower the vram_quota to have some VRAM left for the host and its LXCs, the VMs throw Code 43.

# <-- SPECIFIC DEBUGFS COMMAND ADJUSTING VF VRAM QUOTA:
echo 1073741824 > "$SRIOV_DBG/vfx/tile0/vram_quota"

Does anybody have any ideas about this behavior?
Perhaps my BAR spaces or something peculiar with windows drivers?

I did some further tinkering and it started working using lower and assymetric VF VRAM configurations.
Here’s the init script I used if anyone is interested:

#!/usr/bin/env bash
set -euo pipefail

# Ensure root privileges
if [[ $EUID -ne 0 ]]; then
  echo "ERROR: This script must be run as root." >&2
  exit 1
fi

PF_PCI="0000:03:00.0"
DEV="/sys/bus/pci/devices/$PF_PCI"
NUM_VFS=4
VFIO_DRV="vfio-pci"

if [[ ! -d "$DEV" ]]; then
  echo "ERROR: PCI device $PF_PCI not found at $DEV" >&2
  exit 1
fi

# Adjust quotas (in bytes) per VF as needed:
# 512 MiB = 536870912 | 1 GiB = 1073741824 | 2 GiB = 2147483648 | 4 GiB = 4294967296
declare -A VF_QUOTAS=(
  [vf1]=536870912    # 512 MiB
  [vf2]=536870912    # 512 MiB
  [vf3]=1073741824   # 1 GiB
  [vf4]=2147483648   # 2 GiB
)

# 1. Ensure debugfs is mounted and vfio-pci module is loaded
mountpoint -q /sys/kernel/debug || mount -t debugfs none /sys/kernel/debug
modprobe "$VFIO_DRV"
echo "Using VF passthrough driver: $VFIO_DRV"

# 2. Reset VFs cleanly first and disable driver autoprobe
echo "=== Resetting existing VFs and disabling autoprobe ==="
if [[ "$(cat "$DEV/sriov_numvfs")" -ne 0 ]]; then
  echo 0 > "$DEV/sriov_numvfs"
fi
echo 0 > "$DEV/sriov_drivers_autoprobe"

# 3. Enable VFs so debugfs vf1..vfN nodes exist
echo "=== Enabling $NUM_VFS VFs ==="
echo "$NUM_VFS" > "$DEV/sriov_numvfs"

# Resolve DRI debugfs path (supports both PCI BDF and numeric card index)
SRIOV_DBG="/sys/kernel/debug/dri/$PF_PCI/sriov"
for _ in $(seq 1 20); do
  if [[ ! -d "$SRIOV_DBG" ]]; then
    CARD_DIR=$(grep -rl "$PF_PCI" /sys/kernel/debug/dri/*/name 2>/dev/null | head -n1 | xargs -r dirname || true)
    [[ -n "$CARD_DIR" ]] && SRIOV_DBG="$CARD_DIR/sriov"
  fi
  [[ -d "$SRIOV_DBG/vf1/tile0" ]] && break
  sleep 0.1
done

# 4. Apply and verify per-VF VRAM quotas
echo "=== Applying per-VF VRAM quotas (tile0) ==="
for vf in $(printf '%s\n' "${!VF_QUOTAS[@]}" | sort -V); do
  quota_file="$SRIOV_DBG/$vf/tile0/vram_quota"
  if [[ -e "$quota_file" ]]; then
    echo "${VF_QUOTAS[$vf]}" > "$quota_file"
    actual="$(cat "$quota_file")"
    echo "  $vf: requested=${VF_QUOTAS[$vf]} -> actual=$actual"
  else
    echo "  WARNING: $quota_file not found (check 'ls $SRIOV_DBG' for VF naming)" >&2
  fi
done

# 5. Bind each generated VF PCI device to the passthrough driver
echo "=== Binding VFs to $VFIO_DRV ==="
shopt -s nullglob
for vf_link in "$DEV"/virtfn*; do
  vf_pci="$(basename "$(readlink -f "$vf_link")")"
  vf_sys="/sys/bus/pci/devices/$vf_pci"
  if [[ -d "$vf_sys" ]]; then
    # Unbind if currently attached to another driver
    if [[ -L "$vf_sys/driver" ]]; then
      echo "$vf_pci" > "$vf_sys/driver/unbind"
    fi
    echo "$VFIO_DRV" > "$vf_sys/driver_override"
    echo "$vf_pci" > "/sys/bus/pci/drivers/$VFIO_DRV/bind"
    echo "  Bound $vf_pci -> $VFIO_DRV"
  fi
done
shopt -u nullglob

and the detailed info after running it:

root@PVE11:/usr/local/bin# uname -r
7.0.14-30-pve
root@PVE11:/usr/local/bin# lspci -vv -s 03:00
03:00.0 VGA compatible controller: Intel Corporation Battlemage G21 [Intel Graphics] (prog-if 00 [VGA controller])
        Subsystem: Shenzhen Gunnir Technology Development Co., Ltd Device 2522
        Control: I/O- Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx-
        Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx-
        Latency: 0, Cache Line Size: 64 bytes
        Interrupt: pin ? routed to IRQ 290
        IOMMU group: 95
        Region 0: Memory at 38004000000 (64-bit, prefetchable) [size=16M]
        Region 2: Memory at 37800000000 (64-bit, prefetchable) [size=16G]
        Expansion ROM at f6000000 [disabled] [size=2M]
        Capabilities: [40] Vendor Specific Information: Len=0c <?>
        Capabilities: [70] Express (v2) Endpoint, IntMsgNum 0
                DevCap: MaxPayload 256 bytes, PhantFunc 0, Latency L0s unlimited, L1 unlimited
                        ExtTag+ AttnBtn- AttnInd- PwrInd- RBE+ FLReset+ SlotPowerLimit 0W TEE-IO-
                DevCtl: CorrErr- NonFatalErr- FatalErr+ UnsupReq-
                        RlxdOrd+ ExtTag+ PhantFunc- AuxPwr- NoSnoop+ FLReset-
                        MaxPayload 256 bytes, MaxReadReq 512 bytes
                DevSta: CorrErr- NonFatalErr- FatalErr- UnsupReq- AuxPwr- TransPend-
                LnkCap: Port #0, Speed 2.5GT/s, Width x1, ASPM L0s L1, Exit Latency L0s <64ns, L1 <1us
                        ClockPM- Surprise- LLActRep- BwNot- ASPMOptComp+
                LnkCtl: ASPM L1 Enabled; RCB 64 bytes, LnkDisable- CommClk-
                        ExtSynch- ClockPM- AutWidDis- BWInt- AutBWInt-
                LnkSta: Speed 2.5GT/s, Width x1
                        TrErr- Train- SlotClk- DLActive- BWMgmt- ABWMgmt-
                DevCap2: Completion Timeout: Range B, TimeoutDis+ NROPrPrP- LTR+
                         10BitTagComp+ 10BitTagReq+ OBFF Not Supported, ExtFmt+ EETLPPrefix-
                         EmergencyPowerReduction Not Supported, EmergencyPowerReductionInit-
                         FRS- TPHComp- ExtTPHComp-
                         AtomicOpsCap: 32bit- 64bit- 128bitCAS-
                DevCtl2: Completion Timeout: 50us to 50ms, TimeoutDis-
                         AtomicOpsCtl: ReqEn-
                         IDOReq- IDOCompl- LTR- EmergencyPowerReductionReq-
                         10BitTagReq+ OBFF Disabled, EETLPPrefixBlk-
                LnkCap2: Supported Link Speeds: 2.5GT/s, Crosslink- Retimer- 2Retimers- DRS-
                LnkCtl2: Target Link Speed: 2.5GT/s, EnterCompliance- SpeedDis-
                         Transmit Margin: Normal Operating Range, EnterModifiedCompliance- ComplianceSOS-
                         Compliance Preset/De-emphasis: -6dB de-emphasis, 0dB preshoot
                LnkSta2: Current De-emphasis Level: -6dB, EqualizationComplete- EqualizationPhase1-
                         EqualizationPhase2- EqualizationPhase3- LinkEqualizationRequest-
                         Retimer- 2Retimers- CrosslinkRes: unsupported
        Capabilities: [ac] MSI: Enable+ Count=1/1 Maskable+ 64bit+
                Address: 00000000fee00000  Data: 0000
                Masking: 00000000  Pending: 00000000
        Capabilities: [d0] Power Management version 3
                Flags: PMEClk- DSI- D1- D2- AuxCurrent=0mA PME(D0+,D1-,D2-,D3hot+,D3cold-)
                Status: D0 NoSoftRst+ PME-Enable- DSel=0 DScale=0 PME-
        Capabilities: [100 v1] Alternative Routing-ID Interpretation (ARI)
                ARICap: MFVC- ACS-, Next Function: 0
                ARICtl: MFVC- ACS-, Function Group: 0
        Capabilities: [110 v1] Null
        Capabilities: [200 v1] Address Translation Service (ATS)
                ATSCap: Invalidate Queue Depth: 00
                ATSCtl: Enable+, Smallest Translation Unit: 00
        Capabilities: [420 v1] Physical Resizable BAR
                BAR 2: current size: 16GB, supported: 256MB 512MB 1GB 2GB 4GB 8GB 16GB
        Capabilities: [220 v1] Virtual Resizable BAR
                BAR 2: current size: 4GB, supported: 256MB 512MB 1GB 2GB 4GB 8GB 16GB
        Capabilities: [320 v1] Single Root I/O Virtualization (SR-IOV)
                IOVCap: Migration- 10BitTagReq+ IntMsgNum 0
                IOVCtl: Enable+ Migration- Interrupt- MSE+ ARIHierarchy+ 10BitTagReq-
                IOVSta: Migration-
                Initial VFs: 4, Total VFs: 4, Number of VFs: 4, Function Dependency Link: 00
                VF offset: 1, stride: 1, Device ID: e212
                Supported Page Size: 00000553, System Page Size: 00000001
                Region 0: Memory at 0000038000000000 (64-bit, prefetchable)
                Region 2: Memory at 0000037c00000000 (64-bit, prefetchable)
                VF Migration: offset: 00000000, BIR: 0
        Capabilities: [400 v1] Latency Tolerance Reporting
                Max snoop latency: 0ns
                Max no snoop latency: 0ns
        Kernel driver in use: xe
        Kernel modules: xe

03:00.1 VGA compatible controller: Intel Corporation Battlemage G21 [Intel Graphics] (prog-if 00 [VGA controller])
        Subsystem: Shenzhen Gunnir Technology Development Co., Ltd Device 2522
        Control: I/O- Mem- BusMaster- SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx-
        Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx-
        IOMMU group: 103
        Region 0: Memory at 38000000000 (64-bit, prefetchable) [disabled] [size=16M]
        Region 2: Memory at 37c00000000 (64-bit, prefetchable) [virtual] [size=4G]
        Capabilities: [70] Express (v2) Endpoint, IntMsgNum 0
                DevCap: MaxPayload 128 bytes, PhantFunc 0, Latency L0s unlimited, L1 unlimited
                        ExtTag- AttnBtn- AttnInd- PwrInd- RBE+ FLReset+ SlotPowerLimit 0W TEE-IO-
                DevCtl: CorrErr- NonFatalErr- FatalErr- UnsupReq-
                        RlxdOrd- ExtTag- PhantFunc- AuxPwr- NoSnoop- FLReset-
                        MaxPayload 128 bytes, MaxReadReq 128 bytes
                DevSta: CorrErr- NonFatalErr- FatalErr- UnsupReq- AuxPwr- TransPend-
                LnkCap: Port #0, Speed 2.5GT/s, Width x1, ASPM L0s L1, Exit Latency L0s <64ns, L1 <1us
                        ClockPM- Surprise- LLActRep- BwNot- ASPMOptComp+
                LnkCtl: ASPM Disabled; RCB 64 bytes, LnkDisable- CommClk-
                        ExtSynch- ClockPM- AutWidDis- BWInt- AutBWInt-
                LnkSta: Speed unknown (downgraded), Width x0 (downgraded)
                        TrErr- Train- SlotClk- DLActive- BWMgmt- ABWMgmt-
                DevCap2: Completion Timeout: Range B, TimeoutDis+ NROPrPrP- LTR+
                         10BitTagComp+ 10BitTagReq+ OBFF Not Supported, ExtFmt+ EETLPPrefix-
                         EmergencyPowerReduction Not Supported, EmergencyPowerReductionInit-
                         FRS- TPHComp- ExtTPHComp-
                         AtomicOpsCap: 32bit- 64bit- 128bitCAS-
                DevCtl2: Completion Timeout: 50us to 50ms, TimeoutDis-
                         AtomicOpsCtl: ReqEn-
                         IDOReq- IDOCompl- LTR- EmergencyPowerReductionReq-
                         10BitTagReq- OBFF Disabled, EETLPPrefixBlk-
                LnkSta2: Current De-emphasis Level: -6dB, EqualizationComplete- EqualizationPhase1-
                         EqualizationPhase2- EqualizationPhase3- LinkEqualizationRequest-
                         Retimer- 2Retimers- CrosslinkRes: unsupported
        Capabilities: [ac] MSI: Enable- Count=1/1 Maskable+ 64bit+
                Address: 0000000000000000  Data: 0000
                Masking: 00000000  Pending: 00000000
        Capabilities: [100 v1] Alternative Routing-ID Interpretation (ARI)
                ARICap: MFVC- ACS-, Next Function: 2
                ARICtl: MFVC- ACS-, Function Group: 0
        Capabilities: [200 v1] Address Translation Service (ATS)
                ATSCap: Invalidate Queue Depth: 00
                ATSCtl: Enable+, Smallest Translation Unit: 00
        Kernel driver in use: vfio-pci
        Kernel modules: xe

03:00.2 VGA compatible controller: Intel Corporation Battlemage G21 [Intel Graphics] (prog-if 00 [VGA controller])
        Subsystem: Shenzhen Gunnir Technology Development Co., Ltd Device 2522
        Control: I/O- Mem- BusMaster- SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx-
        Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx-
        IOMMU group: 104
        Region 0: Memory at 38001000000 (64-bit, prefetchable) [disabled] [size=16M]
        Region 2: Memory at 37d00000000 (64-bit, prefetchable) [virtual] [size=4G]
        Capabilities: [70] Express (v2) Endpoint, IntMsgNum 0
                DevCap: MaxPayload 128 bytes, PhantFunc 0, Latency L0s unlimited, L1 unlimited
                        ExtTag- AttnBtn- AttnInd- PwrInd- RBE+ FLReset+ SlotPowerLimit 0W TEE-IO-
                DevCtl: CorrErr- NonFatalErr- FatalErr- UnsupReq-
                        RlxdOrd- ExtTag- PhantFunc- AuxPwr- NoSnoop- FLReset-
                        MaxPayload 128 bytes, MaxReadReq 128 bytes
                DevSta: CorrErr- NonFatalErr- FatalErr- UnsupReq- AuxPwr- TransPend-
                LnkCap: Port #0, Speed 2.5GT/s, Width x1, ASPM L0s L1, Exit Latency L0s <64ns, L1 <1us
                        ClockPM- Surprise- LLActRep- BwNot- ASPMOptComp+
                LnkCtl: ASPM Disabled; RCB 64 bytes, LnkDisable- CommClk-
                        ExtSynch- ClockPM- AutWidDis- BWInt- AutBWInt-
                LnkSta: Speed unknown (downgraded), Width x0 (downgraded)
                        TrErr- Train- SlotClk- DLActive- BWMgmt- ABWMgmt-
                DevCap2: Completion Timeout: Range B, TimeoutDis+ NROPrPrP- LTR+
                         10BitTagComp+ 10BitTagReq+ OBFF Not Supported, ExtFmt+ EETLPPrefix-
                         EmergencyPowerReduction Not Supported, EmergencyPowerReductionInit-
                         FRS- TPHComp- ExtTPHComp-
                         AtomicOpsCap: 32bit- 64bit- 128bitCAS-
                DevCtl2: Completion Timeout: 50us to 50ms, TimeoutDis-
                         AtomicOpsCtl: ReqEn-
                         IDOReq- IDOCompl- LTR- EmergencyPowerReductionReq-
                         10BitTagReq- OBFF Disabled, EETLPPrefixBlk-
                LnkSta2: Current De-emphasis Level: -6dB, EqualizationComplete- EqualizationPhase1-
                         EqualizationPhase2- EqualizationPhase3- LinkEqualizationRequest-
                         Retimer- 2Retimers- CrosslinkRes: unsupported
        Capabilities: [ac] MSI: Enable- Count=1/1 Maskable+ 64bit+
                Address: 0000000000000000  Data: 0000
                Masking: 00000000  Pending: 00000000
        Capabilities: [100 v1] Alternative Routing-ID Interpretation (ARI)
                ARICap: MFVC- ACS-, Next Function: 3
                ARICtl: MFVC- ACS-, Function Group: 0
        Capabilities: [200 v1] Address Translation Service (ATS)
                ATSCap: Invalidate Queue Depth: 00
                ATSCtl: Enable+, Smallest Translation Unit: 00
        Kernel driver in use: vfio-pci
        Kernel modules: xe

03:00.3 VGA compatible controller: Intel Corporation Battlemage G21 [Intel Graphics] (prog-if 00 [VGA controller])
        Subsystem: Shenzhen Gunnir Technology Development Co., Ltd Device 2522
        Control: I/O- Mem- BusMaster- SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx-
        Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx-
        IOMMU group: 105
        Region 0: Memory at 38002000000 (64-bit, prefetchable) [disabled] [size=16M]
        Region 2: Memory at 37e00000000 (64-bit, prefetchable) [virtual] [size=4G]
        Capabilities: [70] Express (v2) Endpoint, IntMsgNum 0
                DevCap: MaxPayload 128 bytes, PhantFunc 0, Latency L0s unlimited, L1 unlimited
                        ExtTag- AttnBtn- AttnInd- PwrInd- RBE+ FLReset+ SlotPowerLimit 0W TEE-IO-
                DevCtl: CorrErr- NonFatalErr- FatalErr- UnsupReq-
                        RlxdOrd- ExtTag- PhantFunc- AuxPwr- NoSnoop- FLReset-
                        MaxPayload 128 bytes, MaxReadReq 128 bytes
                DevSta: CorrErr- NonFatalErr- FatalErr- UnsupReq- AuxPwr- TransPend-
                LnkCap: Port #0, Speed 2.5GT/s, Width x1, ASPM L0s L1, Exit Latency L0s <64ns, L1 <1us
                        ClockPM- Surprise- LLActRep- BwNot- ASPMOptComp+
                LnkCtl: ASPM Disabled; RCB 64 bytes, LnkDisable- CommClk-
                        ExtSynch- ClockPM- AutWidDis- BWInt- AutBWInt-
                LnkSta: Speed unknown (downgraded), Width x0 (downgraded)
                        TrErr- Train- SlotClk- DLActive- BWMgmt- ABWMgmt-
                DevCap2: Completion Timeout: Range B, TimeoutDis+ NROPrPrP- LTR+
                         10BitTagComp+ 10BitTagReq+ OBFF Not Supported, ExtFmt+ EETLPPrefix-
                         EmergencyPowerReduction Not Supported, EmergencyPowerReductionInit-
                         FRS- TPHComp- ExtTPHComp-
                         AtomicOpsCap: 32bit- 64bit- 128bitCAS-
                DevCtl2: Completion Timeout: 50us to 50ms, TimeoutDis-
                         AtomicOpsCtl: ReqEn-
                         IDOReq- IDOCompl- LTR- EmergencyPowerReductionReq-
                         10BitTagReq- OBFF Disabled, EETLPPrefixBlk-
                LnkSta2: Current De-emphasis Level: -6dB, EqualizationComplete- EqualizationPhase1-
                         EqualizationPhase2- EqualizationPhase3- LinkEqualizationRequest-
                         Retimer- 2Retimers- CrosslinkRes: unsupported
        Capabilities: [ac] MSI: Enable- Count=1/1 Maskable+ 64bit+
                Address: 0000000000000000  Data: 0000
                Masking: 00000000  Pending: 00000000
        Capabilities: [100 v1] Alternative Routing-ID Interpretation (ARI)
                ARICap: MFVC- ACS-, Next Function: 4
                ARICtl: MFVC- ACS-, Function Group: 0
        Capabilities: [200 v1] Address Translation Service (ATS)
                ATSCap: Invalidate Queue Depth: 00
                ATSCtl: Enable+, Smallest Translation Unit: 00
        Kernel driver in use: vfio-pci
        Kernel modules: xe

03:00.4 VGA compatible controller: Intel Corporation Battlemage G21 [Intel Graphics] (prog-if 00 [VGA controller])
        Subsystem: Shenzhen Gunnir Technology Development Co., Ltd Device 2522
        Control: I/O- Mem- BusMaster- SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx-
        Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx-
        IOMMU group: 106
        Region 0: Memory at 38003000000 (64-bit, prefetchable) [disabled] [size=16M]
        Region 2: Memory at 37f00000000 (64-bit, prefetchable) [virtual] [size=4G]
        Capabilities: [70] Express (v2) Endpoint, IntMsgNum 0
                DevCap: MaxPayload 128 bytes, PhantFunc 0, Latency L0s unlimited, L1 unlimited
                        ExtTag- AttnBtn- AttnInd- PwrInd- RBE+ FLReset+ SlotPowerLimit 0W TEE-IO-
                DevCtl: CorrErr- NonFatalErr- FatalErr- UnsupReq-
                        RlxdOrd- ExtTag- PhantFunc- AuxPwr- NoSnoop- FLReset-
                        MaxPayload 128 bytes, MaxReadReq 128 bytes
                DevSta: CorrErr- NonFatalErr- FatalErr- UnsupReq- AuxPwr- TransPend-
                LnkCap: Port #0, Speed 2.5GT/s, Width x1, ASPM L0s L1, Exit Latency L0s <64ns, L1 <1us
                        ClockPM- Surprise- LLActRep- BwNot- ASPMOptComp+
                LnkCtl: ASPM Disabled; RCB 64 bytes, LnkDisable- CommClk-
                        ExtSynch- ClockPM- AutWidDis- BWInt- AutBWInt-
                LnkSta: Speed unknown (downgraded), Width x0 (downgraded)
                        TrErr- Train- SlotClk- DLActive- BWMgmt- ABWMgmt-
                DevCap2: Completion Timeout: Range B, TimeoutDis+ NROPrPrP- LTR+
                         10BitTagComp+ 10BitTagReq+ OBFF Not Supported, ExtFmt+ EETLPPrefix-
                         EmergencyPowerReduction Not Supported, EmergencyPowerReductionInit-
                         FRS- TPHComp- ExtTPHComp-
                         AtomicOpsCap: 32bit- 64bit- 128bitCAS-
                DevCtl2: Completion Timeout: 50us to 50ms, TimeoutDis-
                         AtomicOpsCtl: ReqEn-
                         IDOReq- IDOCompl- LTR- EmergencyPowerReductionReq-
                         10BitTagReq- OBFF Disabled, EETLPPrefixBlk-
                LnkSta2: Current De-emphasis Level: -6dB, EqualizationComplete- EqualizationPhase1-
                         EqualizationPhase2- EqualizationPhase3- LinkEqualizationRequest-
                         Retimer- 2Retimers- CrosslinkRes: unsupported
        Capabilities: [ac] MSI: Enable- Count=1/1 Maskable+ 64bit+
                Address: 0000000000000000  Data: 0000
                Masking: 00000000  Pending: 00000000
        Capabilities: [100 v1] Alternative Routing-ID Interpretation (ARI)
                ARICap: MFVC- ACS-, Next Function: 5
                ARICtl: MFVC- ACS-, Function Group: 0
        Capabilities: [200 v1] Address Translation Service (ATS)
                ATSCap: Invalidate Queue Depth: 00
                ATSCtl: Enable+, Smallest Translation Unit: 00
        Kernel driver in use: vfio-pci
        Kernel modules: xe

I am still seeing wildy varying benchmark results in VMs from run to run so still need to figure out what’s going on there…perhaps a cooling issue…

@msx0 did you notice any performance difference in your tests with asymmetric VRAM splits and BAR sizes not matching?

B50: working around the 60 °C throttle with the fan, and a question about the golden FWDATA in 8976

Following up on @mal7hael’s post (#665) about the 60 °C limit in newer firmware. Same here with the hybrid (FW code 21.1182, FWDATA 203.31, Proxmox kernel 7.0.14): at 61 °C the frequency drops from ~2300 to 400 MHz and stays there. throttle/reasons shows none, cur_freq stays at 2600 and the card goes below min_freq, so the driver has no say in it.

What I am experimenting with: the fan curve. It is the only thing I know how to override. The stock table, read back from the card:

°C 35 45 50 60 70 80 84 88 91 94
rpm 1000 1000 1200 2200 3200 4200 4600 5000 5300 5600

At the throttle point the fan is at 2200 of 5600 rpm, and it only speeds up at temperatures the card no longer reaches. With the xe fan control patches (Intel series 168027, not upstream yet) the curve can be changed. llama-bench, 2048 tokens, same model:

fan frequency package result
stock table 400 MHz after ~4 s at 61 °C held at 60 °C 15.4 t/s
full speed 2100-2400 MHz throughout 58 °C max 36.1 t/s

I am still looking for a curve that is quieter than full speed. One catch: after a load the fan can stay loud, because the package temperature reading freezes while the GT is in gt-c6 (IGCIT #1574). Briefly holding debugfs dri/<pci>/forcewake_all open refreshes it (61 → 38 °C here).

What I would really like: to move the throttle point itself. A louder fan is a workaround, not a fix. Things I tried that do not work:

  • min_freq / max_freq: ignored by the card
  • power limit: power1_cap is 70 W, no PL1 is exposed
  • the PCODE temperature-limit domain used on the B60 (0x49): not exposed on the B50, the card reports a single parameter (sub 1, 0x13)
  • late-binding fan table: the Windows driver ships none for the B50

Does anyone know another way to change that limit, or a FW code newer than 21.1182? Driver 101.9175 still carries 21.1182.

Question: has anyone flashed the golden FWDATA from 8976?

Driver packages 101.8976 and 101.9175 contain Graphics/ifwi/bmg/golden-fwdata/bmg_ibc-dws-b93_e212_config-data_golden.bin (sha256 5c3add2dc8eaba47187020751ba0d13d14d4562ccf659631b435cfdd95804ed7). igsc fw-data version --image reports 203.37, ARB SVN 1.

FWDATA is not encrypted, and the B50 images differ in only a few bytes. The two that track the VF limit:

FWDATA source byte 0x3ea66 (VF count) byte 0x3ea65
203.31 driver 6979 12 0x0b
203.37, 203.39, 203.41 LVFS, driver 8976 2 0x0d
203.37 golden driver 8976 / 9175 24 0x0b

0x0b vs 0x0d looks like the VF BAR size (2 GB vs 8 GB), which fits “maximum 2VFs and 8GB Bar Size” in the 203.39 notes.

As far as I can tell the golden images are the recovery copies: golden FW code and OPROM in these packages are byte-identical to the “recovery” images on LVFS and always one version behind. This golden FWDATA is the odd one out: it is not the LVFS 203.37 recovery image, which has 2 VFs.

I have not flashed it. If someone already has: how many VFs did you get, did anything else change, and could you go back to 203.31?

Follow-up on the 60 °C throttle point: I found one more knob and tested it. It does not help on my card.

What I did

I patched xe to list the PCODE tuning domains the card reports and to write to them. The B50 exposes exactly one: domain 0x99 (sub 1, param 0x13). Its range reads:

min 100, max 60, default 100

So the two limits come back in the wrong order.

Result

  • Writing 65 to that domain is accepted: stage, commit and read-back all return status 0, and the value persists.
  • Under load nothing changes. At 61 °C the actual frequency still drops to 400 MHz at about 38 W, and throttle/reasons still says none.

What I cannot tell

My card runs FW code 21.1182 with FWDATA 203.31. In the 203.31 image the two bytes behind this range are stored as 60, 100; in 203.37 and 203.39 they are 100, 60. So either:

  1. Domain 0x99 is simply not the throttle point, or
  2. it is, but the firmware clamps my write to the “max” of 60 it reports with my mismatched FWDATA.

For now the custom fan curve is still my only working workaround.

Assymetric VRAM splits BELOW the default firmware BAR size are fully supported by default with no modifications. What I did was forcefully increase the BAR size so that I can give a single VM more than 4GB of VRAM. It has been working great for weeks now. I can run windows/linux games/ai/whatever and it all works with even 14GB on a single VM with 0.5 GB each for the other VFs and the PF. Otherwise, if you try to give a VF more vram_quota than the size of the BAR you get errors.

If you are experiencing stutters, you should look into the sched_priority, exec_quantum_ms and preempt_timeout_us parameters. They control how long the GPU spends processing each VM and for how long a VM can take the card for itself.

I’m running with:

exec_quantum_ms = 4 (Try to switch to working on another VF after 4ms by not scheduling any more work for the current one)

preempt_timeout_us = 10000000 (Force kick out a VF if hasn’t finished work after 10s, causing a driver reset in the VM)

sched_priority = low (Don’t schedule VFs that don’t have anything to do, allow every VF to use 100% of the card)

At least that’s how I understand those parameters. In particular, lower exec_quantum_ms should improve stutter at the cost of higher switching overhead/lower total performance.

Some more things to check:

-The 60C thermal throttle mentioned in this thread

-Host kernel version (I noticed you use the debugfs interface and not /sys/bus/pci/devices/0000:23:00.0/sriov_admin/vf1/profile style sysfs like I do on kernel 7.2)

-The pci isolation parameters mentioned and generic kvm sr-iov optimisations (hugepages, core assignments, hyperthread awareness, topoext cpu cache passthrough,…)

-Motherboard uefi updates

-Windows drivers versions (The first ones are less stable and have garbled textures in vulkan/dx12 and broken results in ai compute, the later ones do code 43 without disabling svm and have black dots crawl artifacting sometimes, etc.)

You should try flashing that golden fwdata 203.37 an tell us if you really get 24VFs. IIRC there is no rollback protection as long as you stay within one major revision (203)