AM4 motherboard and PCIe MMIO limits

I’m far down the rabbit hole of trying to get 2x Radeon Pro v620s running on spare parts I had lying around, and I’m so tantalizingly close. Both cards work individually, but if I try to put them in the system at the same time I seem to run out of PCI MMIO space. Linux shows “no space” errors when trying to allocate the BARs and disables the second card. It doesn’t even show up in lspci.

I believe the issue is that these cards allocate BAR space for SR-IOV up front. It looks like the one card is asking for ~380GB of MMIO space! ~12 VF x 32G VRAM. I didn’t think would be a problem (hey, I have >4GB decoding turned on, and PCIe is 64-bit, right?), but apparently the gigabyte auros elite B550 motherboard I’m using only has ~440GB MMIO space configured so the second card can’t get enough space.

I don’t care about SR-IOV, but the BIOS has no option to disable it or change the MMIO size. And disabling the IOMMU doesn’t seem to stop the cards from requesting it anyway. I’ve spent tonight trying all sorts of pci=, iommu= and amdgpu= kernel parameters to no avail.

Any suggestions?

I think I’ll try to hack the kernel to just ignore SR-IOV. Or I could look to roll the dice on another cheap motherboard, but that would be my third and it feels like sinking good money after bad. I started this odyssey a few weeks ago on a B450 motherboard I had on a shelf from an upgrade but it seems i broke one of the pcie slots during testing…sadly THAT bios allowed me to configure the PCIe MMIO space up to 1TB!

Might as well post an update. I suspect that I’m wrong…or at least MMIO space is not the only issue. I hacked the pci kernel driver to just ignore SR-IOV and my MMIO conflicts went away in the boot log, but the second v620 still doesn’t show up on the B550 motherboard.

My main workstation has a x570 and a 5950x; I just didn’t want to tear apart a stable, actively used system… but I bit the bullet, tore my workstation apart, and tried both cards on the x570/ryzen 5000 series. And… well, it still doesn’t work, but at least both cards show up in lspci, which seems like progress.

Now I have to decide if I want to cut my losses and use only one card, or put the b550 motherboard into my workstation and continue to experiment with the x570.

Not directly related, but brings me back memories…

This is that, on steroids.

Closing this out, I did, finally, get it to work. I tried many things along the way, but I’ll try to guess what helped the most.

  • For some reason my particular Ryzen 3600 would not work anymore with anything in the 1st pcie slot across multiple motherboards. Fixed with a replacement CPU (from the 5000x series).
  • I had been removing my boot/bios graphics card once both card were installed, because this machine should be headless. However, this seems to (sometimes? always?) re-enable CSM in the bios, and then the cards are not recognised at all. At the moment I have the card in place.
  • I hacked a 6.19.0-rc kernel to disable sr-iov on the kernel level. Meaning this kernel does not reserve space for all the VFIO devices. This may not actually be necessary as the other two issues may be the real culprit.

My working kernel command line is: pci=realloc=off amdgpu.ppfeaturemask=0xffffffff .

And my working rocm-smi output:

ARNING: AMD GPU device(s) is/are in a low-power state. Check power control/runtime_status

========================================= ROCm System Management Interface =========================================
=================================================== Concise Info ===================================================
Device  Node  IDs              Temp    Power   Partitions          SCLK     MCLK   Fan  Perf  PwrCap  VRAM%  GPU%
              (DID,     GUID)  (Edge)  (Avg)   (Mem, Compute, ID)
====================================================================================================================
0       1     0x73a1,   19625  42.0°C  77.0W   N/A, N/A, 0         500Mhz   96Mhz  0%   auto  250.0W  95%    0%
1       2     0x73a1,   6767   51.0°C  107.0W  N/A, N/A, 0         2445Mhz  96Mhz  0%   auto  250.0W  94%    99%
====================================================================================================================
=============================================== End of ROCm SMI Log ================================================