Skip to content

Instantly share code, notes, and snippets.

@mattsizzle
Created October 5, 2021 21:06
Show Gist options
  • Save mattsizzle/5246510d0250e8a5e620a00d85e7a1eb to your computer and use it in GitHub Desktop.
Save mattsizzle/5246510d0250e8a5e620a00d85e7a1eb to your computer and use it in GitHub Desktop.
IOMMU Support and Grouping Script
#!/bin/bash
shopt -s nullglob
echo -e "Checking for kernel support for IOMMU"
dmesg | grep -e DMAR -e IOMMU
dmesg | grep 'remapping'
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 -nnks ${d##*/})"
done;
done;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment