How to enable IOMMU on AMD platforms using zfs?

uaysk

New Member
Jan 19, 2024
3
0
1
I am currently using proxmox version 8.1 and using a 5600G CPU and EX A320M gaming motherboard.
At first, I updated it by adding amd_iommu=on iommu=pt to the /etc/kernel/cmdline file and executing the proxmox-boot-tool refresh command according to what I found on the Internet.
However, when I excuted dmesg | grep -e DMAR -e IOMMU, '[ 0.020766] DMAR: IOMMU enabled' section could not be checked.
In another post on this forum, I saw that amd_iommu=on is enabled by default and adding it to the cmdline is meaningless. I deleted all the added content, updated the cmdline again, and rebooted, but I still couldn't find the IOMMU enabled section
I enabled 4G Decode, IOMMU, and SR-IOV in BIOS and disabled Resizable Bar, CSM, and Secure Boot.
Did I miss something?

dmesg | When executing the grep -e DMAR -e IOMMU command, the output is as follows:
[ 0.452060] pci 0000:00:00.2: AMD-Vi: IOMMU performance counters supported
[ 0.453183] pci 0000:00:00.2: AMD-Vi: Found IOMMU cap 0x40
[ 0.695468] perf/amd_iommu: Detected AMD IOMMU #0 (2 banks, 4 counters/bank).
[ 4.298624] AMD-Vi: AMD IOMMUv2 loaded and initialized
 
Last edited:
On AMD IOMMU is enabled by default. All you need to do is fully enable it in the motherboard BIOS.
The check you used is for Intel and does not work for AMD. Check with journalctl -b 0 | grep -i iommu to see that devices are assigned to IOMMU groups.
Looks like everything is fine on your system, but the A320 chipset will have poor groupings and at most only one PCIe slot (x16) and one M.2 slot (x4) will be useful for passthrough.
 
On AMD IOMMU is enabled by default. All you need to do is fully enable it in the motherboard BIOS.
The check you used is for Intel and does not work for AMD. Check with journalctl -b 0 | grep -i iommu to see that devices are assigned to IOMMU groups.
Looks like everything is fine on your system, but the A320 chipset will have poor groupings and at most only one PCIe slot (x16) and one M.2 slot (x4) will be useful for passthrough.
I use journalctl -b 0 | I ran the grep -i iommu command and got the results below. Are you sure iommu is enabled?

Code:
Jan 20 02:00:21 proxmox kernel: iommu: Default domain type: Translated
Jan 20 02:00:21 proxmox kernel: iommu: DMA domain TLB invalidation policy: lazy mode
Jan 20 02:00:21 proxmox kernel: pci 0000:00:00.2: AMD-Vi: IOMMU performance counters supported
Jan 20 02:00:21 proxmox kernel: pci 0000:00:01.0: Adding to iommu group 0
Jan 20 02:00:21 proxmox kernel: pci 0000:00:01.1: Adding to iommu group 1
Jan 20 02:00:21 proxmox kernel: pci 0000:00:02.0: Adding to iommu group 2
Jan 20 02:00:21 proxmox kernel: pci 0000:00:02.1: Adding to iommu group 3
Jan 20 02:00:21 proxmox kernel: pci 0000:00:02.2: Adding to iommu group 4
Jan 20 02:00:21 proxmox kernel: pci 0000:00:08.0: Adding to iommu group 5
Jan 20 02:00:21 proxmox kernel: pci 0000:00:08.1: Adding to iommu group 6
Jan 20 02:00:21 proxmox kernel: pci 0000:00:08.2: Adding to iommu group 7
Jan 20 02:00:21 proxmox kernel: pci 0000:00:14.0: Adding to iommu group 8
Jan 20 02:00:21 proxmox kernel: pci 0000:00:14.3: Adding to iommu group 8
Jan 20 02:00:21 proxmox kernel: pci 0000:00:18.0: Adding to iommu group 9
Jan 20 02:00:21 proxmox kernel: pci 0000:00:18.1: Adding to iommu group 9
Jan 20 02:00:21 proxmox kernel: pci 0000:00:18.2: Adding to iommu group 9
Jan 20 02:00:21 proxmox kernel: pci 0000:00:18.3: Adding to iommu group 9
Jan 20 02:00:21 proxmox kernel: pci 0000:00:18.4: Adding to iommu group 9
Jan 20 02:00:21 proxmox kernel: pci 0000:00:18.5: Adding to iommu group 9
Jan 20 02:00:21 proxmox kernel: pci 0000:00:18.6: Adding to iommu group 9
Jan 20 02:00:21 proxmox kernel: pci 0000:00:18.7: Adding to iommu group 9
Jan 20 02:00:21 proxmox kernel: pci 0000:01:00.0: Adding to iommu group 10
Jan 20 02:00:21 proxmox kernel: pci 0000:02:00.0: Adding to iommu group 11
Jan 20 02:00:21 proxmox kernel: pci 0000:02:00.1: Adding to iommu group 11
Jan 20 02:00:21 proxmox kernel: pci 0000:02:00.2: Adding to iommu group 11
Jan 20 02:00:21 proxmox kernel: pci 0000:03:04.0: Adding to iommu group 11
Jan 20 02:00:21 proxmox kernel: pci 0000:03:06.0: Adding to iommu group 11
Jan 20 02:00:21 proxmox kernel: pci 0000:03:07.0: Adding to iommu group 11
Jan 20 02:00:21 proxmox kernel: pci 0000:05:00.0: Adding to iommu group 11
Jan 20 02:00:21 proxmox kernel: pci 0000:07:00.0: Adding to iommu group 12
Jan 20 02:00:21 proxmox kernel: pci 0000:08:00.0: Adding to iommu group 13
Jan 20 02:00:21 proxmox kernel: pci 0000:08:00.1: Adding to iommu group 14
Jan 20 02:00:21 proxmox kernel: pci 0000:08:00.2: Adding to iommu group 15
Jan 20 02:00:21 proxmox kernel: pci 0000:08:00.3: Adding to iommu group 16
Jan 20 02:00:21 proxmox kernel: pci 0000:08:00.4: Adding to iommu group 17
Jan 20 02:00:21 proxmox kernel: pci 0000:08:00.6: Adding to iommu group 18
Jan 20 02:00:21 proxmox kernel: pci 0000:09:00.0: Adding to iommu group 19
Jan 20 02:00:21 proxmox kernel: pci 0000:00:00.2: AMD-Vi: Found IOMMU cap 0x40
Jan 20 02:00:21 proxmox kernel: perf/amd_iommu: Detected AMD IOMMU #0 (2 banks, 4 counters/bank).
Jan 20 02:00:21 proxmox kernel: AMD-Vi: AMD IOMMUv2 loaded and initialized
 
Last edited:
I use journalctl -b 0 | I ran the grep -i iommu command and got the results below. Are you sure iommu is enabled?

