SR-IOV fails/error "SR-IOV: bus number out of range or ""not enough MMIO resources"

I have seen SR-IOV ( Single Root I/O Virtulaization) fails with these error messages (“SR-IOV: bus number out of range or “not enough MMIO resources” ) when using SR-IOV capable hardware devices.

Couple of things can contribute to this issue. One of them can be the subjected kernel calculate the size of a SR-IOV bar in a way that single Virtual Function bar multiplies by the total possible Virtula Functions, where the SR-IOV BAR need only be aligned to the size of a  single VF bar. Secondly SR-IOV bars are not sorted at all in the system

If you come-across something like that please try to use pci=assign-busses option to boot
kernel and check.. 🙂