Skip to content

Instantly share code, notes, and snippets.

@flungo
Created March 10, 2017 23:59
Show Gist options
  • Save flungo/428c374c040de1d0a30fd4a593d39040 to your computer and use it in GitHub Desktop.
Save flungo/428c374c040de1d0a30fd4a593d39040 to your computer and use it in GitHub Desktop.
List the devices and their IOMMU groups.
#!/bin/bash
for d in $(find /sys/kernel/iommu_groups/ -type l | sort -n -k5 -t/); do
n=${d#*/iommu_groups/*}; n=${n%%/*}
printf 'IOMMU Group %s ' "$n"
lspci -nns "${d##*/}"
done;
@r15ch13
Copy link

r15ch13 commented May 21, 2022

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment