Is my IOMMU enabled?

alpot

New Member
Oct 7, 2025
9
0
1
From this link https://pve.proxmox.com/wiki/PCI_Passthrough#Requirements , it is mentioned that to identify if IOMMU is enabled, you can search for a particular text in dmesg, like so:

Code:
dmesg | grep -e DMAR -e IOMMU

I enabled IOMMU in the BIOS, and I can do PCI passthrough. Also, journalctl is showing the following:

Code:
$:~# dmesg | grep -e DMAR -e IOMMU
$:~# journalctl  | grep -i iommu | tail -10
Nov 11 17:14:15 mylinuxsite kernel: pci 0000:0d:00.0: Adding to iommu group 24
Nov 11 17:14:15 mylinuxsite kernel: pci 0000:0e:00.0: Adding to iommu group 25
Nov 11 17:14:15 mylinuxsite kernel: pci 0000:0f:00.0: Adding to iommu group 26
Nov 11 17:14:15 mylinuxsite kernel: pci 0000:0f:00.1: Adding to iommu group 27
Nov 11 17:14:15 mylinuxsite kernel: pci 0000:0f:00.2: Adding to iommu group 28
Nov 11 17:14:15 mylinuxsite kernel: pci 0000:0f:00.3: Adding to iommu group 29
Nov 11 17:14:15 mylinuxsite kernel: pci 0000:0f:00.4: Adding to iommu group 30
Nov 11 17:14:15 mylinuxsite kernel: pci 0000:0f:00.6: Adding to iommu group 31
Nov 11 17:14:15 mylinuxsite kernel: pci 0000:10:00.0: Adding to iommu group 32
Nov 11 17:14:15 mylinuxsite kernel: perf/amd_iommu: Detected AMD IOMMU #0 (2 banks, 4 counters/bank).

That link mentioned that "There should be a line that looks like "DMAR: IOMMU enabled". If there is no output, something is wrong."

Is there something wrong with my IOMMU?
 
No, the Wiki is outdated and that test only applies to Intel platforms. The real test is whether there are IOMMU group, which you do have (and you already said that passthrough was working).
Thanks for the reply.

The reason I asked is that something strange happened after I made a passthrough on my HD Audio controller. Before the passthrough, the host recognises this controller. After I removed the passthrough from the guest VM, this controller would not return to the host. Later on, I found out that it is still attached to vfio-pci.

Code:
0f:00.6 Audio device [0403]: Advanced Micro Devices, Inc. [AMD] Family 17h/19h/1ah HD Audio Controller [1022:15e3]
        DeviceName: Realtek ALC1220
        Subsystem: Micro-Star International Co., Ltd. [MSI] Device [1462:9e56]
        Kernel driver in use: vfio-pci
        Kernel modules: snd_hda_intel

I have to manually unbind it and then rebind it to the correct driver.
 
Before the passthrough, the host recognises this controller. After I removed the passthrough from the guest VM, this controller would not return to the host. Later on, I found out that it is still attached to vfio-pci.
This is normal. Some devices don't respond well to frequent driver switching or don't reset properly at all.
I have to manually unbind it and then rebind it to the correct driver.
There are examples of this on the forum if you need inspiration for a hookscript. But it sounds like you already know how to do this.