Should mapping PCI resources without matching IOMMU group be possible?

wrobelda

Member
Apr 13, 2022
50
3
13
Hi,

I resource-map my PCI devices that I pass-through to VMs. This works fine, or rather did, until one of my RAID SSDs failed yesterday and disappeared from the system upon reboot — without me being aware of it. Since the disk was no longer detected by the motherboard, the IOMMU groups were reiterated and pretty much all of my mapped PCI devices saw their IOMMU group changed. As a result, all of the VMs which had those PCI devices attached failed to boot.

Screenshot 2025-06-11 at 11.46.26 AM.png
I had faced similar issues before whenever I was *adding* a new device, although I did not consider those that much of a burden, since I was knowingly changing the configuration so I anticipated that changes to mapping would be required.

This makes me wonder what's the actual use-case of mapping the devices using particular IOMMU group? From my experience, one cannot rely on the IOMMU group be persistent in any way, they can change even between firmware upgrades. In fact, the manual doesn't even mention the IOMMU being referenced when mapping a PCI device: https://pve.proxmox.com/pve-docs/pve-admin-guide.html#resource_mapping , so I assume this is a recent change that addresses some need. However, I don't see why we wouldn't just rely on PCI bus ID and the vendor/device ID combination by default and allow the IOMMU mapping to be optional (or vice versa)?

EDIT: let me also make a point that when you assign a PCI device directly to a VM, you refer it by the PCI bus ID only, not even vendor/device ID is used.
 
Last edited:
AFAIK, the grouping into IOMMU groups is done by the hardware and not by the operating system, so we may not be able to do something about it besides changing cards/devices.
 
AFAIK, the grouping into IOMMU groups is done by the hardware and not by the operating system, so we may not be able to do something about it besides changing cards/devices.
I am sorry, I think you missed the point: this is about Resource Mapping functionality in Proxmox. I am not asking to change how IOMMU groups are assigned, which is indeed done by firmware. I’m merely suggesting to relax the Resource Mapping matching rules.
 
  • Like
Reactions: ism
Hi,

I resource-map my PCI devices that I pass-through to VMs. This works fine, or rather did, until one of my RAID SSDs failed yesterday and disappeared from the system upon reboot — without me being aware of it. Since the disk was no longer detected by the motherboard, the IOMMU groups were reiterated and pretty much all of my mapped PCI devices saw their IOMMU group changed. As a result, all of the VMs which had those PCI devices attached failed to boot.

View attachment 87034
I had faced similar issues before whenever I was *adding* a new device, although I did not consider those that much of a burden, since I was knowingly changing the configuration so I anticipated that changes to mapping would be required.

This makes me wonder what's the actual use-case of mapping the devices using particular IOMMU group? From my experience, one cannot rely on the IOMMU group be persistent in any way, they can change even between firmware upgrades. In fact, the manual doesn't even mention the IOMMU being referenced when mapping a PCI device: https://pve.proxmox.com/pve-docs/pve-admin-guide.html#resource_mapping , so I assume this is a recent change that addresses some need. However, I don't see why we wouldn't just rely on PCI bus ID and the vendor/device ID combination by default and allow the IOMMU mapping to be optional (or vice versa)?

EDIT: let me also make a point that when you assign a PCI device directly to a VM, you refer it by the PCI bus ID only, not even vendor/device ID is used.
I ran in to the same issue across a 4-node cluster after changing a Mellanox Connectx-7 firmware setting - wasn't even a firmware upgrade to begin with. had to manually update the device mappings. such a PITA! :rolleyes:
 
  • Like
Reactions: wrobelda