Code:
Jan 20 02:00:21 proxmox kernel: iommu: Default domain type: Translated
Jan 20 02:00:21 proxmox kernel: iommu: DMA domain TLB invalidation policy: lazy mode
Jan 20 02:00:21 proxmox kernel: pci 0000:00:00.2: AMD-Vi: IOMMU performance counters supported
Jan 20 02:00:21 proxmox kernel: pci 0000:00:01.0: Adding to iommu group 0
Jan 20 02:00:21 proxmox kernel: pci 0000:00:01.1: Adding to iommu group 1
Jan 20 02:00:21 proxmox kernel: pci 0000:00:02.0: Adding to iommu group 2
Jan 20 02:00:21 proxmox kernel: pci 0000:00:02.1: Adding to iommu group 3
Jan 20 02:00:21 proxmox kernel: pci 0000:00:02.2: Adding to iommu group 4
Jan 20 02:00:21 proxmox kernel: pci 0000:00:08.0: Adding to iommu group 5
Jan 20 02:00:21 proxmox kernel: pci 0000:00:08.1: Adding to iommu group 6
Jan 20 02:00:21 proxmox kernel: pci 0000:00:08.2: Adding to iommu group 7
Jan 20 02:00:21 proxmox kernel: pci 0000:00:14.0: Adding to iommu group 8
Jan 20 02:00:21 proxmox kernel: pci 0000:00:14.3: Adding to iommu group 8
Jan 20 02:00:21 proxmox kernel: pci 0000:00:18.0: Adding to iommu group 9
Jan 20 02:00:21 proxmox kernel: pci 0000:00:18.1: Adding to iommu group 9
Jan 20 02:00:21 proxmox kernel: pci 0000:00:18.2: Adding to iommu group 9
Jan 20 02:00:21 proxmox kernel: pci 0000:00:18.3: Adding to iommu group 9
Jan 20 02:00:21 proxmox kernel: pci 0000:00:18.4: Adding to iommu group 9
Jan 20 02:00:21 proxmox kernel: pci 0000:00:18.5: Adding to iommu group 9
Jan 20 02:00:21 proxmox kernel: pci 0000:00:18.6: Adding to iommu group 9
Jan 20 02:00:21 proxmox kernel: pci 0000:00:18.7: Adding to iommu group 9
Jan 20 02:00:21 proxmox kernel: pci 0000:01:00.0: Adding to iommu group 10
Jan 20 02:00:21 proxmox kernel: pci 0000:02:00.0: Adding to iommu group 11
Jan 20 02:00:21 proxmox kernel: pci 0000:02:00.1: Adding to iommu group 11
Jan 20 02:00:21 proxmox kernel: pci 0000:02:00.2: Adding to iommu group 11
Jan 20 02:00:21 proxmox kernel: pci 0000:03:04.0: Adding to iommu group 11
Jan 20 02:00:21 proxmox kernel: pci 0000:03:06.0: Adding to iommu group 11
Jan 20 02:00:21 proxmox kernel: pci 0000:03:07.0: Adding to iommu group 11
Jan 20 02:00:21 proxmox kernel: pci 0000:05:00.0: Adding to iommu group 11
Jan 20 02:00:21 proxmox kernel: pci 0000:07:00.0: Adding to iommu group 12
Jan 20 02:00:21 proxmox kernel: pci 0000:08:00.0: Adding to iommu group 13
Jan 20 02:00:21 proxmox kernel: pci 0000:08:00.1: Adding to iommu group 14
Jan 20 02:00:21 proxmox kernel: pci 0000:08:00.2: Adding to iommu group 15
Jan 20 02:00:21 proxmox kernel: pci 0000:08:00.3: Adding to iommu group 16
Jan 20 02:00:21 proxmox kernel: pci 0000:08:00.4: Adding to iommu group 17
Jan 20 02:00:21 proxmox kernel: pci 0000:08:00.6: Adding to iommu group 18
Jan 20 02:00:21 proxmox kernel: pci 0000:09:00.0: Adding to iommu group 19
Jan 20 02:00:21 proxmox kernel: pci 0000:00:00.2: AMD-Vi: Found IOMMU cap 0x40
Jan 20 02:00:21 proxmox kernel: perf/amd_iommu: Detected AMD IOMMU #0 (2 banks, 4 counters/bank).
Jan 20 02:00:21 proxmox kernel: AMD-Vi: AMD IOMMUv2 loaded and initialized
Yes, I'm absolutely positive that IOMMU is enabled. You can even see how the PCI(e) devices are distributed over the IOMMU groups.
 
Last edited:
Have you sorted this out? I have the same problem with Ryzen 7840HS and 780M iGPU, it does not have Iommu group.
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!