Skip to content

Instantly share code, notes, and snippets.

@JorgeFrancoIbanez
Forked from flungo/lsiommu
Created December 8, 2020 18:25
Show Gist options
  • Save JorgeFrancoIbanez/91cf1b9c870c92a6bb75b347b59cb059 to your computer and use it in GitHub Desktop.
Save JorgeFrancoIbanez/91cf1b9c870c92a6bb75b347b59cb059 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