Add ls-iommu utility

This commit is contained in:
Kenneth Benzie 2023-12-22 13:09:25 +00:00
parent 1e60a5ddd5
commit b9f687dd0b
2 changed files with 10 additions and 0 deletions

6
ls-iommu.sh Executable file
View File

@ -0,0 +1,6 @@
#!/bin/bash
for d in /sys/kernel/iommu_groups/*/devices/*; do
n=${d#*/iommu_groups/*}; n=${n%%/*}
printf '%s ' "$n"
lspci -nns "${d##*/}"
done

View File

@ -102,3 +102,7 @@ if which docker-machine &> /dev/null; then
fi
}
fi
ls-iommu() {
${0:a:h}/ls-iommu.sh | sort -n
}