Skip to content

Instantly share code, notes, and snippets.

@brimston3
Created June 21, 2017 13:46
Show Gist options
  • Save brimston3/6ef79f1d8001b9aa6011b9a4f3767f83 to your computer and use it in GitHub Desktop.
Save brimston3/6ef79f1d8001b9aa6011b9a4f3767f83 to your computer and use it in GitHub Desktop.
IOMMU group identification
#!/bin/bash
# I have no idea where I got this script, possibly here:
# https://wiki.archlinux.org/index.php/PCI_passthrough_via_OVMF
for d in /sys/kernel/iommu_groups/*/devices/* ; 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