Skip to content

Instantly share code, notes, and snippets.

@niraami
Created April 15, 2022 19:58
Show Gist options
  • Save niraami/53c11b6ce9c385fb4343a63d7362d4a2 to your computer and use it in GitHub Desktop.
Save niraami/53c11b6ce9c385fb4343a63d7362d4a2 to your computer and use it in GitHub Desktop.
Bash script for listing IOMMU groups
#!/usr/bin/env bash
shopt -s nullglob
for g in `find /sys/kernel/iommu_groups/* -maxdepth 0 -type d | sort -V`; do
echo "IOMMU Group ${g##*/}:"
for d in $g/devices/*; do
echo -e "\t$(lspci -nns ${d##*/})"
done;
done;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment