Skip to content

Instantly share code, notes, and snippets.

@edwinclement08
Forked from flungo/lsiommu
Created June 12, 2021 10:11
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save edwinclement08/677d1a7acc4cad0ef2c20c6176d5adea to your computer and use it in GitHub Desktop.
Save edwinclement08/677d1a7acc4cad0ef2c20c6176d5adea 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;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment